Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderDokuchaev committed Sep 28, 2023
1 parent 13dca41 commit b975467
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/torch/test_sota_checkpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,18 +181,18 @@ def generate_run_examples_command(

@pytest.fixture(autouse=True, scope="class")
def make_metrics_dump_path(metrics_dump_dir):
if metrics_dump_path is None:
if metrics_dump_dir is None:
data = datetime.datetime.now()
metrics_dump_path = (
metrics_dump_dir = (
PROJECT_ROOT / "test_results" / "metrics_dump_"
f"{'_'.join([str(getattr(data, atr)) for atr in ['year', 'month', 'day', 'hour', 'minute', 'second']])}"
)
else:
metrics_dump_path = Path(metrics_dump_path)
assert not metrics_dump_path.is_dir() or not os.listdir(
metrics_dump_path
), f"metrics_dump_path dir should be empty: {metrics_dump_path}"
print(f"metrics_dump_path: {metrics_dump_path}")
metrics_dump_dir = Path(metrics_dump_dir)
assert not metrics_dump_dir.is_dir() or not os.listdir(
metrics_dump_dir
), f"metrics_dump_path dir should be empty: {metrics_dump_dir}"
print(f"metrics_dump_path: {metrics_dump_dir}")


@pytest.mark.nightly
Expand Down

0 comments on commit b975467

Please sign in to comment.