Skip to content

Commit

Permalink
tmpdir
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Jul 11, 2020
1 parent a8bf314 commit e95d135
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
12 changes: 10 additions & 2 deletions tests/trainer/test_trainer_steps_dict_return.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ def training_step_with_step_end(tmpdir):
model.training_step_end = model.training_step_end_dict
model.val_dataloader = None

trainer = Trainer(fast_dev_run=True, weights_summary=None)
trainer = Trainer(
default_root_dir=tmpdir,
fast_dev_run=True,
weights_summary=None,
)
trainer.fit(model)

# make sure correct steps were called
Expand Down Expand Up @@ -130,7 +134,11 @@ def test_train_step_epoch_end(tmpdir):
model.training_epoch_end = model.training_epoch_end_dict
model.val_dataloader = None

trainer = Trainer(max_epochs=1, weights_summary=None)
trainer = Trainer(
default_root_dir=tmpdir,
max_epochs=1,
weights_summary=None,
)
trainer.fit(model)

# make sure correct steps were called
Expand Down
12 changes: 10 additions & 2 deletions tests/trainer/test_trainer_steps_scalar_return.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ def training_step_scalar_with_step_end(tmpdir):
model.training_step_end = model.training_step_end_scalar
model.val_dataloader = None

trainer = Trainer(fast_dev_run=True, weights_summary=None)
trainer = Trainer(
default_root_dir=tmpdir,
fast_dev_run=True,
weights_summary=None,
)
trainer.fit(model)

# make sure correct steps were called
Expand Down Expand Up @@ -108,7 +112,11 @@ def test_train_step_epoch_end_scalar(tmpdir):
model.training_epoch_end = model.training_epoch_end_scalar
model.val_dataloader = None

trainer = Trainer(max_epochs=1, weights_summary=None)
trainer = Trainer(
default_root_dir=tmpdir,
max_epochs=1,
weights_summary=None,
)
trainer.fit(model)

# make sure correct steps were called
Expand Down

0 comments on commit e95d135

Please sign in to comment.