File tree 1 file changed +0
-31
lines changed
1 file changed +0
-31
lines changed Original file line number Diff line number Diff line change @@ -988,34 +988,3 @@ def setup(self, stage):
988
988
trainer .test (ckpt_path = None )
989
989
assert trainer .stage == 'test'
990
990
assert trainer .get_model ().stage == 'test'
991
-
992
-
993
- @pytest .fixture
994
- def no_local_file_ops (monkeypatch ):
995
- monkeypatch .delattr (os .path , "exists" )
996
-
997
-
998
- def test_trainer_ensure_no_local_only_file_ops (tmpdir , monkeypatch , no_local_file_ops ):
999
- """Currently file ops use helpers in cloud_io to ensure thigns work with local or remote files
1000
-
1001
- We will monkeypatch to disable some problematic local only methods to
1002
- hopefully prevent any file ops from being added which only work locally """
1003
-
1004
- monkeypatch .setenv ('TORCH_HOME' , str (tmpdir ))
1005
-
1006
- model = EvalModelTemplate ()
1007
-
1008
- # logger file to get meta
1009
- logger = tutils .get_default_logger (tmpdir )
1010
-
1011
- trainer = Trainer (
1012
- default_root_dir = tmpdir ,
1013
- max_epochs = 1 ,
1014
- logger = logger ,
1015
- checkpoint_callback = ModelCheckpoint (tmpdir ),
1016
- )
1017
- # fit model
1018
- result = trainer .fit (model )
1019
- assert result == 1
1020
- # If this fails, make sure to only use file ops which work on both remote
1021
- # and local files
You can’t perform that action at this time.
0 commit comments