Commit Graph

175 Commits

Author SHA1 Message Date
Jerin Philip
65e7406970 Comments and lazy stuff to response 2021-02-16 17:00:53 +00:00
Motin
d907400a80 Updated test page to use the model structure from bergamot-models repo 2021-02-16 17:00:45 +02:00
Motin
b1e72ce75e Updated instructions on how to get all relevant models in place for the upcoming release 2021-02-16 15:46:15 +02:00
Abhishek Aggarwal
921c2eedf8 Updated config for min inference time
- This combination gives min inference time (~ 200 WPS)
   on local machine
2021-02-16 14:39:42 +01:00
Jerin Philip
d5a5e75451 Renaming variables; Enhancing documentation 2021-02-15 20:21:10 +00:00
Abhishek Aggarwal
c5c5339489 Re-enable simd shuffle pattern for intgemm compilation 2021-02-15 17:18:59 +01:00
Abhishek Aggarwal
3607523c24 Enabled COMPILE_WITHOUT_EXCEPTIONS for marian submodule 2021-02-15 16:54:50 +01:00
Abhishek Aggarwal
0374ac4696 Updated marian submodule
- Includes try/catch free builds
 - Has ASSERTION=0 and DISABLE_EXCEPTION_CATCHING=1 for wasm builds
2021-02-15 16:36:26 +01:00
Jerin Philip
ca6ca154b9 Changing fn name from enqueue to produceTo(pcqueue) 2021-02-15 15:22:31 +00:00
abhi-agg
fc3ab33277
Merge pull request #26 from motin/wasm-integration
Turn of assertions and disable exception catching for wasm builds
2021-02-15 14:21:18 +01:00
Motin
9a5cf30bbb Revert "Enabled simd shuffle pattern for intgemm compilation"
This reverts commit 3dd7a60b35.
2021-02-15 15:03:00 +02:00
Motin
9a5ae9568e Turn of assertions and disable exception catching for wasm builds 2021-02-15 14:24:59 +02:00
Motin
91e45cb4f0 Prepend shortlist path with / 2021-02-15 13:59:49 +02:00
Abhishek Aggarwal
3dd7a60b35 Enabled simd shuffle pattern for intgemm compilation
- WORMHOLE cmake option is set to ON when compiling for WASM
 - WASM module might not run on Chrome
2021-02-15 12:58:18 +01:00
Motin
64d57d8aa0 Use yaml for modelConfig on test page 2021-02-15 13:50:59 +02:00
Motin
7d6346d3b0 Add model config used in pr6 benchmarks 2021-02-15 13:35:22 +02:00
Motin
f3ff1d29ae Make modelConfig an object instead of string (less likelihood of typos) 2021-02-15 13:30:46 +02:00
Motin
fcc998ffa4 Add 10 lines of esen benchmark sentences to test page 2021-02-15 13:30:07 +02:00
Motin
1e94d78c4d Formatting 2021-02-15 13:19:39 +02:00
Motin
da56501c4f Finally found the original typo that made it appear as if loading the model in the test page was faster than elsewhere - the lexical shortlist was not being included at the right place in the model config 2021-02-15 13:10:10 +02:00
Motin
70bdcd4365 Fix typo from when fixing typo 2021-02-15 12:54:32 +02:00
Motin
dbdcdab115 Avoid use of unsafe eval in glue code 2021-02-15 11:59:03 +02:00
Motin
77f39545f3 Add time it takes to arrive to preRun to test page 2021-02-15 11:30:45 +02:00
Motin
49ad6514ae Add reproducible docker-based builds + let test page use these by default 2021-02-15 11:27:47 +02:00
Motin
7030fa0157 Ignore test page bundled artifacts 2021-02-15 11:25:13 +02:00
Motin
e50dd0909f Ignore contents in models directory 2021-02-15 11:23:08 +02:00
Motin
53e0b9fc5c Fix typo in lexical shortlist argument on test page 2021-02-15 11:22:23 +02:00
Motin
a33b3a3bb5 Add instructions on how to assemble and package the set of files expected by the test page 2021-02-15 11:21:36 +02:00
Motin
28c0ab2e04 Tweak words per second metric in the test page log 2021-02-15 10:38:36 +02:00
Motin
d3969bcd2d Add support for translating multiple sentences on the test page + report words per second metric in the log 2021-02-15 10:34:57 +02:00
Motin
26ea5bba7a Some cleanup 2021-02-15 10:26:04 +02:00
Motin
f7c86518cf Update test page package-lock.json 2021-02-15 10:04:49 +02:00
Motin
d27a96fc53 Updated wasm readme 2021-02-15 10:04:15 +02:00
Jerin Philip
45a8309c69 Missed translation_result -> response rename 2021-02-14 22:28:08 +00:00
Jerin Philip
be455a3da1 Straightening multithreading in translator workers
BatchTranslators are now held in Service. Threads are separate, and
constructed via lambdas. Retaining BatchTranslator class and member
function (Probably a matter of taste I guess).

