From 467fd640db02275972c7111af031c86bb59333e9 Mon Sep 17 00:00:00 2001 From: Brendan Fahy Date: Sat, 8 Aug 2020 18:56:05 +0000 Subject: [PATCH] remove no local test --- tests/trainer/test_trainer.py | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/tests/trainer/test_trainer.py b/tests/trainer/test_trainer.py index 16de00caa214a6..2444d9905f6a11 100644 --- a/tests/trainer/test_trainer.py +++ b/tests/trainer/test_trainer.py @@ -988,34 +988,3 @@ def setup(self, stage): trainer.test(ckpt_path=None) assert trainer.stage == 'test' assert trainer.get_model().stage == 'test' - - -@pytest.fixture -def no_local_file_ops(monkeypatch): - monkeypatch.delattr(os.path, "exists") - - -def test_trainer_ensure_no_local_only_file_ops(tmpdir, monkeypatch, no_local_file_ops): - """Currently file ops use helpers in cloud_io to ensure thigns work with local or remote files - - We will monkeypatch to disable some problematic local only methods to - hopefully prevent any file ops from being added which only work locally """ - - monkeypatch.setenv('TORCH_HOME', str(tmpdir)) - - model = EvalModelTemplate() - - # logger file to get meta - logger = tutils.get_default_logger(tmpdir) - - trainer = Trainer( - default_root_dir=tmpdir, - max_epochs=1, - logger=logger, - checkpoint_callback=ModelCheckpoint(tmpdir), - ) - # fit model - result = trainer.fit(model) - assert result == 1 - # If this fails, make sure to only use file ops which work on both remote - # and local files