MLflow APIMLflow API

Azure Databricks 提供了托管版本的 MLflow 跟踪服务器和模型注册表,用于托管 MLflow REST APIAzure Databricks provides a managed version of the MLflow tracking server and the Model Registry, which host the MLflow REST API. 可以使用表单的 URL 调用 MLflow REST APIYou can invoke the MLflow REST API using URLs of the form

https://<databricks-instance>/api/2.0/mlflow/<api-endpoint>

(将 <databricks-instance> 替换为 Azure Databricks 部署的工作区 URL)。replacing <databricks-instance> with the workspace URL of your Azure Databricks deployment.

MLflow 兼容性矩阵列出了每个 Databricks Runtime 版本中打包的 MLflow 版本以及指向相应文档的链接。MLflow compatibility matrix lists the MLflow release packaged in each Databricks Runtime version and a link to the respective documentation.

重要

要访问 Databricks REST API,必须进行身份验证To access Databricks REST APIs, you must authenticate.

速率限制Rate limits

根据 MLflow API 的功能和最大吞吐量,其速率限制为四组。The MLflow APIs are rate limited as four groups, based on their function and maximum throughput. 以下是 API 组及其各自限制(以 qps(每秒查询次数)为单位)的列表:The following is the list of API groups and their respective limits in qps (queries per second):

  • 低吞吐量试验管理(列出、更新、删除、还原):7 qpsLow throughput experiment management (list, update, delete, restore): 7 qps
  • 搜索运行:7 qpsSearch runs: 7 qps
  • 日志批处理:47 qpsLog batch: 47 qps
  • 所有其他 API:127 qpsAll other APIs: 127 qps

此外,每个工作区最多只能有 20 个处于挂起状态(创建中)的并发模型版本。In addition, there is a limit of 20 concurrent model versions in Pending status (in creation) per workspace.

如果达到此速率限制,后续 API 调用将返回状态代码 429。If the rate limit is reached, subsequent API calls will return status code 429. 所有 MLflow 客户端(包括 UI)都会以指数退避的方式自动重试 429。All MLflow clients (including the UI) automatically retry 429s with an exponential backoff.