File tree 1 file changed +0
-34
lines changed
1 file changed +0
-34
lines changed Original file line number Diff line number Diff line change @@ -427,37 +427,3 @@ def run_fct():
427
427
428
428
print ('result finished' )
429
429
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 })
You can’t perform that action at this time.
0 commit comments