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

Add types to keras functions/classes/methods #555

Closed
gabrieldemarmiesse opened this issue Jun 16, 2022 · 5 comments
Closed

Add types to keras functions/classes/methods #555

gabrieldemarmiesse opened this issue Jun 16, 2022 · 5 comments
Assignees

Comments

@gabrieldemarmiesse
Copy link
Contributor

System information.

TensorFlow version (you are using): 2.9.1
Are you willing to contribute it (Yes/No) : Yes

Describe the feature and the current behavior/state.

Currently, when using an IDE (e.g. pycharm in my case), there is not types checks/type help when using keras functions, methods and classes instanciation.

Will this change the current api? How?
No change in the api and behavior

Who will benefit from this feature?
Everyone using an IDE/mypy

Contributing

  • Do you want to contribute a PR? (yes/no): Yes
  • If yes, please read this page for instructions
  • Briefly describe your candidate solution(if contributing): Progressively adding types to the codebase.

I don't think that we can use mypy to check in the CI if the types we're adding are corrects, because 1) it has too many false positives, 2) requires a significant amount of code to be typed before giving useful errors.

If you are interested we can use something like typeguard in the CI only to check if our types are correct.

@gabrieldemarmiesse
Copy link
Contributor Author

I made a small PR that should serve as exemple.

@gabrieldemarmiesse
Copy link
Contributor Author

To be clear, this issue is only about typing the public API, not the whole codebase.

@gadagashwini
Copy link
Contributor

Hi @gabrieldemarmiesse, Associated PR got merged can we close this issue. Thank you!

@gabrieldemarmiesse
Copy link
Contributor Author

Hi, i only typed a small part of the public api. I believe this issue must stay open as long as the public api is not typed

@SuryanarayanaY
Copy link
Contributor

Hello, Thank you for reporting an issue.

We're currently in the process of migrating the new Keras 3 code base from keras-team/keras-core to keras-team/keras.
Consequently, This issue may not be relevant to the Keras 3 code base . After the migration is successfully completed, feel free to reopen this Issue at keras-team/keras if you believe it remains relevant to the Keras 3 code base. If instead this Issue is a bug or security issue in legacy tf.keras, you can instead report a new issue at keras-team/tf-keras, which hosts the TensorFlow-only, legacy version of Keras.

To know more about Keras 3, please read https://keras.io/keras_core/announcement/

@fchollet fchollet transferred this issue from keras-team/keras Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants