Skip to content

Commit

Permalink
Refactor tests (ashleve#498)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleve authored Jan 11, 2023
1 parent f8b4e12 commit 6fcf619
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""This file prepares config fixtures for other tests."""

import pyrootutils
import pytest
from hydra import compose, initialize
Expand All @@ -12,7 +14,7 @@ def cfg_train_global() -> DictConfig:

# set defaults for all tests
with open_dict(cfg):
cfg.paths.root_dir = str(pyrootutils.find_root())
cfg.paths.root_dir = str(pyrootutils.find_root(indicator=".project-root"))
cfg.trainer.max_epochs = 1
cfg.trainer.limit_train_batches = 0.01
cfg.trainer.limit_val_batches = 0.1
Expand All @@ -35,7 +37,7 @@ def cfg_eval_global() -> DictConfig:

# set defaults for all tests
with open_dict(cfg):
cfg.paths.root_dir = str(pyrootutils.find_root())
cfg.paths.root_dir = str(pyrootutils.find_root(indicator=".project-root"))
cfg.trainer.max_epochs = 1
cfg.trainer.limit_test_batches = 0.1
cfg.trainer.accelerator = "cpu"
Expand Down
File renamed without changes.

0 comments on commit 6fcf619

Please sign in to comment.