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 public API export statements #812

Closed
fchollet opened this issue Mar 9, 2023 · 4 comments · Fixed by #814, #815, #816 or #817
Closed

Add public API export statements #812

fchollet opened this issue Mar 9, 2023 · 4 comments · Fixed by #814, #815, #816 or #817
Labels
good first issue Good for newcomers stat:contributions welcome Add this label to feature request issues so they are separated out from bug reporting issues

Comments

@fchollet
Copy link
Collaborator

fchollet commented Mar 9, 2023

We're switching to a packaging system that uses an allowlist for public API symbols. All public API symbols (classes, functions) should be decorated with @keras_nlp_export as follows:

from keras_nlp.api_export import keras_nlp_export

@keras_nlp_export("keras_nlp.layers.FNetEncoder")
class FNetEncoder(keras.layers.Layer):
    ...

Note that these statements include serialization, so you don't need any register_keras_serializable decorator calls anymore.

For an example PR, see https://github.com/keras-team/keras-nlp/pull/811/files

We need to do this for all symbols listed on keras.io: https://keras.io/api/keras_nlp/

@fchollet fchollet added good first issue Good for newcomers stat:contributions welcome Add this label to feature request issues so they are separated out from bug reporting issues labels Mar 9, 2023
@shivance
Copy link
Collaborator

shivance commented Mar 9, 2023

I would like to take up this issue !

@fchollet
Copy link
Collaborator Author

fchollet commented Mar 9, 2023

@shivance awesome -- please open a PR (or multiple PRs for different sections of the API...)

@fchollet
Copy link
Collaborator Author

@shivance with the outstanding PRs, we have everything covered (I think?). Thanks a lot for the help with this!

@shivance
Copy link
Collaborator

@shivance with the outstanding PRs, we have everything covered (I think?). Thanks a lot for the help with this!

Cheers !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers stat:contributions welcome Add this label to feature request issues so they are separated out from bug reporting issues
Projects
None yet
2 participants