Skip to content

Add public API export statements #812

@fchollet

Description

@fchollet

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/

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomersstat:contributions welcomeAdd this label to feature request issues so they are separated out from bug reporting issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions