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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: replacing tmpdir with tmp_path in tests_pytorch/checkpointing #19642

Merged
merged 5 commits into from Mar 16, 2024

Conversation

fnhirwa
Copy link
Contributor

@fnhirwa fnhirwa commented Mar 15, 2024

What does this PR do?

Part of #16188 (comment)

changed tmpdir to tmp_path fixture in tests_pytorch/checkpointing/

Fixes #<issue_number>

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--19642.org.readthedocs.build/en/19642/

@github-actions github-actions bot added the pl Generic label for PyTorch Lightning package label Mar 15, 2024
@Borda Borda self-assigned this Mar 15, 2024
@fnhirwa fnhirwa marked this pull request as ready for review March 16, 2024 03:12
@awaelchli awaelchli added the community This PR is from the community label Mar 16, 2024
@awaelchli awaelchli added this to the 2.3 milestone Mar 16, 2024
@mergify mergify bot added the ready PRs ready to be merged label Mar 16, 2024
@awaelchli
Copy link
Member

@fnhirwa Thanks for the PRs. Just to clarify, and to set the expectations: Find + replace won't be enough in most cases. We are not just renaming the variable, but this switches to a different path object (pathlib.Path). Fixes in the code will have to be made in many cases. See my commit that I pushed for an example how to update the code. The easiest way to know where you need updates is to run the tests locally and see which ones fail:

pip install -r requirements/pytorch/test.txt

pytest -v tests/tests_pytorch/<name of the folder or file you edited>

@fnhirwa
Copy link
Contributor Author

fnhirwa commented Mar 16, 2024

@fnhirwa Thanks for the PRs. Just to clarify, and to set the expectations: Find + replace won't be enough in most cases. We are not just renaming the variable, but this switches to a different path object (pathlib.Path). Fixes in the code will have to be made in many cases. See my commit that I pushed for an example how to update the code. The easiest way to know where you need updates is to run the tests locally and see which ones fail:

pip install -r requirements/pytorch/test.txt

pytest -v tests/tests_pytorch/<name of the folder or file you edited>

I tried to run some tests locally and they were not successfully running I think it's because I didn't install the requirements 馃檮
Going to do it now I'll be able to ensure everything is passing locally before marking a PR ready for review

Copy link

codecov bot commented Mar 16, 2024

Codecov Report

Merging #19642 (d4f181b) into master (51692c9) will decrease coverage by 31%.
Report is 3 commits behind head on master.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #19642      +/-   ##
==========================================
- Coverage      84%      53%     -31%     
==========================================
  Files         424      416       -8     
  Lines       34907    34754     -153     
==========================================
- Hits        29351    18436   -10915     
- Misses       5556    16318   +10762     

@Borda Borda merged commit b9edd18 into Lightning-AI:master Mar 16, 2024
38 checks passed
@awaelchli
Copy link
Member

It is not necessary to make everything pass before you open the PR. I just wanted to raise awareness in case you didn't know. We can of course help if you get stuck.

@fnhirwa fnhirwa deleted the checkpointing branch March 18, 2024 04:40
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 pl Generic label for PyTorch Lightning package ready PRs ready to be merged refactor tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants