-
Notifications
You must be signed in to change notification settings - Fork 27.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Save huggingface checkpoint as artifact in mlflow callback #17686
Conversation
The documentation is not available anymore as the PR was closed or merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this! It's just missing a bit of documentation I believe.
@@ -878,6 +878,17 @@ def on_train_end(self, args, state, control, **kwargs): | |||
if self._auto_end_run and self._ml_flow.active_run(): | |||
self._ml_flow.end_run() | |||
|
|||
def on_save(self, args, state, control, **kwargs): | |||
if self._initialized and state.is_world_process_zero and self._log_artifacts: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this new behavior (uploading the saved model at each save) should be documented above with the HF_MLFLOW_LOG_ARTIFACTS
env variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed the documentation - thanks for your review!
Thanks again! |
Hi there! @swethmandava Thanks for adding this functionality. Quick question: because the artifact logging was removed, wouldn't the intermediate checkpoints not be tracked? Only the latest checkpoint would be logged as a model, right? |
It should now save all the checkpoints. every time on_save is called |
What does this PR do?
Fixes # (issue)
#15495
#10881
#7698
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
@sgugger