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

Cleanup API: Refactor request on-complete transition #80

Merged
merged 96 commits into from
Apr 27, 2021

Commits on Mar 31, 2021

  1. Removes vocabs and propogates fixes for breaks

    Jerin Philip committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    138a032 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'main' into jp/marian-decoder-new-output-collector

    Conflicts:
       src/translator/response.cpp -> Bringing to sync with ByteArray updates
       src/translator/response.h -> Bringing to sync with ByteArray updates
    Jerin Philip committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    457fc69 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    28eb098 View commit details
    Browse the repository at this point in the history
  4. 20% of time actual work, 80% prettifying diff

    Jerin Philip committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    2a6b5b2 View commit details
    Browse the repository at this point in the history
  5. Histories members -> poof!

    We however have Histories in constructor, which we will remove out of the way
    soon.
    Jerin Philip committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    63da9bd View commit details
    Browse the repository at this point in the history
  6. First draft of ResponseBuilder

    Jerin Philip committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    f6fbc81 View commit details
    Browse the repository at this point in the history
  7. Draft implementation builds

    Jerin Philip committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    4fe562f View commit details
    Browse the repository at this point in the history
  8. Duplicating functions for surgery at Service

    Jerin Philip committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    208757c View commit details
    Browse the repository at this point in the history
  9. Cut Service, Request open to move ResponseBuilder in

    Jerin Philip committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    e5422c4 View commit details
    Browse the repository at this point in the history
  10. Surgery works! No more broken promises!

    Jerin Philip committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    38f3439 View commit details
    Browse the repository at this point in the history
  11. Probably overdoing appendSentence on annotation

    Jerin Philip committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    ebe9839 View commit details
    Browse the repository at this point in the history
  12. Transplant: ResponseBuilder new flow in

    Jerin Philip committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    0201efc View commit details
    Browse the repository at this point in the history
  13. Applies output collector removal as a single commit

    Jerin Philip committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    5d70aa2 View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2021

  1. Changing Annotation to adhere to [begin, end)

    Jerin Philip committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    ba03154 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a315dc0 View commit details
    Browse the repository at this point in the history
  3. Hotfix with empty string view from EOS

    Jerin Philip committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    0239a5b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4970a62 View commit details
    Browse the repository at this point in the history
  5. Uncommenting important section in unit test

    Jerin Philip committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    7e2b664 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d8d89f3 View commit details
    Browse the repository at this point in the history
  7. Further strengthen and comment unit-tests, mark exactly where empty s…

    …entence is happening
    Jerin Philip committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    f10d6d2 View commit details
    Browse the repository at this point in the history
  8. Changing Annotation to adhere to [begin, end)

    Jerin Philip committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    b86db66 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    095fde7 View commit details
    Browse the repository at this point in the history
  10. Hotfix with empty string view from EOS

    Jerin Philip committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    ff5d61e View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    f43324a View commit details
    Browse the repository at this point in the history
  12. Uncommenting important section in unit test

    Jerin Philip committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    da43a85 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    325b2cc View commit details
    Browse the repository at this point in the history
  14. Further strengthen and comment unit-tests, mark exactly where empty s…

    …entence is happening
    Jerin Philip committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    6947dc4 View commit details
    Browse the repository at this point in the history
  15. Merge branch 'main' of github.com:browsermt/bergamot-translator into …

    …jp/strengthen-annotation
    Jerin Philip committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    83e3290 View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2021

  1. Configuration menu
    Copy the full SHA
    82b87bb View commit details
    Browse the repository at this point in the history
  2. Merge branch 'jp/marian-decoder-new-output-collector' into jp/respons…

    …e-builder
    Jerin Philip committed Apr 2, 2021
    Configuration menu
    Copy the full SHA
    2125106 View commit details
    Browse the repository at this point in the history
  3. Remove marian entities from Response

    Towards #77.
    
    Response previously required marian-deep objects like histories and
    vocabs for construction. It has been decided that this structure needs
    to be exposed and should not have marian-internals. This commit is the
    final nail in the coffin of Response as a marian object concept. The
    construction responsiblity of Response is now moved to a ResponseBuilder
    class.
    Jerin Philip committed Apr 2, 2021
    Configuration menu
    Copy the full SHA
    cb48c79 View commit details
    Browse the repository at this point in the history
  4. Sanitize Request constructor and document properly

    Towards #77.
    
    Reduces Request to require only (Id, Segments, ResponseBuilder). Request is
    an internal structure for Service and *will not be* exposed. However, the
    constructor was in fact dreadful and can now be cleaned up to simplify
    that ResponseBuilder nicely abstracts away the transition process from
    Request -> Response.
    Jerin Philip committed Apr 2, 2021
    Configuration menu
    Copy the full SHA
    62d022c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    512cc3d View commit details
    Browse the repository at this point in the history
  6. Improve Response documentation

    Towards #77.
    Jerin Philip committed Apr 2, 2021
    Configuration menu
    Copy the full SHA
    b63334b View commit details
    Browse the repository at this point in the history
  7. Fixes to documentation

    Jerin Philip committed Apr 2, 2021
    Configuration menu
    Copy the full SHA
    14881dd View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    e388963 View commit details
    Browse the repository at this point in the history
  9. Improve docs for Service external API

    Towards #77.
    
    We improve doxygen compatible documentation for the external API exposed
    by Service. There are constructors using marian internal structures
    (like Options). But there is also a provision of a string (current
    Unified API subsitute for Options) based constructor and should suffice
    for a client who wants to not know of marian internals.
    Jerin Philip committed Apr 2, 2021
    Configuration menu
    Copy the full SHA
    26ed203 View commit details
    Browse the repository at this point in the history
  10. Doxygen prettify Service and Request documentation

    Jerin Philip committed Apr 2, 2021
    Configuration menu
    Copy the full SHA
    42e1ddc View commit details
    Browse the repository at this point in the history
  11. Constructs to make Response members optional

    Towards #77.
    
    Brings in the concept of ResponseOptions, which should be the intended
    outcome of TranslationRequest, providing additional options
    along with the source string describing how to construct Response.
    
    It's currently typedef-ed to Ptr<marian::Options>, and subject to change
    if and when UnifiedAPI can bring it's own proper equivalent.
    
    Through options, ResponseBuilder now has if-guards to construct
    QualityScores or Alignments making it a no-op if the options are unset,
    bringing in the desired feature, albeit with a reinvented wheel
    structure which is not improper.
    Jerin Philip committed Apr 2, 2021
    Configuration menu
    Copy the full SHA
    8f2e84e View commit details
    Browse the repository at this point in the history
  12. Documentation adjustments

    Jerin Philip committed Apr 2, 2021
    Configuration menu
    Copy the full SHA
    41a27c5 View commit details
    Browse the repository at this point in the history
  13. Set default options with sane values

    Jerin Philip committed Apr 2, 2021
    Configuration menu
    Copy the full SHA
    b83026d View commit details
    Browse the repository at this point in the history
  14. Reduce redundancy; default is thin Response

    Service::translate(...) calls Service::translateWithOptions(...) now
    reducing redundancy in the source-code. The default options are
    configured to no-alignments and no quality-scores, bringing down runtime
    by about 30s on WNGT20 set.
    
    service-cli is adjusted to have options so the alignment and quality
    tests are still functional.
    Jerin Philip committed Apr 2, 2021
    Configuration menu
    Copy the full SHA
    b8c1932 View commit details
    Browse the repository at this point in the history
  15. Service: Minor doc adjust

    Jerin Philip committed Apr 2, 2021
    Configuration menu
    Copy the full SHA
    6476519 View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2021

  1. We accept TranslationRequest now, and vector<text>

    Towards #77.
    
    - What was earlier translateWithOptions is now renamed to translate,
      making it a method overload based on arguments.
    - A new translateMultiple is provided, which is blocking. This allows
      the browser to sent separate vector<text> which is queued as a whole,
      but each text maps to a Request each for which there is a Response. This
      is closer to what exists in TranslationModel as of now, except there are
      speed gains from properly batching. translateMultiple accepts
      TranslationRequest as well, although it does nothing with it.
    Jerin Philip committed Apr 3, 2021
    Configuration menu
    Copy the full SHA
    a5501da View commit details
    Browse the repository at this point in the history
  2. Adding comments to flow, some doc improvements

    Jerin Philip committed Apr 3, 2021
    Configuration menu
    Copy the full SHA
    487bfe7 View commit details
    Browse the repository at this point in the history
  3. Update TranslationModel to boost speed

    Towards #77.
    
    This updates TranslationModel to use the new
    Service::translateMultiple(...) API to efficiently pack batches by
    compiling multiple Requests and using only using one translate-dispatch
    call for all Requests.
    
    Due to changes in batching/ordering and consequently difference in
    approximations after quantization, the outputs are now different from those
    earlier (breaking bergamot-translator-app regression-tests) but correct
    nonetheless (regression-tests output now need updating).
    Jerin Philip committed Apr 3, 2021
    Configuration menu
    Copy the full SHA
    32285aa View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2021

  1. First draft of ResponseBuilder

    Jerin Philip committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    c053d2e View commit details
    Browse the repository at this point in the history
  2. Draft implementation builds

    Jerin Philip committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    62cbd5e View commit details
    Browse the repository at this point in the history
  3. Duplicating functions for surgery at Service

    Jerin Philip committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    f1a3f79 View commit details
    Browse the repository at this point in the history
  4. Cut Service, Request open to move ResponseBuilder in

    Jerin Philip committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    e7cb458 View commit details
    Browse the repository at this point in the history
  5. Surgery works! No more broken promises!

    Jerin Philip committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    99a4667 View commit details
    Browse the repository at this point in the history
  6. Probably overdoing appendSentence on annotation

    Jerin Philip committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    773f721 View commit details
    Browse the repository at this point in the history
  7. Transplant: ResponseBuilder new flow in

    Jerin Philip committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    828c6da View commit details
    Browse the repository at this point in the history
  8. Remove marian entities from Response

    Towards #77.
    
    Response previously required marian-deep objects like histories and
    vocabs for construction. It has been decided that this structure needs
    to be exposed and should not have marian-internals. This commit is the
    final nail in the coffin of Response as a marian object concept. The
    construction responsiblity of Response is now moved to a ResponseBuilder
    class.
    Jerin Philip committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    a4be691 View commit details
    Browse the repository at this point in the history
  9. Sanitize Request constructor and document properly

    Towards #77.
    
    Reduces Request to require only (Id, Segments, ResponseBuilder). Request is
    an internal structure for Service and *will not be* exposed. However, the
    constructor was in fact dreadful and can now be cleaned up to simplify
    that ResponseBuilder nicely abstracts away the transition process from
    Request -> Response.
    Jerin Philip committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    e7197a9 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    ed9b83f View commit details
    Browse the repository at this point in the history
  11. Improve Response documentation

    Towards #77.
    Jerin Philip committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    583c343 View commit details
    Browse the repository at this point in the history
  12. Fixes to documentation

    Jerin Philip committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    4a43662 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    2932d53 View commit details
    Browse the repository at this point in the history
  14. Improve docs for Service external API

    Towards #77.
    
    We improve doxygen compatible documentation for the external API exposed
    by Service. There are constructors using marian internal structures
    (like Options). But there is also a provision of a string (current
    Unified API subsitute for Options) based constructor and should suffice
    for a client who wants to not know of marian internals.
    Jerin Philip committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    b79c1bc View commit details
    Browse the repository at this point in the history
  15. Doxygen prettify Service and Request documentation

    Jerin Philip committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    c884e51 View commit details
    Browse the repository at this point in the history
  16. Constructs to make Response members optional

    Towards #77.
    
    Brings in the concept of ResponseOptions, which should be the intended
    outcome of TranslationRequest, providing additional options
    along with the source string describing how to construct Response.
    
    It's currently typedef-ed to Ptr<marian::Options>, and subject to change
    if and when UnifiedAPI can bring it's own proper equivalent.
    
    Through options, ResponseBuilder now has if-guards to construct
    QualityScores or Alignments making it a no-op if the options are unset,
    bringing in the desired feature, albeit with a reinvented wheel
    structure which is not improper.
    Jerin Philip committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    57d1d26 View commit details
    Browse the repository at this point in the history
  17. Documentation adjustments

    Jerin Philip committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    f15b717 View commit details
    Browse the repository at this point in the history
  18. Set default options with sane values

    Jerin Philip committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    fafce99 View commit details
    Browse the repository at this point in the history
  19. Reduce redundancy; default is thin Response

    Service::translate(...) calls Service::translateWithOptions(...) now
    reducing redundancy in the source-code. The default options are
    configured to no-alignments and no quality-scores, bringing down runtime
    by about 30s on WNGT20 set.
    
    service-cli is adjusted to have options so the alignment and quality
    tests are still functional.
    Jerin Philip committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    fd9d2c4 View commit details
    Browse the repository at this point in the history
  20. Service: Minor doc adjust

    Jerin Philip committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    c7400f6 View commit details
    Browse the repository at this point in the history
  21. We accept TranslationRequest now, and vector<text>

    Towards #77.
    
    - What was earlier translateWithOptions is now renamed to translate,
      making it a method overload based on arguments.
    - A new translateMultiple is provided, which is blocking. This allows
      the browser to sent separate vector<text> which is queued as a whole,
      but each text maps to a Request each for which there is a Response. This
      is closer to what exists in TranslationModel as of now, except there are
      speed gains from properly batching. translateMultiple accepts
      TranslationRequest as well, although it does nothing with it.
    Jerin Philip committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    5bf29c1 View commit details
    Browse the repository at this point in the history
  22. Adding comments to flow, some doc improvements

    Jerin Philip committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    583fce6 View commit details
    Browse the repository at this point in the history
  23. Update TranslationModel to boost speed

    Towards #77.
    
    This updates TranslationModel to use the new
    Service::translateMultiple(...) API to efficiently pack batches by
    compiling multiple Requests and using only using one translate-dispatch
    call for all Requests.
    
    Due to changes in batching/ordering and consequently difference in
    approximations after quantization, the outputs are now different from those
    earlier (breaking bergamot-translator-app regression-tests) but correct
    nonetheless (regression-tests output now need updating).
    Jerin Philip committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    3fb44bd View commit details
    Browse the repository at this point in the history
  24. Updating marian-dev, looks like submodules are a pain

    Jerin Philip committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    d0a907e View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2021

  1. Merge branch 'main' into jp/response-builder

    Jerin Philip committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    52e0095 View commit details
    Browse the repository at this point in the history

