removed SaveModelCallback.add_save as it is not used anymore
learn.save now returns a path
use SaveModelCallback.last_path to keep track of last model saved for access to loggers. This was the most simple approach I thought of.
add log_model method to upload model as artifact
cleaner approach to log_model and log_dataset where we can directly pass the metadata we want (automatically generated when using WandbCallback)
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
Changes:
SaveModelCallback.add_save
as it is not used anymorelearn.save
now returns a pathSaveModelCallback.last_path
to keep track of last model saved for access to loggers. This was the most simple approach I thought of.log_model
method to upload model as artifactlog_model
andlog_dataset
where we can directly pass the metadata we want (automatically generated when usingWandbCallback
)SaveModelCallback
(custom metric…) but we can now also desactivate model logging withlog_model=False
(eg when doing parameter search). Non-breaking change as it defaults tolog_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.