This should eliminate complaints in (#10), hopefully.
2021-02-14 22:14:01 +00:00
Jerin Philip
370e9e2fb6 {translation_result -> response}.h; propogates; 2021-02-14 20:37:46 +00:00
Jerin Philip
0fc6105df4 No more two TranslationResults (sort-of)
To avoid confusion, this commit renames
marian::bergamot::TranslationResult -> marian::bergamot::Response.
Usages of marian::bergamot::TranslationResults are updated across the
source to be consistent with the change and get source back working.
2021-02-14 20:27:53 +00:00
Jerin Philip
5bd4a1a3c0 Refactor: marian-TranslationResult and associated
marian-TranslationResult has more guards in place. Switching to a
construction on demand model for sentenceMappings. These changes
propogate to bergamot translation results.

Integration broke with the change in marian's internals, which are
updated accordingly to get back functionality.

Changes revealed a few bugs, which are fixed:

- ConfigParser already discovered in wasm-integration
  (a06530e92b).
- Lambda captures and undefined values in DeviceId
2021-02-14 20:05:02 +00:00
Andre Natal
0dbc8612c2 Adding missing bergamot-httpserver.js 2021-02-14 09:55:29 -08:00
Jerin Philip
ecc91c51e3 BatchTranslator* -> unique_ptr<BatchTranslator> 2021-02-14 13:23:46 +00:00
Jerin Philip
47323d21b9 Getting rid of unused variables in Batch 2021-02-14 13:05:05 +00:00
Andre Natal
1e413f71cd Including a more elaborated test page, a node webserver containing the proper cors headers and wasm mimetype 2021-02-13 18:23:25 -08:00
Jerin Philip
e585a9e786 Sanitizing Batch construction
Batch Ids cannot be set by outside classes to values < 0.

Batch.Id_ =
    -1 : Poison, for use in PCQueue
     0 : Default constructed, invalid batch.
    >0 : Legit batch.

Book-keeping for batch metrics (maxLength, numTokens, etc) and logging
are now moved to Batch. Batch is now a class instead of a struct with
accessors controlling how members can be modified to suit above.
2021-02-13 16:31:30 +00:00
Jerin Philip
73a56a8f4f Refactoring batching-mechanisms into Batcher
Guided by an objective to  move batching mechanism and queueing request
to generate batches into a diffenrent thread. This commit is in
preparation for this functionality.

First, PCItem from the looks of it is *Batch*. Renamed to reflect the
same. Fingers crossed, hopefully no naming conflicts with marian.
BatchTranslator translates a "Batch" now, instead of
vector<RequestSentence>. Additional data members are setup at Batch to
enable development.

Workflows previously in Service, but more adequate in Batcher are now
moved, preparing to move Batcher/enqueuing of a request into a new
thread making it non-blocking. This will allow service to queue requests
into the batcher thread and exit, without waiting until the full-request
is queued.

Batcher now has a path with and without pcqueue.
2021-02-13 15:48:23 +00:00
Jerin Philip
77a600b637 Removing join() (#10) 2021-02-13 14:19:10 +00:00
Jerin Philip
f1d9f67b56 single-threaded run with --cpu-threads 0 (#10) 2021-02-13 11:43:25 +00:00
Jerin Philip
4764f11e95 Move BatchTranslator::thread_ to Service (#10)
Service now holds an std::vector<std::thread> instead of
BatchTranslators.
2021-02-13 10:55:07 +00:00
Andre Natal
47db65972c
Update README.md 2021-02-12 17:18:57 -08:00
Andre Natal
a97bf7b504
Update README.md 2021-02-12 17:00:12 -08:00
Andre Natal
3a53a68444
Update README.md
updating  `--recursive`  on wasm instructions too
2021-02-12 15:41:17 -08:00