Skip to content

How to save SuffixDecodingCache for future use? #261

@veritas9872

Description

@veritas9872

Dear authors,
Thank you for the awesome project.
I have been trying it out, and I would like to ask if it is possible to save the SuffixDecodingCache object for future use.

The background is as follows.
I have some data that I expect is similar to my requests, and I would like to save the SuffixDecodingCache object trained on this data for use in a different session instead of having to train it on new incoming data every time.

However, when I tried to save the results using pickle, I found that the following code failed because arctic_inference.suffix_decoding._C.SuffixTree was unpicklable.

with open(save_name, mode="xb") as pf:
    pickle.dump(suffix_cache, pf, protocol=pickle.HIGHEST_PROTOCOL)

Is there any method of saving a trained SuffixDecodingCache object for future use? The current implementation seems to only work for a single process.

Many thanks in advance for any help on this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions