Skip to content
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

Allow MLFlowLogger to work with mlflow-skinny #16513

Merged
merged 5 commits into from
Jan 27, 2023

Conversation

dconathan
Copy link
Contributor

@dconathan dconathan commented Jan 26, 2023

What does this PR do?

mlflow-skinny is a variant of the mlflow library that installs the bare-minimum required for tracking: https://pypi.org/project/mlflow-skinny/

Even though this should be enough to enable the MLFlowLogger, it doesn't work because:

https://github.com/Lightning-AI/lightning/blob/4a802e00a843264afd5aea023d8475d4f1b4d360/src/pytorch_lightning/loggers/mlflow.py#L40

checks that precisely the mlflow library is installed.

This PR looses the restriction to check for the mlflow-skinny library too.

Fixes #16486

Does your PR introduce any breaking changes? If yes, please list them.

If there are users that have the mlflow-skinny library installed and are counting on the MLFlowLogger not working, but I can't see why that would be the case...

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

PR review

Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?

Yup :)

Make sure you had fun coding 🙃

@github-actions github-actions bot added the pl Generic label for PyTorch Lightning package label Jan 26, 2023
@dconathan
Copy link
Contributor Author

@carmocca do we currently test in an environment where mlflow is installed? I see the logger is tested here https://github.com/Lightning-AI/lightning/blob/master/tests/tests_pytorch/loggers/test_mlflow.py but I don't see where to make a new environment to run the tests with mlflow-skinny...

@carmocca
Copy link
Contributor

@dconathan We don't install the logger libraries in our CI and instead mock them entirely. This PR could be merged as is as long as the tests pass.

Can you also add this change to the CHANGELOG?

@dconathan dconathan marked this pull request as ready for review January 27, 2023 01:11
@awaelchli awaelchli added feature Is an improvement or enhancement logger: mlflow community This PR is from the community labels Jan 27, 2023
@awaelchli awaelchli added this to the 2.0 milestone Jan 27, 2023
src/pytorch_lightning/CHANGELOG.md Outdated Show resolved Hide resolved
src/pytorch_lightning/loggers/mlflow.py Outdated Show resolved Hide resolved
@carmocca carmocca self-assigned this Jan 27, 2023
@mergify mergify bot added ready PRs ready to be merged and removed has conflicts ready PRs ready to be merged labels Jan 27, 2023
@carmocca carmocca changed the title Make MLFlowLogger work with mlflow-skinny dependency Allow MLFlowLogger to work with mlflow-skinny Jan 27, 2023
@carmocca carmocca enabled auto-merge (squash) January 27, 2023 04:02
@carmocca carmocca merged commit 25e1aff into Lightning-AI:master Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community This PR is from the community feature Is an improvement or enhancement logger: mlflow pl Generic label for PyTorch Lightning package ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support MLFlowLogger with only the mlflow-skinny dependency installed
3 participants