-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Adding some types hints. #856
Adding some types hints. #856
Conversation
Here is an overview of what got changed by this pull request: Issues
======
- Added 1
See the complete overview on Codacy |
@haifeng-jin I believe that adding type hints is a safe move. It doesn't have any runtime consequences. From the pep:
Adding some tool on top of it might. But this PR is focused only on type hints. I believe it is safe to merge an doesn't necessitate a review from @fchollet or @omalleyt12 . |
@gabrieldemarmiesse |
Ok, it doesn't hurt to have another opinion :) |
Also if we decide to type the API surface and do runtime type checks, I'd be happy to implement it :) |
What are some potential issues? |
I don't know. |
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.
I am merging it. It would be great if you can continue to work on adding type hints to other classes in task.py and auto_model.py. Thank you! @gabrieldemarmiesse
See the PR keras-team/keras-tuner#163 . If we don't need to support python 2, this should be fine to do it. The types are already displayed in the function signature in the docs, but I plan to also add them in the text description automatically with keras-autodoc. Here is what it looks like right now: