mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-17 21:33:56 +08:00
Fix python 3.7 support (#959)
This commit is contained in:
1 parent
b5c34f0154
commit
6baf31dc9a
7 files changed
+13
-8
No files matched your search
@@ -15,10 +15,10 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python 3.8.12
|
||||
- name: Set up Python 3.7.13
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.8.12'
|
||||
python-version: '3.7.13'
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ env.pythonLocation }}
|
||||
|
||||
@@ -20,7 +20,7 @@ from __future__ import annotations
|
||||
|
||||
from abc import abstractmethod
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Dict, List, Literal, Optional, Tuple, Type, Union
|
||||
from typing import Dict, List, Optional, Tuple, Type, Union
|
||||
|
||||
import torch
|
||||
import tyro
|
||||
@@ -29,6 +29,7 @@ from torch import nn
|
||||
from torch.nn import Parameter
|
||||
from torch.utils.data import Dataset
|
||||
from torch.utils.data.distributed import DistributedSampler
|
||||
from typing_extensions import Literal
|
||||
|
||||
from nerfstudio.cameras.camera_optimizers import CameraOptimizerConfig
|
||||
from nerfstudio.cameras.rays import RayBundle
|
||||
|
||||
@@ -21,11 +21,12 @@ import dataclasses
|
||||
import functools
|
||||
import os
|
||||
import time
|
||||
from typing import Dict, List, Literal, Tuple
|
||||
from typing import Dict, List, Tuple
|
||||
|
||||
import torch
|
||||
from rich.console import Console
|
||||
from torch.cuda.amp.grad_scaler import GradScaler
|
||||
from typing_extensions import Literal
|
||||
|
||||
from nerfstudio.configs import base_config as cfg
|
||||
from nerfstudio.engine.callbacks import (
|
||||
|
||||
@@ -21,7 +21,7 @@ import typing
|
||||
from abc import abstractmethod
|
||||
from dataclasses import dataclass, field
|
||||
from time import time
|
||||
from typing import Any, Dict, List, Literal, Optional, Type, Union, cast
|
||||
from typing import Any, Dict, List, Optional, Type, Union, cast
|
||||
|
||||
import torch
|
||||
import torch.distributed as dist
|
||||
@@ -35,6 +35,7 @@ from rich.progress import (
|
||||
from torch import nn
|
||||
from torch.nn import Parameter
|
||||
from torch.nn.parallel import DistributedDataParallel as DDP
|
||||
from typing_extensions import Literal
|
||||
|
||||
from nerfstudio.configs import base_config as cfg
|
||||
from nerfstudio.data.datamanagers.base_datamanager import (
|
||||
|
||||
@@ -17,9 +17,10 @@ A pipeline that dynamically chooses the number of rays to sample.
|
||||
"""
|
||||
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Literal, Type
|
||||
from typing import Type
|
||||
|
||||
import torch
|
||||
from typing_extensions import Literal
|
||||
|
||||
from nerfstudio.data.datamanagers.base_datamanager import VanillaDataManager
|
||||
from nerfstudio.pipelines.base_pipeline import VanillaPipeline, VanillaPipelineConfig
|
||||
|
||||
@@ -20,11 +20,12 @@ from __future__ import annotations
|
||||
import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import Literal, Optional, Tuple
|
||||
from typing import Optional, Tuple
|
||||
|
||||
import torch
|
||||
import yaml
|
||||
from rich.console import Console
|
||||
from typing_extensions import Literal
|
||||
|
||||
from nerfstudio.configs import base_config as cfg
|
||||
from nerfstudio.pipelines.base_pipeline import Pipeline
|
||||
|
||||
+1
-1
@@ -146,5 +146,5 @@ reportMissingTypeStubs = false
|
||||
reportPrivateImportUsage = false
|
||||
reportUndefinedVariable = false
|
||||
|
||||
pythonVersion = "3.8"
|
||||
pythonVersion = "3.7"
|
||||
pythonPlatform = "Linux"
|
||||
Reference in new issue
Block a user