Skip to content

Use cache for inference with TextEncoder #1554

@Vincent-Maladiere

Description

@Vincent-Maladiere

Currently, when we cross-validate the number of components of the PCA used by TextEncoder, or simply when we use TextEncoder in a pipeline being cross-validated, TextEncoder recomputes all embeddings, although they could have been previously computed.

By using a joblib Memory caching, we would be able to compute the embedding of an input X only once in such situations. Note, however, that caching would not work when shuffling the input data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions