test-tube icon indicating copy to clipboard operation
test-tube copied to clipboard

Issue with _get_file_writer after recent commits

Open MikkelAntonsen opened this issue 4 years ago • 2 comments

I'm trying out pytorch-lightning and I'm having an issue after commits 1fad1c7dfb7cc55803cd7a9597723559aa124cbe and 3fba70a22eb5521c12d81302ff978a92c8113909. When I do

from test_tube import Experiment
exp = Experiment(save_dir=cfg['log_dir'])
trainer = Trainer(experiment=exp, max_nb_epochs=1, train_percent_check=0.01)

the program crashes with

File "/home/user/anaconda3/envs/pytorchenv/lib/python3.7/site-packages/test_tube/log.py", line 504, in _get_file_writer if self.purge_step is not None: AttributeError: 'Experiment' object has no attribute 'purge_step'

because there are four attributes of Experiment that are never set, self.purge_step, self.filename_suffix, self.flush_secs.

MikkelAntonsen avatar Aug 11 '19 13:08 MikkelAntonsen

make sure you have the correct versions installed (bottom of main readme in lightning). pytorch 1.2.0 introduced breaking changes which are fixed given that you use the correct pytorch, lightning and test tube versions. ie: after 4.2 you need pytorch 1.2.0.

check the faq in the readme in lightning

williamFalcon avatar Aug 11 '19 13:08 williamFalcon

My fault. I looked at the requirements.txt but missed the faq. Thanks:)

MikkelAntonsen avatar Aug 12 '19 10:08 MikkelAntonsen