Skip to content

Updated test_checkpoint by replacing multiple calls pytest.mark.parametrize#2525

Merged
vfdev-5 merged 17 commits intopytorch:masterfrom
divo12:master
Mar 28, 2022
Merged

Updated test_checkpoint by replacing multiple calls pytest.mark.parametrize#2525
vfdev-5 merged 17 commits intopytorch:masterfrom
divo12:master

Conversation

@divo12
Copy link
Copy Markdown
Contributor

@divo12 divo12 commented Mar 24, 2022

Related to #2522

Description:

Check list:

  • New tests are added (if a new feature is added)

@vfdev-5
Copy link
Copy Markdown
Collaborator

vfdev-5 commented Mar 24, 2022

@divo12 thanks for PR, please check https://github.com/pytorch/ignite/blob/master/CONTRIBUTING.md#formatting-code to reformat the code and remove all unnecessary files like notebook checkpoints etc, all new added files.

@divo12
Copy link
Copy Markdown
Contributor Author

divo12 commented Mar 24, 2022

@vfdev-5 done the required changes for the PR

@vfdev-5
Copy link
Copy Markdown
Collaborator

vfdev-5 commented Mar 24, 2022

@divo12 thanks, I started the CI to see the results. Can you also please rename PR's title and put into the description:

- Fixes #{2522}
+ Related to #2522

as this PR shouldn't close the issue.

@divo12 divo12 changed the title done changes Updated "test_checkpoint" by replacing multiple calls pytest.mark.parametrize Mar 24, 2022
@divo12 divo12 changed the title Updated "test_checkpoint" by replacing multiple calls pytest.mark.parametrize Updated 'test_checkpoint' by replacing multiple calls pytest.mark.parametrize Mar 24, 2022
@divo12 divo12 changed the title Updated 'test_checkpoint' by replacing multiple calls pytest.mark.parametrize Updated test_checkpoint by replacing multiple calls pytest.mark.parametrize Mar 24, 2022
@divo12 divo12 changed the title Updated test_checkpoint by replacing multiple calls pytest.mark.parametrize Updated test_checkpoint by replacing multiple calls pytest.mark.parametrize Mar 24, 2022
@divo12
Copy link
Copy Markdown
Contributor Author

divo12 commented Mar 24, 2022

@vfdev-5 done all the required changes

@divo12
Copy link
Copy Markdown
Contributor Author

divo12 commented Mar 25, 2022

@sdesrozis @vfdev-5 I got a failed check on one of the tests...can you please review it

@vfdev-5
Copy link
Copy Markdown
Collaborator

vfdev-5 commented Mar 25, 2022

@divo12 I restarted failed test, looks like CI flakiness.

@vfdev-5 vfdev-5 requested a review from sdesrozis March 25, 2022 09:03
@sdesrozis
Copy link
Copy Markdown
Contributor

missing test_model_checkpoint_simple_recovery_from_existing_non_empty should be refactored using pytest.mark.parametrize.

@vfdev-5
Copy link
Copy Markdown
Collaborator

vfdev-5 commented Mar 26, 2022

@divo12 please address the open comments by @sdesrozis

@divo12
Copy link
Copy Markdown
Contributor Author

divo12 commented Mar 26, 2022

@sdesrozis I have resolved the other issuses..can you help me with the last one-
#2525 (comment)?

@sdesrozis
Copy link
Copy Markdown
Contributor

Look the mentioned test. You didn’t refactor it, right ?

@divo12
Copy link
Copy Markdown
Contributor Author

divo12 commented Mar 26, 2022

Because i am not getting how to refactor that like my dirname is fixed and the other two are varying
@vfdev-5 help with this issue

@sdesrozis
Copy link
Copy Markdown
Contributor

Because i am not getting how to refactor that like my dirname is fixed and the other two are varying

@vfdev-5 help with this issue

Sorry I didn't catch whether there is still an issue.

@vfdev-5
Copy link
Copy Markdown
Collaborator

vfdev-5 commented Mar 27, 2022

Because i am not getting how to refactor that like my dirname is fixed and the other two are varying @vfdev-5 help with this issue

@divo12 To make test_model_checkpoint_simple_recovery_from_existing_non_empty parametrized you can just add the decorator and keep dirname fixture:

@pytest.mark.parametrize("ext", [".txt", ".pt"])
def test_model_checkpoint_simple_recovery_from_existing_non_empty(ext, dirname):
    pass

@divo12
Copy link
Copy Markdown
Contributor Author

divo12 commented Mar 28, 2022

@vfdev-5 done the changes

@vfdev-5 vfdev-5 requested a review from sdesrozis March 28, 2022 11:12
Copy link
Copy Markdown
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the PR @divo12
Let's wait for @sdesrozis review and if OK, we can merge it

@vfdev-5 vfdev-5 merged commit 2c0e097 into pytorch:master Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants