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

Multiple TranslationModels Implementation #210

Merged
merged 105 commits into from
Sep 21, 2021

Conversation

jerinphilip
Copy link
Contributor

@jerinphilip jerinphilip commented Jul 30, 2021

Fixes #209. Please note that accompanying changes in BRT (browsermt/bergamot-translator-tests#43) will have to be reviewed in context of this PR.

  • Separate TranslationModel, Threaded vs Non-Threaded workflows operating with TranslationModel
  • WASM Bindings temporary editing to get green on CI. Let's pretend this works (it most likely does, FWIW).
  • Marian's config-parsing doesn't support multiple configs to be used in non-trivial workflows (pivoting, multiple models; marian --configs is nested env); CLI Rework. Bergamot has it's own CLI now. Individual TranslationModel configs are supplied as --model-configs <path> for testing purposes. Library code can load from std::string &config or Ptr<Options> options = TranslationModel::Config as before.
  • Tests in BRT for Outbound translation, demonstrating the modifications work for Outbound Translation Requirements #78.

@jerinphilip jerinphilip changed the title Multiple TranslationModels Multiple TranslationModels Implementation Aug 3, 2021
Jerin Philip added 6 commits August 5, 2021 12:08
Should work for both BatchingPool and AggregateBatchingPool. This
ensures that what previously worked with BatchingPool should work with
AggregateBatchingPool as well.
Jerin Philip added 4 commits August 6, 2021 11:25
Two different state-machines are in separate classes now:

 * BlockingService: Blocking and operations happening sequentially. This
   class is Service for WASM.
 * AsyncService: Asynchronous and operates through callbacks.
   Multithreading used to achieve async operations.

The thread-safe wrapper for batching-pool has been reset to wrap around
the underlying container, unifying API in both while maintaining
differenet arguments. Access to the unsafe underlying storage is
forbidden in AsyncService through making the container private in the
wrapped class.
Copy link
Member

@kpu kpu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unbounded memory consumption.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiple Translation models
3 participants