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

Decoupled checkpoint artifact path from model artifact path #20325

Conversation

pete-mcelroy
Copy link
Contributor

@pete-mcelroy pete-mcelroy commented Oct 8, 2024

What does this PR do?

Addresses the issues described in issue 19394 by making the checkpoint artifact path in the MLFlowLogger class fully customizable by removing the enforced "model/checkpoints" prefix.

As shown in the image below, we can now specify an artifact path for our checkpoints outside the model/ subfolder. This means that when we want to load a model, we do not have to load all checkpoints at the same time.

Screenshot 2024-10-08 at 10 05 57 AM

Fixes #19394

Before submitting
  • Was this discussed/agreed 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:

Reviewer checklist
  • 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

@github-actions github-actions bot added the pl Generic label for PyTorch Lightning package label Oct 8, 2024
@pete-mcelroy pete-mcelroy marked this pull request as ready for review October 8, 2024 21:02
Copy link

codecov bot commented Oct 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81%. Comparing base (5dea36c) to head (9e94053).
Report is 1 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (5dea36c) and HEAD (9e94053). Click for more details.

HEAD has 554 uploads less than BASE
Flag BASE (5dea36c) HEAD (9e94053)
cpu 148 21
python3.10 42 6
lightning_fabric 25 0
pytest 87 2
lightning 107 16
python3.9 43 6
python3.11 42 6
gpu 3 2
python3.12 21 3
pytorch2.1 37 12
pytest-full 64 21
pytorch2.3 9 3
pytorch_lightning 19 7
pytorch2.2 9 3
pytorch2.4 9 3
Additional details and impacted files
@@            Coverage Diff            @@
##           master   #20325     +/-   ##
=========================================
- Coverage      88%      81%     -7%     
=========================================
  Files         267      264      -3     
  Lines       23065    23010     -55     
=========================================
- Hits        20277    18606   -1671     
- Misses       2788     4404   +1616     

@tchaton tchaton merged commit 8ad3e29 into Lightning-AI:master Oct 8, 2024
78 of 83 checks passed
@mergify mergify bot added the ready PRs ready to be merged label Oct 8, 2024
MrWhatZitToYaa pushed a commit to MrWhatZitToYaa/pytorch-lightning that referenced this pull request Nov 20, 2024
@le-Greg
Copy link

le-Greg commented Dec 24, 2024

How to get the old behaviour now ? I would like to keep my models stored under /models, now they are logged in the root /, which is a bit messy. I tried artifact_location but it doesn't change anything, and save_dir doesn't work since i am using a tracking uri

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

4 participants