predict.py File Requirements

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide

When providing a predict.py file for any log_model function, the file must meet these requirements:

  • File Name: The file must be named predict.py.

  • File Location: predict.py must reside within the code_dir directory hierarchy. This includes being a direct child of code_dir or in any of its subdirectories.

  • Function Signature: Must contain a function with the exact signature def predict (<param1>, <param2> **kwargs>)

    • Signature must start with def predict( and end with **kwargs)

    • Signature must have exactly two parameters between predict( and **kwargs)

    • Each parameter must contain at least one non-whitespace character and cannot contain a comma

    • Flexible whitespace is allowed around keywords, parentheses, and commas