跳到主要内容

搜索实验

mlflow.search_experiments()MlflowClient.search_experiments() 支持与 mlflow.search_runs()MlflowClient.search_runs 相同的过滤字符串语法,但支持的标识符和比较器不同。

语法

请参阅搜索运行语法了解更多信息。

标识符

支持以下标识符

  • attributes.name:实验名称
  • attributes.creation_time:实验创建时间
  • attributes.last_update_time:实验最后更新时间
注意

可以省略 attributesname 等同于 attributes.name

  • tags.<tag key>:标签

比较器

字符串属性和标签的比较器

  • =:等于
  • !=:不等于
  • LIKE:区分大小写的模式匹配
  • ILIKE:不区分大小写的模式匹配

数字属性的比较器

  • =:等于
  • !=:不等于
  • <:小于
  • <=:小于或等于
  • >:大于
  • >=:大于或等于

示例

# Matches experiments with name equal to 'x'
"attributes.name = 'x'" # or "name = 'x'"

# Matches experiments with name starting with 'x'
"attributes.name LIKE 'x%'"

# Matches experiments with 'group' tag value not equal to 'x'
"tags.group != 'x'"

# Matches experiments with 'group' tag value containing 'x' or 'X'
"tags.group ILIKE '%x%'"

# Matches experiments with name starting with 'x' and 'group' tag value equal to 'y'
"attributes.name LIKE 'x%' AND tags.group = 'y'"