Skip to content

Commit

Permalink
Fix python 3.7 support (nerfstudio-project#959)
Browse files Browse the repository at this point in the history
  • Loading branch information
tancik authored Nov 15, 2022
1 parent a6458fc commit 38374bf
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/core_code_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
3 changes: 2 additions & 1 deletion nerfstudio/data/datamanagers/base_datamanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

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
Expand All @@ -29,6 +29,7 @@
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
Expand Down
3 changes: 2 additions & 1 deletion nerfstudio/engine/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@
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 (
Expand Down
3 changes: 2 additions & 1 deletion nerfstudio/pipelines/base_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
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
Expand All @@ -35,6 +35,7 @@
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 (
Expand Down
3 changes: 2 additions & 1 deletion nerfstudio/pipelines/dynamic_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
"""

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
Expand Down
3 changes: 2 additions & 1 deletion nerfstudio/utils/eval_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@
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
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -146,5 +146,5 @@ reportMissingTypeStubs = false
reportPrivateImportUsage = false
reportUndefinedVariable = false

pythonVersion = "3.8"
pythonVersion = "3.7"
pythonPlatform = "Linux"

0 comments on commit 38374bf

Please sign in to comment.