-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Change the return type of tune() in trainer.py to TypedDict
#13631
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
Conversation
for more information, see https://pre-commit.ci
tune() in trainer.py to TypedDicttune() in trainer.py to TypedDict
tune() in trainer.py to TypedDicttune() in trainer.py to TypedDict
carmocca
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool!
Co-authored-by: Carlos Mocholí <[email protected]>
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some tests seem to be not happy with NotRequired. It seems, our typing_extensions might be too old, since we require >=4.0.0, but according to this, there was a fix for making NotRequired available within __all__ only in 4.1.0
|
Then let's upgrade the minimum |
What does this PR do?
Change the type of return of
tune()inpytorch_lightning/trainer/trainer.pytoTypedDict. (related to #13616 and #13445)More precisely, a new type
_TunerResult, as suggested by @carmocca in #13616, has been defined inpytorch_lightning/tuner/tuning.pyand assigned to the output oftune().Does your PR introduce any breaking changes? If yes, please list them.
Before submitting
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:
Did you have fun?
Make sure you had fun coding 🙃