Skip to content

Commit abbe2ac

Browse files
Remove test_sacred_pickle
1 parent 1bd81dc commit abbe2ac

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

tests/test_logging.py

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -427,37 +427,3 @@ def run_fct():
427427

428428
print('result finished')
429429
assert result.status == "COMPLETED", "Training failed"
430-
431-
432-
def test_sacred_pickle(tmpdir):
433-
"""Verify that pickling trainer with sacred logger works."""
434-
tutils.reset_seed()
435-
436-
try:
437-
from pytorch_lightning.logging import SacredLogger
438-
except ModuleNotFoundError:
439-
return
440-
441-
try:
442-
from sacred import Experiment
443-
except ModuleNotFoundError:
444-
return
445-
446-
hparams = tutils.get_hparams()
447-
sacred_dir = os.path.join(tmpdir, "sacredruns")
448-
449-
ex = Experiment()
450-
ex_config = vars(hparams)
451-
ex.add_config(ex_config)
452-
453-
logger = SacredLogger(ex)
454-
trainer_options = dict(
455-
default_save_path=sacred_dir,
456-
max_epochs=1,
457-
logger=logger
458-
)
459-
460-
trainer = Trainer(**trainer_options)
461-
pkl_bytes = pickle.dumps(trainer)
462-
trainer2 = pickle.loads(pkl_bytes)
463-
trainer2.loggerlog_metrics({"acc": 1.0})

0 commit comments

Comments
 (0)