fastai / fastai2

Temporary home for fastai v2 while it's being developed
https://dev.fast.ai
Apache License 2.0
645 stars 235 forks source link

feat(wandb): log models as artifacts #536

Closed borisdayma closed 4 years ago

borisdayma commented 4 years ago

Changes:

  1. removed SaveModelCallback.add_save as it is not used anymore
  2. learn.save now returns a path
  3. use SaveModelCallback.last_path to keep track of last model saved for access to loggers. This was the most simple approach I thought of.
  4. add log_model method to upload model as artifact
  5. cleaner approach to log_model and log_dataset where we can directly pass the metadata we want (automatically generated when using WandbCallback)
  6. we still know which model to log through the presence of SaveModelCallback (custom metric…) but we can now also desactivate model logging with log_model=False (eg when doing parameter search). Non-breaking change as it defaults to log_model=True

See example and demo notebook.

If you like the approach, feel free to merge and I'll update doc in follow-up PR.

review-notebook-app[bot] commented 4 years ago

Check out this pull request on  ReviewNB

Review Jupyter notebook visual diffs & provide feedback on notebooks.


Powered by ReviewNB

jph00 commented 4 years ago

Can you please re-post this at the new fastai/fastai repo? Sorry for the inconvenience!