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

Update common.py #904

Merged
merged 3 commits into from
Apr 8, 2020
Merged

Update common.py #904

merged 3 commits into from
Apr 8, 2020

Conversation

willfrey
Copy link
Contributor

@willfrey willfrey commented Apr 8, 2020

I think _setup_common_training_handlers(...) is missing its return trainer statement at the end of it. I've added it here.

If this is in error, please just reject and close this.

Fixes #

Description:

Check list:

  • New tests are added (if a new feature is added)
  • New doc strings: description and/or example code are in RST format
  • Documentation is updated (if required)

I think `_setup_common_training_handlers(...)` is missing its `return trainer` statement at the end of it. I've added it here.

If this is in error, please just reject and close this.
@vfdev-5
Copy link
Collaborator

vfdev-5 commented Apr 8, 2020

@willfrey thanks for pointing out, actually all common.setup_common* are working inplace on input trainer : https://github.com/pytorch/ignite/blob/master/examples/references/classification/imagenet/code/scripts/common_training.py#L81

So, I think we need to remove all return trainer. Could you please do this ?

Removed `return trainer` or equivalent statements from the public and helper `setup_xxx(...)` functions.
@willfrey
Copy link
Contributor Author

willfrey commented Apr 8, 2020

I think that should do the trick. I removed the return trainer statements as well as the two return _helper(...) statements in the public setup_common_training_handlers function.

@vfdev-5
Copy link
Collaborator

vfdev-5 commented Apr 8, 2020

Thanks @willfrey ! I fixed flake8

@vfdev-5 vfdev-5 merged commit f5f2833 into pytorch:master Apr 8, 2020
@willfrey
Copy link
Contributor Author

willfrey commented Apr 8, 2020

Thanks! I made the edits directly on here, so the formatting was probably sloppy.

@willfrey willfrey deleted the patch-1 branch April 8, 2020 22:32
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.

2 participants