Skip to content

Commit

Permalink
Merge pull request #6 from ferhah/bugfix_dataset_close
Browse files Browse the repository at this point in the history
Bugfix: meta_train_dataset etc. are attributes of benchmark
  • Loading branch information
tristandeleu authored Apr 11, 2020
2 parents 3c0ab81 + f0783b5 commit c7d994a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ def main(args):
with open(args.model_path, 'wb') as f:
torch.save(benchmark.model.state_dict(), f)

if hasattr(meta_train_dataset, 'close'):
meta_train_dataset.close()
meta_val_dataset.close()
if hasattr(benchmark.meta_train_dataset, 'close'):
benchmark.meta_train_dataset.close()
benchmark.meta_val_dataset.close()


if __name__ == '__main__':
Expand Down

0 comments on commit c7d994a

Please sign in to comment.