MLflow tracker Databricks API Specs¶
Methods
mlflow_log_artifact (artifact, artifact_name, local_path, artifact_path) |
log an artifact to mlflow run |
|
mlflow_log_register_model (model, type_of_model, model_func_dict, artifact_path, name_of_registered_model, extra_pip_requirements, code_path) |
log and register model to mlflow run |
|
mlflow_log_params (params) |
log model parameters to mlflow run |
|
mlflow_log_metric (key, value) |
log model evaluation metrics to mlflow run |
mlflow_log_artifact¶
- mlflow_log_artifact(artifact: Any, artifact_name: str, local_path: Optional[str] = None, artifact_path: Optional[str] = None)¶
- log an artifact to mlflow run
- Parameters:
artifact (Any) – artifact to log
artifact_name (str) – name of artifact
local_path (Optional[str]) – path to artifact
artifact_path (Optional[str]) – directory to write artifact to for mlflow run
- Returns:
string response of the artifact logged
- Return type:
str
mlflow_log_register_model¶
- mlflow_log_register_model(model, type_of_model: str, model_func_dict: dict, artifact_path: str, name_of_registered_model: str = None, extra_pip_requirements: Optional[list] = None, code_path: Optional[list] = None)¶
- log and register model to mlflow run
- Parameters:
model – model to log
type_of_model (str) – type of model; sklearn, tensorflow, pyfunc, pytorch
model_func_dict (dict) – mapping of dictionary for model function
artifact_path (str) – artifact path
name_of_registered_model (str) – name of registered model
extra_pip_requirements (Optional[list]) – list of pip requirements for model
code_path (Optional[list]) – list of code path for additional dependencies of model
- Returns:
string response of the model logged and registered
- Return type:
str
mlflow_log_params¶
- mlflow_log_params(params: dict)¶
- log model parameters to mlflow run
- Parameters:
params (str) – parameters in dictionary to log
- Returns:
string response of the params logged
- Return type:
str
mlflow_log_metric¶
- mlflow_log_metric(key: str, value: float)¶
- log model evaluation metrics to mlflow run
- Parameters:
key (str) – name of evaluation metric
value (float) – evaluation metric value
- Returns:
string response of the evaluation metric logged
- Return type:
str