PMD-Arima Logging
You can explore logging other models here.
Import necessary packagesโ
from katonic.ml import MyClient
import os
import numpy as np
import pmdarima as pm
from pmdarima.datasets import load_wineind
Create client object using MyClientโ
myclient = MyClient()
mlflow = myclient.mlflow
client = myclient.client
Implement model training and logging stepsโ
wineind = load_wineind().astype(np.float64)
exp_name = "mlflow-test-PMDArima"
mlflow.set_experiment(exp_name)
exp_details = mlflow.get_experiment_by_name(exp_name)
params = {
'start_p':1,
'start_q':1,
'max_p':3,
'max_q':3,
'm':12,
'start_P':0,
'seasonal':True,
'd':1,
'D':1,
'trace':True,
'error_action':'ignore',
'suppress_warnings':True,
'stepwise':True
}
with mlflow.start_run(run_name=exp_name):
stepwise_fit = pm.auto_arima(wineind, **params) # set to stepwise
mlflow.log_params(params)
model_info = mlflow.pmdarima.log_model(stepwise_fit, artifact_path="model")