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
Merged
Changes from 1 commit
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
47ddedf
Adding a TranslationModel implementation
Jul 30, 2021
db2b8db
Projected service methods to take arg: TranslationModel
Jul 30, 2021
c715b48
Prettify: CallbackType alias, some ifdef fixes
Jul 30, 2021
7492f8b
Code runs without SIGSEGV now, transfer to TranslationModel functional
Jul 30, 2021
7a6d3b5
BatchTranslator class is removed, long live TranslationModel?!
Jul 30, 2021
33ff241
loadBackend(...) separated, should improve diff view
Jul 30, 2021
f2e50be
Removing default arguments and making illegal values aborts
Jul 30, 2021
7481579
Translation& -> shared_ptr<...>; If it's in the process, it shouldn't…
Jul 30, 2021
c90ecd7
BatchingPool (previously Batcher) aggregation with AggregateBatchingPool
Jul 31, 2021
b9e3b62
Still carrying WASM/blocking workflow
Jul 31, 2021
99d3e47
We *really* should get rid of these multiple ifdef paths
Jul 31, 2021
68f13a3
WASM_COMPATIBLE_SOURCE=on|off double build exercise
Jul 31, 2021
ab44bee
[empty-commit] Breaking API after this
Jul 31, 2021
59f8c58
translate(string, opts) -> translate(model, string, opts)
Jul 31, 2021
5363998
Batcher -> BatchingPool; addWholeRequest -> addRequest, because we do…
Jul 31, 2021
22a591b
Fixing semantics; typedef <thread-unsafe-something> Threadsafe<someth…
Jul 31, 2021
cb11583
Renaming files to reflect classes included and reorg
Aug 5, 2021
979501c
Adding renamed files and fixing includes
Aug 5, 2021
fa1cfc5
Empty comment line removal
Aug 5, 2021
07bb9d5
Isolate properly: Explicit shutdown is only required for the thread-b…
Aug 5, 2021
bdb610e
More reorg + doc for translation_model.h
Aug 5, 2021
48a28c2
ThreadsafeBatcher templated for BatchingPool type
Aug 5, 2021
a53c44c
Adding comments to explain the template based generalization
Aug 6, 2021
dc3f1ab
Service comments marking Async/Blocking common code
Aug 6, 2021
d098988
de-collapse: (Async + Blocking) * Service
Aug 9, 2021
b78a2f5
Removing possibly unnecessary WASM_COMPATIBLE_SOURCE
Aug 9, 2021
ba8d8c9
Keeping the translateMultiple name, do not want confusion with translate
Aug 9, 2021
b54afe9
Parity on both Services
Aug 9, 2021
b6b8b08
Removing another #ifdef
Aug 9, 2021
eda8742
TranslationModel: Documentation, associated reorg
Aug 10, 2021
314bf24
addRequest -> enqueueRequest
Aug 10, 2021
9c397cd
More documentation updates
Aug 10, 2021
fdabf20
weak_ptr to shared_ptr, no orphan request/batches in flight
Aug 10, 2021
dfacb6f
oversight bug fix: load into supplied translation-model
Aug 10, 2021
3686c37
Alter output param receieved only atomically
Aug 10, 2021
cebb64d
Removing cruft; Treating different classes differently
Aug 10, 2021
78c58e6
TranslationModel: doc modifications
Aug 10, 2021
1265c1a
(Async + Blocking) * Service: Documentation updates
Aug 10, 2021
7fd2a3b
Reset attempt to remove unused config
Aug 10, 2021
bdd78a0
AggregateBatchingPool: Documentation
Aug 10, 2021
2774425
Fix AggregateBatchingPool::generateBatch; Need tests in BRT
Aug 10, 2021
a0d622c
Newline after doc
Aug 10, 2021
3083986
Multiple models CLI Rework
jerinphilip Aug 11, 2021
d004dd5
Merge branch 'main' into multiple-models
Aug 11, 2021
0b35c64
[brt]: Sync with BRT main
Aug 11, 2021
b2fca95
Provide a compatible with Service constructor for TranslationModel
Aug 11, 2021
3df5694
APP_ prefix, because someone did #define WASM 1
Aug 11, 2021
d1a660d
[wasm-bindings]: Attempt to get shared_ptr to compile
Aug 11, 2021
d55cc99
[wasm-bindings] using marian::bergamot::MemoryBundle to simplify syntax
Aug 11, 2021
6f9da81
[wasm-bindings] using marian::bergamot::TranslationModel
Aug 11, 2021
eaf0f9e
[wasm-bindings] Missing std::string config argumnet
Aug 11, 2021
dfaf1af
[wasm-bindings] Adding a TranslationModelFactory in an attempt to fix…
Aug 11, 2021
078b9b3
[wasm-bindings] Trying aliasing a different fn to avoid template trou…
Aug 11, 2021
b6f41b4
[wasm-bindings] Cleaner attempt without templates
Aug 11, 2021
7f71f51
[wasm-bindings] Adjustments based on emcc github CI output
Aug 11, 2021
8e480cf
[wasm-bindings] Using free fn instead of a lambda, perhaps lambda is …
Aug 11, 2021
ad1b086
[wasm-bindings] std::function variation, Ptr->shared_ptr
Aug 11, 2021
a2ef402
Revert "[wasm-bindings] std::function variation, Ptr->shared_ptr"
Aug 11, 2021
f1eee0e
Ptr -> shared_ptr, using self.createCompatibleModel
Aug 11, 2021
8b4c68a
[wasm-bindings] Trying the other shared_ptr way, always shared_ptr
Aug 11, 2021
105aacf
[wasm-bindings] Allow raw pointers because AlignedMemory*
Aug 11, 2021
b412e66
[wasm-bindings] Factor for a shared_ptr constructor
Aug 11, 2021
ee46005
[wasm-bindings] allow_raw_pointers because args are still T*
Aug 11, 2021
122fbb2
[wasm-bindings] Just some function reorg
Aug 11, 2021
1614562
The last #ifdef WASM_COMPATIBLE_SOURCE
Aug 11, 2021
9a15410
[wasm-bindings] Fixing dumb reorg
Aug 11, 2021
e1af355
Adding a forward backward test and parameterizing by service, models
Aug 12, 2021
77ba1e6
[brt]: Add en-es and a test script, still missing ssse3
Aug 12, 2021
6312ae5
[brt]: ssse3 outputs on lofn
Aug 12, 2021
6cb4583
Removing obsolete fn declaration, translateFromStdin
Aug 12, 2021
3644b2f
Move version() into handleSpecialOptions, add doc
Aug 13, 2021
117bb3f
Make path adjustments conditional on path supplied being no-op, docs
Aug 13, 2021
2328e22
Merge branch 'main' into multiple-models
jerinphilip Aug 13, 2021
b24572b
Merge branch 'main' into multiple-models
Aug 13, 2021
a2ef6c6
Sync with remote
Aug 13, 2021
a4bdcdd
Separating conversion from bergamot batch to marian library batch
Aug 26, 2021
7b04cef
Introducing config objects for Services to hold incoming config data
Aug 30, 2021
6004a70
Update wasm bindings to compile
Aug 30, 2021
7514322
BRT: Revertingsome graph separation attempts
Sep 9, 2021
2a92f66
Merge branch 'main' into multiple-models
Sep 9, 2021
86bce45
BRT: Pick Mac SSSE3 outputs instead of Ubuntu tempoary fix
Sep 9, 2021
6882c9d
Default behaviour of paragraph splitting brought back
Sep 15, 2021
bc120f8
Merge branch 'main' into multiple-models
Sep 16, 2021
f14cb98
Update clang-format for styles
Sep 16, 2021
bc784a0
BRT: Sync QE tests with multimodel
Sep 16, 2021
53a240a
Updating parser to make quality relative option
Sep 16, 2021
9b73089
BRT: skip-cost true in config patch py script
Sep 16, 2021
b09e2fc
Empty commit to trigger submodule push and sync
Sep 16, 2021
8535fea
BRT: Update outputs bulk with shortlist enabled
Sep 16, 2021
257d681
BRT: Mac Outputs fixed with shortlist enabled from GitHub CI
Sep 16, 2021
854ae37
BRT: Make package bash variable consistent with rest
Sep 16, 2021
e171d2a
Fix unnecessary renaming: Guarded<> -> ThreadSafe
Sep 20, 2021
b62ac91
Comments now say AggregateBatchingPool is not thread-safe
Sep 20, 2021
af99767
model being nullptr no longer checked, only written as output;
Sep 20, 2021
0a6c926
ShortlistGenerator is not shared with the backend, only (scorer, grap…
Sep 20, 2021
4ae279d
Can avoid New<BeamSearch> putting it on stack
Sep 20, 2021
680141c
Remove confusing oldcode remnants and unsuitable coding style
Sep 20, 2021
db0af86
Update docs explaining workarounds for leak of numWorker between Tran…
Sep 20, 2021
3a165f5
Using unordered_set instead of queue inorder to avoid invalid requests
Sep 20, 2021
3cb2117
Make HashPtr generic on address, documentation comments
Sep 21, 2021
c8ff2a3
BRT: Update submodule to point to main
Sep 21, 2021
bf19340
Merge branch 'multiple-models' of github.com:jerinphilip/bergamot-tra…
Sep 21, 2021
357c03b
Fixing WNGT20 speed tests: using stderr,stdout instead of marian log,…
Sep 21, 2021
5b07e49
Remove redundant default supply, only one point where ssplit-mode is …
Sep 21, 2021
0328abd
Batcher -> BatchingPool file renames and some documentation updates f…
Sep 21, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Code runs without SIGSEGV now, transfer to TranslationModel functional
Jerin Philip committed Jul 30, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 7492f8b5eb35f28573b1733703ead956e597a6eb
1 change: 1 addition & 0 deletions src/translator/batch_translator.cpp
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@ TranslationModel::TranslationModel(Ptr<Options> options, MemoryBundle &&memory,
memory_(std::move(memory)),
vocabs_(options, std::move(memory_.vocabs)),
textProcessor_(options, vocabs_, std::move(memory_.ssplitPrefixFile)) {
backend_.resize(replicas);
// ShortList: Load from memoryBundle or options
for (size_t idx = 0; idx < replicas; idx++) {
// Aliasing to reuse old code.