eto-ai / rikai

Parquet-based ML data format optimized for working with unstructured data
https://rikai.readthedocs.io/en/latest/
Apache License 2.0
138 stars 19 forks source link

allow users to set default options for mlflow registry models #205

Open changhiskhan opened 3 years ago

changhiskhan commented 3 years ago

To help users take advantage of rikai for their existing mlflow models, we want to make it easier for them to bring those into the catalog. In particular, we want to allow the user to specify the following default options for models they weren't able to use rikai.mlflow.<flavor>.log_model to record:

SET 'rikai.model.flavor'='pytorch'; // default model flavor
SET 'rikai.model.artifact_path'='model'; // default path relative to the run artifact uri
SET 'rikai.spec.version'='1.0'; // default rikai spec version (NOT the model version)
SET 'rikai.model.stage'='production'; // default model stage to filter for

CREATE MODEL my_model
OPTIONS (
  'rikai.output.schema'='rikai.contrib.torch.transforms.fasterrcnn_resnet50_fpn.OUTPUT_SCHEMA',
  'rikai.transforms.pre'='rikai.contrib.torch.transforms.fasterrcnn_resnet50_fpn.pre_processing',
  'rikai.transforms.post'='rikai.contrib.torch.transforms.fasterrcnn_resnet50_fpn.post_processing'
)
USING 'mlflow://model_name'
changhiskhan commented 3 years ago

Also add more unit tests for mlflow registry on how to handle vanilla mlflow models (not the rikai.mlflow.pytorch.log_model ones)