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

Refactor ml extension support #1521

Merged
merged 3 commits into from
Mar 10, 2022
Merged

Refactor ml extension support #1521

merged 3 commits into from
Mar 10, 2022

Commits on Mar 7, 2022

  1. Refactor ml extension support

    This makes a few changes, specifically to fasttext, but it can apply to other
    DJL ml wrappers as well. First, it creates several passthrough utility classes
    with the goal that ml models can be loaded through the model zoo and run through
    the predictor.
    
    Next, it modifies the base of the ml construct to better support engines that
    have multiple applications. Each application now manifests as a type of
    SymbolBlock rather than a model. Then, the single model class can run any of
    them. The model is still created for each engine because it contains general
    loading functionality that can determine which block should be used to load the
    given target.
    
    It also has to update the fasttext JNI to support this. First, it fixes the
    modelType to actually return different results. Then, it modifies the
    predictProba method to use an ArrayList instead of an Array. The main difference
    is because it is possible to pass a topk of -1 in order to load all elements.
    However, this doesn't work with the previous array setup.
    
    Change-Id: I5fbaceb2ac4711a942b9d15dac6e6fed386dd46e
    zachgk committed Mar 7, 2022
    Configuration menu
    Copy the full SHA
    c181383 View commit details
    Browse the repository at this point in the history

Commits on Mar 9, 2022

  1. Fix PMD

    Change-Id: I7b03f8958594c01d3ab2f722dbb7a573c6d3109e
    zachgk committed Mar 9, 2022
    Configuration menu
    Copy the full SHA
    46d8e45 View commit details
    Browse the repository at this point in the history
  2. Add TrainFastText utility to aggregate links to training functions

    Change-Id: Iadf598d930dca954ee1a0f450012cd4b4b2baab5
    zachgk committed Mar 9, 2022
    Configuration menu
    Copy the full SHA
    87de7a9 View commit details
    Browse the repository at this point in the history