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

Fix expanding home directory for Trainer's default_root_dir #19179

Merged
merged 11 commits into from
Dec 20, 2023

Conversation

asingh9530
Copy link
Contributor

@asingh9530 asingh9530 commented Dec 18, 2023

What does this PR do?

If the user provides Trainer(default_root_dir="~/Trainer"), the path doesn't get expanded. Instead, it creates the folder with name ~ in the current working directory.

Fixes #19059

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

📚 Documentation preview 📚: https://pytorch-lightning--19179.org.readthedocs.build/en/19179/

@github-actions github-actions bot added the pl Generic label for PyTorch Lightning package label Dec 18, 2023
Copy link
Member

@Borda Borda left a comment

Choose a reason for hiding this comment

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

lets add note to change log

@awaelchli awaelchli changed the title fixed special directory path bug Fix expanding home directory for Trainer's default_root_dir Dec 19, 2023
@awaelchli awaelchli added bug Something isn't working trainer labels Dec 19, 2023
@awaelchli awaelchli added this to the 2.1.x milestone Dec 19, 2023
@awaelchli awaelchli added the community This PR is from the community label Dec 19, 2023
Copy link
Contributor

@awaelchli awaelchli left a comment

Choose a reason for hiding this comment

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

Looks great!

@mergify mergify bot added the ready PRs ready to be merged label Dec 19, 2023
Copy link

codecov bot commented Dec 19, 2023

Codecov Report

Merging #19179 (c60d86f) into master (1284713) will decrease coverage by 34%.
The diff coverage is 100%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #19179      +/-   ##
==========================================
- Coverage      83%      49%     -34%     
==========================================
  Files         444      436       -8     
  Lines       36974    36821     -153     
==========================================
- Hits        30616    18080   -12536     
- Misses       6358    18741   +12383     

@asingh9530
Copy link
Contributor Author

@carmocca looks like test_trainer_compiled_model_test is broken, if possible could you check because it shouldn't fail.

@awaelchli awaelchli merged commit 6d47bf1 into Lightning-AI:master Dec 20, 2023
91 of 92 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community This PR is from the community pl Generic label for PyTorch Lightning package ready PRs ready to be merged trainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expand paths that start with "~" in Trainer.default_root_dir and other places
4 participants