-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Add log_model param to MLFlowlogger #9187
Add log_model param to MLFlowlogger #9187
Conversation
for more information, see https://pre-commit.ci
- Changed permissions to files (644) - Added missing imports in pytorch_lightning/loggers/mlflow.py: ModelCheckpoint, ReferenceType:
Co-authored-by: thomas chaton <[email protected]>
Co-authored-by: Rohit Gupta <[email protected]>
Co-authored-by: Rohit Gupta <[email protected]>
Co-authored-by: Rohit Gupta <[email protected]>
_scan_and_log_checkpoints moved from wandb.py and mlflow.py to base.py, and composed of: - _scan_checkpoints() - empty _log_checkpoints() Add to mlflow.py: - mlflow-specific _log_checkpoints() Add to wandb.py: - wandb-specific _log_checkpoints()
- Removed unused import (NOT INTRODUCED IN THIS PR)
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you need further help see our docs: https://pytorch-lightning.readthedocs.io/en/latest/generated/CONTRIBUTING.html#pull-request or ask the assistance of a core contributor here or on Slack. Thank you for your contributions. |
It is still work in progress, I am waiting for review to #9312 in order to proceed for this one. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you need further help see our docs: https://pytorch-lightning.readthedocs.io/en/latest/generated/CONTRIBUTING.html#pull-request or ask the assistance of a core contributor here or on Slack. Thank you for your contributions. |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you need further help see our docs: https://pytorch-lightning.readthedocs.io/en/latest/generated/CONTRIBUTING.html#pull-request or ask the assistance of a core contributor here or on Slack. Thank you for your contributions. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you need further help see our docs: https://pytorch-lightning.readthedocs.io/en/latest/generated/CONTRIBUTING.html#pull-request or ask the assistance of a core contributor here or on Slack. Thank you for your contributions. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you need further help see our docs: https://pytorch-lightning.readthedocs.io/en/latest/generated/CONTRIBUTING.html#pull-request or ask the assistance of a core contributor here or on Slack. Thank you for your contributions. |
This pull request is going to be closed. Please feel free to reopen it create a new from the actual master. |
The base PR (#9312) for this PR has been merged into master, is this PR still needed? |
@AlessioQuercia yes, I think continuing with #9138 is possible. We can reopen this if you would like to rebase it, or opening a fresh PR would also be fine. |
for more information, see https://pre-commit.ci
I created a new PR (#15246) as I think I messed up when pulling the updated master into this branch. I think we can close this one then. |
What does this PR do?
This PR adds a log_model parameter to MLFlowLogger as the one in WandbLogger (#9138).
The log_model parameter can be set to:
:paramref: '~pytorch_lightning.callbacks.model_checkpoint.ModelCheckpoint.save_top_k' == "-1"
which also logs every checkpoint during training.In particular, the function behavior is not exactly the same as in WandbLogger, since MLFlowClient().log_artifact takes different parameters as input:
Does your PR introduce any breaking changes? If yes, please list them.
None.
Before submitting
PR review
Anyone in the community is welcome to review the PR.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:
Notes on tests:
When I run the tests locally with
make test
, the output is: 1 failed, 1860 passed, 400 skipped, 3 xfailed, 5859 warnings. The failed test is the following one:However, when I run the tests locally with the same command as the one in the makefile (
python -m coverage run --source pytorch_lightning -m pytest pytorch_lightning tests pl_examples -v
), the output is: 1861 passed, 400 skipped, 3 xfailed, 5859 warnings.Moreover, if I run the test which fails with make test singularly with
python -m coverage run --source pytorch_lightning -m pytest tests/plugins/environments/test_slurm_environment.py -v
, the test passes.I assume the error might be given by the fact that I am using Ubuntu on WSL2 on Windows, but I am not sure. Anyway, I think the tests should pass on remote.
Did you have fun?
Coding this small PR was funny 😃