【问题标题】:How do I set a custom gunicorn worker timeout when serving an MLflow model with the "mlflow models serve" CLI?使用“mlflow models serve”CLI 为 MLflow 模型提供服务时,如何设置自定义 gunicorn worker 超时?
【发布时间】:2019-08-21 00:58:27
【问题描述】:

在使用“pyfunc”后端 (https://github.com/mlflow/mlflow/blob/master/mlflow/pyfunc/backend.py) 提供 MLflow Python 模型时,如何设置自定义 gunicorn worker 超时?为需要很长时间加载的大型模型提供服务时,默认的 60 秒超时可能不够。

【问题讨论】:

    标签: mlflow


    【解决方案1】:

    从 MLflow 1.2 开始,您可以通过指定 GUNICORN_CMD_ARGS 环境变量来设置自定义 gunicorn 超时。以下示例为一个工作器超时为 120 秒的模型提供服务

    GUNICORN_CMD_ARGS="--timeout 120" mlflow models serve --model-uri /path/to/model

    【讨论】:

      猜你喜欢
      • 2020-11-23
      • 2021-04-29
      • 2022-12-18
      • 2021-05-02
      • 2022-01-02
      • 1970-01-01
      • 2021-03-10
      • 2020-01-07
      • 2020-07-30
      相关资源
      最近更新 更多