Open s-natsubori opened 2 months ago
Thanks for reporting this @s-natsubori ! It sounds reasonable to add --timeout
args in mlflow server
command. We'll discuss internally and get back to you. Would you like to contribute if possible?
Thanks for check. I think, it can be solved by set timeout to requests.
response = requests.request(request_type, f"{target_uri}/{gateway_path}", json=json_data, timeout=REQUEST_TIMEOUT)
Could you raise a PR to add an environment variable and support passing it here? You already have the context to test it then 😄
Sorry, I misunderstood. request module is not the cause of the error.
I tried setting the timeout parameter to request , but the situation did not change at all.
Next, I try to control aiohttp.ClientTimeout
but this also has no effect.
(I'm new to aiohttp, so my settings may be wrong.)
https://github.com/mlflow/mlflow/blob/2a3ee6caf38ecdfe43b068ab6d7fabf07b198625/mlflow/gateway/providers/utils.py#L16
From Stack trace, It also appears that the fastAPI process timeout is the cause. Any Idea?
@mlflow/mlflow-team Please assign a maintainer and start triaging this issue.
Issues Policy acknowledgement
Where did you encounter this bug?
Local machine
Willingness to contribute
Yes. I would be willing to contribute a fix for this bug with guidance from the MLflow community.
MLflow version
System information
Describe the problem
With Prompt Engineering UI, Select LLM Model GPT-4 or GPT-4-turbo, and set Max tokens over 1024,
MLflow deployment returned the following error: "INTERNAL_ERROR".
In fact, the above error will occur in all cases where the LLM model cannot respond within30 seconds
.I checked the logs on the API side, API returned a response normally. (it will take more than 30 seconds) However, the tracking server seems to treat it as a
connection timeout
.Processing of LLM models can be very slow, so the timeout should be configurable. (30 seconds is too short!!!)
Tracking information
Code to reproduce issue
docker-compose.yaml
Dockerfile
Stack trace
Tracking server Log
What component(s) does this bug affect?
area/artifacts
: Artifact stores and artifact loggingarea/build
: Build and test infrastructure for MLflowarea/deployments
: MLflow Deployments client APIs, server, and third-party Deployments integrationsarea/docs
: MLflow documentation pagesarea/examples
: Example codearea/model-registry
: Model Registry service, APIs, and the fluent client calls for Model Registryarea/models
: MLmodel format, model serialization/deserialization, flavorsarea/recipes
: Recipes, Recipe APIs, Recipe configs, Recipe Templatesarea/projects
: MLproject format, project running backendsarea/scoring
: MLflow Model server, model deployment tools, Spark UDFsarea/server-infra
: MLflow Tracking server backendarea/tracking
: Tracking Service, tracking client APIs, autologgingWhat interface(s) does this bug affect?
area/uiux
: Front-end, user experience, plotting, JavaScript, JavaScript dev serverarea/docker
: Docker use across MLflow's components, such as MLflow Projects and MLflow Modelsarea/sqlalchemy
: Use of SQLAlchemy in the Tracking Service or Model Registryarea/windows
: Windows supportWhat language(s) does this bug affect?
language/r
: R APIs and clientslanguage/java
: Java APIs and clientslanguage/new
: Proposals for new client languagesWhat integration(s) does this bug affect?
integrations/azure
: Azure and Azure ML integrationsintegrations/sagemaker
: SageMaker integrationsintegrations/databricks
: Databricks integrations