Skip to content

Commit

Permalink
path
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Mar 19, 2021
1 parent 7f30819 commit ab10516
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
4 changes: 2 additions & 2 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
_TEST_ROOT = os.path.dirname(__file__)
_PROJECT_ROOT = os.path.dirname(_TEST_ROOT)
_TEMP_PATH = os.path.join(_PROJECT_ROOT, 'test_temp')
DATASETS_PATH = os.path.join(_PROJECT_ROOT, 'Datasets')
LEGACY_PATH = os.path.join(_PROJECT_ROOT, 'legacy')
PATH_DATASETS = os.path.join(_PROJECT_ROOT, 'Datasets')
PATH_LEGACY = os.path.join(_PROJECT_ROOT, 'legacy')

# todo: this setting `PYTHONPATH` may not be used by other evns like Conda for import packages
if _PROJECT_ROOT not in os.getenv('PYTHONPATH', ""):
Expand Down
3 changes: 2 additions & 1 deletion tests/base/model_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import torch.nn.functional as F

from pytorch_lightning.core.lightning import LightningModule
from tests import PATH_DATASETS
from tests.base.model_optimizers import ConfigureOptimizersPool
from tests.base.model_test_dataloaders import TestDataloaderVariations
from tests.base.model_test_epoch_ends import TestEpochEndVariations
Expand All @@ -28,7 +29,7 @@
from tests.base.model_valid_dataloaders import ValDataloaderVariations
from tests.base.model_valid_epoch_ends import ValidationEpochEndVariations
from tests.base.model_valid_steps import ValidationStepVariations
from tests.helpers.datasets import PATH_DATASETS, TrialMNIST
from tests.helpers.datasets import TrialMNIST


class EvalModelTemplate(
Expand Down
4 changes: 2 additions & 2 deletions tests/checkpointing/test_legacy_checkpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
import pytest

from pytorch_lightning import Trainer
from tests import LEGACY_PATH
from tests import PATH_LEGACY

LEGACY_CHECKPOINTS_PATH = os.path.join(LEGACY_PATH, 'checkpoints')
LEGACY_CHECKPOINTS_PATH = os.path.join(PATH_LEGACY, 'checkpoints')
CHECKPOINT_EXTENSION = ".ckpt"


Expand Down
5 changes: 1 addition & 4 deletions tests/helpers/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@
from torch import Tensor
from torch.utils.data import Dataset

from tests import _PROJECT_ROOT

#: local path to test datasets
PATH_DATASETS = os.path.join(_PROJECT_ROOT, 'Datasets')
from tests import PATH_DATASETS


class MNIST(Dataset):
Expand Down

0 comments on commit ab10516

Please sign in to comment.