Commits on Apr 16, 2021

  1. Merge branch 'main' into jp/response-builder

    Jerin Philip committed Apr 16, 2021
    Configuration menu
    Copy the full SHA
    2929de6 View commit details
    Browse the repository at this point in the history

Commits on Apr 21, 2021

  1. Merge branch 'main' into jp/response-builder

    Jerin Philip committed Apr 21, 2021
    Configuration menu
    Copy the full SHA
    b5363b8 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'jp/response-builder' of github.com:browsermt/bergamot-t…

    …ranslator into jp/response-builder
    Jerin Philip committed Apr 21, 2021
    Configuration menu
    Copy the full SHA
    dfde262 View commit details
    Browse the repository at this point in the history
  3. Printer: Consolidate printing Response utils at one place

    Jerin Philip committed Apr 21, 2021
    Configuration menu
    Copy the full SHA
    0dc0cae View commit details
    Browse the repository at this point in the history
  4. Adding print_utils files

    Jerin Philip committed Apr 21, 2021
    Configuration menu
    Copy the full SHA
    666b15d View commit details
    Browse the repository at this point in the history
  5. cleaning a few unnecessary functions

    Jerin Philip committed Apr 21, 2021
    Configuration menu
    Copy the full SHA
    dbad655 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2021

  1. Removing now empty response.cpp

    Jerin Philip committed Apr 22, 2021
    Configuration menu
    Copy the full SHA
    f7c82e3 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'main' into jp/response-builder

    Jerin Philip committed Apr 22, 2021
    Configuration menu
    Copy the full SHA
    c2f8790 View commit details
    Browse the repository at this point in the history
  3. Revert "cleaning a few unnecessary functions"

    This reverts commit dbad655.
    Jerin Philip committed Apr 22, 2021
    Configuration menu
    Copy the full SHA
    01aeaa0 View commit details
    Browse the repository at this point in the history
  4. Revert "Adding print_utils files"

    This reverts commit 666b15d.
    Jerin Philip committed Apr 22, 2021
    Configuration menu
    Copy the full SHA
    6abad1c View commit details
    Browse the repository at this point in the history
  5. Revert "Printer: Consolidate printing Response utils at one place"

    This reverts commit 0dc0cae.
    Jerin Philip committed Apr 22, 2021
    Configuration menu
    Copy the full SHA
    dcf8491 View commit details
    Browse the repository at this point in the history
  6. Merge branch 'jp/response-builder' of github.com:browsermt/bergamot-t…

    …ranslator into jp/response-builder
    Jerin Philip committed Apr 22, 2021
    Configuration menu
    Copy the full SHA
    7b1f18a View commit details
    Browse the repository at this point in the history
  7. Merge branch 'main' into jp/response-builder

    Jerin Philip committed Apr 22, 2021
    Configuration menu
    Copy the full SHA
    4a83104 View commit details
    Browse the repository at this point in the history
  8. Adding ResponseOptions to service-cli-bytearray

    Jerin Philip committed Apr 22, 2021
    Configuration menu
    Copy the full SHA
    ca48e9b View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2021

  1. Undoing service-cli autoformat

    Jerin Philip committed Apr 23, 2021
    Configuration menu
    Copy the full SHA
    ca9e6c5 View commit details
    Browse the repository at this point in the history
  2. undoing style stuff on service.cpp

    Jerin Philip committed Apr 23, 2021
    Configuration menu
    Copy the full SHA
    6dd5f29 View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2021

  1. ResponseOptions is now a struct with default construction

    Jerin Philip committed Apr 26, 2021
    Configuration menu
    Copy the full SHA
    ee398d8 View commit details
    Browse the repository at this point in the history
  2. Adding responseOptions.h file

    Jerin Philip committed Apr 26, 2021
    Configuration menu
    Copy the full SHA
    959be6c View commit details
    Browse the repository at this point in the history
  3. Adding documentation

    Jerin Philip committed Apr 26, 2021
    Configuration menu
    Copy the full SHA
    bd0e20f View commit details
    Browse the repository at this point in the history
  4. Elaborating alignmentThreshold documentation

    Jerin Philip committed Apr 26, 2021
    Configuration menu
    Copy the full SHA
    d000d8a View commit details
    Browse the repository at this point in the history
  5. Remove move constructor; Using default

    Jerin Philip committed Apr 26, 2021
    Configuration menu
    Copy the full SHA
    e33a22e View commit details
    Browse the repository at this point in the history
  6. Remove constructors from Response

    Well, was easy deleting a bunch of lines of code to get things to work.
    Jerin Philip committed Apr 26, 2021
    Configuration menu
    Copy the full SHA
    7c8157b View commit details
    Browse the repository at this point in the history
  7. Merge branch 'main' into jp/response-builder

    Jerin Philip committed Apr 26, 2021
    Configuration menu
    Copy the full SHA
    7a5acbb View commit details
    Browse the repository at this point in the history
  8. C++ style initializer list for struct

    Jerin Philip committed Apr 26, 2021
    Configuration menu
    Copy the full SHA
    8a61d79 View commit details
    Browse the repository at this point in the history
  9. Manually fixing merge submodule weirdness

    Jerin Philip committed Apr 26, 2021
    Configuration menu
    Copy the full SHA
    b8b1b19 View commit details
    Browse the repository at this point in the history