MLflow 入门
Weston Bassler
Senior MLOps Engineer

集中式存储位置
生命周期管理

模型
已注册模型
模型版本
模型阶段


实验
运行
模型版本
已注册模型

# 从 MLflow 模块导入 from mlflow import MlflowClient# 创建实例 client = MlflowClient()# 打印对象 client
<mlflow.tracking.client.MlflowClient object at 0x101d55f30>
# 创建名为 "Unicorn" 的模型
client.create_registered_model(name="Unicorn")
<RegisteredModel: creation_timestamp=1679404160448, description=None,
last_updated_timestamp=1679404160448, latest_versions=[], name='Unicorn',
tags={}>


# 搜索已注册模型
client.search_registered_models(filter_string=MY_FILTER_STRING)
= - 等于!= - 不等于LIKE - 区分大小写的模式匹配ILIKE - 不区分大小写的模式匹配# 过滤字符串 unicorn_filter_string = "name LIKE 'Unicorn%'"# 搜索模型 client.search_registered_models(filter_string=unicorn_filter_string)
[<RegisteredModel: creation_timestamp=1679404160448, description=None,
last_updated_timestamp=1679404160448, latest_versions=[], name='Unicorn',
tags={}>,
<RegisteredModel: creation_timestamp=1679404276745, description=None,
last_updated_timestamp=1679404276745, latest_versions=[], name='Unicorn 2.0',
tags={}>]
MLflow 入门