Skip to content

Fix UnboundLocalError: local variable 'checkpoint_model' referenced before assignment #533

@gcroci2

Description

@gcroci2

During the training (in the trainer.Trainer.train() method), if the loss is nan (such as when using very few datapoints, like in #528), checkpoint_model is never created, thus the crashes and gives the following error:

UnboundLocalError: local variable 'checkpoint_model' referenced before assignment

TODO:

  • Handle such cases
  • Add a test
  • Release a new fixed version (patch)
  • Check that docker installation works with the new version, by running the tutorials (we expect that using cutoff 8 and only 15 data points the loss is not nan)

Metadata

Metadata

Assignees

Labels

JOSSTrainertrainer module related issuesbugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions