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

add: Make function_name parametrized #166

Merged

Commits on Feb 13, 2020

  1. add: Make function_name parametrized

    * Currently `m2cgen` generates a module in various languages that has a
      "score"/"Score" function/method. This is not always desirable, as many
      of the trained modules that are to be exported may provide their
      prediction via API functions with different names (such as `predict`).
    
    * This commit adds a way of specifying the name of the function both via
      the CLI and in the exporters (that is, in the `export_to_` funcitons)
      by specifying the `function_name` option/parameter while keeping the
      default set to "score"/"Score" for backwards compatilibity.
    
    Signed-off-by: mr.Shu <mr@shu.io>
    mrshu committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    afbd840 View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2020

  1. tests: Add function name to mock args

    * Add `function_name` to mock CLI args to be used in the tests.
    
    Signed-off-by: mr.Shu <mr@shu.io>
    mrshu committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    8695dd0 View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2020

  1. tests: Test for the function_name CLI option

    * Add a test for the `--function_name` CLI option.
    
    Signed-off-by: mr.Shu <mr@shu.io>
    mrshu committed Feb 15, 2020
    Configuration menu
    Copy the full SHA
    9e848c9 View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2020

  1. interpreters: Actually use function_name

    * Make sure function_name is actually used in the interpreters.
    
    Signed-off-by: mr.Shu <mr@shu.io>
    mrshu committed Feb 17, 2020
    Configuration menu
    Copy the full SHA
    9fdc02a View commit details
    Browse the repository at this point in the history
  2. docstrings: Make function_name end with a dot

    * Make sure that the `function_name` docstring ends with a dot rather
      than the default value.
    
    * Add dot to various CLI argument's help messages.
    
    Signed-off-by: mr.Shu <mr@shu.io>
    mrshu committed Feb 17, 2020
    Configuration menu
    Copy the full SHA
    403d7a1 View commit details
    Browse the repository at this point in the history

Commits on Feb 19, 2020

  1. cli: Use default function_name from exporters

    * Make sure the default function_name (when not provided via arguments)
      gets backpropagated from the actual function definitions (in other
      words, make sure that the keyword arguments are respected when the
      function_name is not specified via CLI).
    
    Signed-off-by: mr.Shu <mr@shu.io>
    mrshu committed Feb 19, 2020
    Configuration menu
    Copy the full SHA
    67c029f View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2020

  1. cli: Add a comment on function_name

    * Add a comment on function_name being conditionally set later.
    
    Signed-off-by: mr.Shu <mr@shu.io>
    mrshu committed Feb 20, 2020
    Configuration menu
    Copy the full SHA
    6c2a081 View commit details
    Browse the repository at this point in the history