-
Notifications
You must be signed in to change notification settings - Fork 40
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
Streamline memory-bundle loads #307
Conversation
Changes the shortlist loading operation to try bundle, if it fails switchover to config based path.
The following are from jerinphilip/lemonade#43, would appreciate if someone tested with translateLocally and let know if things work. With shortlist:
Shortlist entries commented:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested it from TranlateLocally while removing the shortlist from a model. Translation still loads and works afterwards. Any other (invalid) changes to the model config still cause an error to popup, so that's good.
Provides an additional constructor which takes care of the bundle loading inside the boundary of the source here, when a configuration file is supplied from a client like translateLocally or python bindings. Once the config file is read, we have access to the information required to construct the
MemoryBundle
.app/bergamot
is configured to use the fast-load path now.getModelMemoryFromConfig
.Fixes #304.
Fixes #306.
See also: XapaJIaMnu/translateLocally#82.
PS: There is a need to refactor of
byte_array_utils
, aggressive reduction of paths and branches and consolidation of existing fragmented functions into manageable classes, but keeping this PR minimal to simplify review.