Skip to content

Commit

Permalink
Change to known first party
Browse files Browse the repository at this point in the history
  • Loading branch information
atong01 committed Nov 23, 2023
1 parent 2f6608c commit 81fcb8d
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ count = true
skips = ["B101", "B311"]

[tool.isort]
known_third_party = ["tests"]
known_first_party = ["tests", "src"]
3 changes: 2 additions & 1 deletion runner/src/datamodules/distribution_datamodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
from pytorch_lightning import LightningDataModule
from pytorch_lightning.trainer.supporters import CombinedLoader
from sklearn.preprocessing import StandardScaler
from src import utils
from torch.utils.data import DataLoader, Sampler, TensorDataset, random_split
from torchdyn.datasets import ToyDataset

from src import utils

from .components.base import BaseLightningDataModule
from .components.time_dataset import load_dataset
from .components.tnet_dataset import SCData
Expand Down
1 change: 1 addition & 0 deletions runner/src/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
from omegaconf import DictConfig
from pytorch_lightning import LightningDataModule, LightningModule, Trainer
from pytorch_lightning.loggers import LightningLoggerBase

from src import utils

log = utils.get_pylogger(__name__)
Expand Down
1 change: 1 addition & 0 deletions runner/src/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
from omegaconf import DictConfig
from pytorch_lightning import Callback, LightningDataModule, LightningModule, Trainer
from pytorch_lightning.loggers import LightningLoggerBase

from src import utils

log = utils.get_pylogger(__name__)
Expand Down
1 change: 1 addition & 0 deletions runner/src/utils/rich_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from omegaconf import DictConfig, OmegaConf, open_dict
from pytorch_lightning.utilities import rank_zero_only
from rich.prompt import Prompt

from src.utils import pylogger

log = pylogger.get_pylogger(__name__)
Expand Down
1 change: 1 addition & 0 deletions runner/src/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from pytorch_lightning import Callback
from pytorch_lightning.loggers import LightningLoggerBase
from pytorch_lightning.utilities import rank_zero_only

from src.utils import pylogger, rich_utils

log = pylogger.get_pylogger(__name__)
Expand Down
1 change: 1 addition & 0 deletions runner/tests/helpers/run_if.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import torch
from packaging.version import Version
from pkg_resources import get_distribution

from tests.helpers.package_available import (
_COMET_AVAILABLE,
_DEEPSPEED_AVAILABLE,
Expand Down
1 change: 1 addition & 0 deletions runner/tests/helpers/run_sh_command.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import List

import pytest

from tests.helpers.package_available import _SH_AVAILABLE

if _SH_AVAILABLE:
Expand Down
1 change: 1 addition & 0 deletions runner/tests/test_datamodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import pytest
import torch

from src.datamodules.distribution_datamodule import (
SKLearnDataModule,
TorchDynDataModule,
Expand Down
1 change: 1 addition & 0 deletions runner/tests/test_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import pytest
from hydra.core.hydra_config import HydraConfig
from omegaconf import open_dict

from src.eval import evaluate
from src.train import train

Expand Down
1 change: 1 addition & 0 deletions runner/tests/test_sweeps.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from tests.helpers.run_if import RunIf
from tests.helpers.run_sh_command import run_sh_command

Expand Down
1 change: 1 addition & 0 deletions runner/tests/test_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import pytest
from hydra.core.hydra_config import HydraConfig
from omegaconf import open_dict

from src.train import train
from tests.helpers.run_if import RunIf

Expand Down

0 comments on commit 81fcb8d

Please sign in to comment.