KEMBAR78
integrations: mlflow: skip start_run() if a run is already active and sanity check on enabling integration by ktzsh · Pull Request #16131 · huggingface/transformers · GitHub
Skip to content

Conversation

@ktzsh
Copy link
Contributor

@ktzsh ktzsh commented Mar 14, 2022

What does this PR do?

  • Allows to reuse any existing mlflow run that may be active before Trainer is initialized. Contrary to the discussion 🤗 Transformers **Trainer** API raises exception on train if triggered from an already started ML Flow run. #15663 the choice of creating a nested run is left to user since user now has the ability to explicitly start a nested run if they require it before calling the Trainer and reuse it for logging.
  • Additionally, option to disable MLFLow Callback through environment variable. Useful when user wishes to purely control the flow outside transformers library context

Fixes #15663 #11115 (issue)

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

@noise-field @sgugger
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Mar 14, 2022

The documentation is not available anymore as the PR was closed or merged.

Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this!

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
@sgugger sgugger merged commit 12d1f07 into huggingface:master Mar 17, 2022
FrancescoSaverioZuppichini pushed a commit that referenced this pull request Mar 21, 2022
… sanity check on enabling integration (#16131)

* integrations: mlflow: skip start_run() call if a run is already active

* integrations: typo fix

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
FrancescoSaverioZuppichini pushed a commit that referenced this pull request Mar 24, 2022
… sanity check on enabling integration (#16131)

* integrations: mlflow: skip start_run() call if a run is already active

* integrations: typo fix

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🤗 Transformers **Trainer** API raises exception on train if triggered from an already started ML Flow run.

3 participants