mlflow / mlflow

Open source platform for the machine learning lifecycle
https://mlflow.org
Apache License 2.0
17.95k stars 4.05k forks source link

[FR] Allow openai flavor to target deployment server instead of raw OAI endpoint #11762

Open akshaya-a opened 2 months ago

akshaya-a commented 2 months ago

Willingness to contribute

Yes. I can contribute this feature independently.

Proposal Summary

maybe better designed as a load-time arg vs my hardcoded patch?

mlflow.pyfunc.load_model(, model_config={"endpoint/deployment_id": "foo"})

and oai auto injects that as a model config

an even cooler feature might be to just have a global that is essentially

mlflow.prefer_deployment_server() equivalent (env var?) that automatically applies so that consumption code doesn't have to mutate and it's a config-level op.

I'm right now using a simple heuristic to match the model with deployment server (provider, task, model id prefix) which works fine

Motivation

What is the use case for this feature?

Why is this use case valuable to support for MLflow users in general?

Why is this use case valuable to support for your project(s) or organization?

Why is it currently difficult to achieve this use case?

Details

No response

What component(s) does this bug affect?

What interface(s) does this bug affect?

What language(s) does this bug affect?

What integration(s) does this bug affect?

daniellok-db commented 2 months ago

I think this makes sense! being able to specify this at load time sounds like a good idea.

github-actions[bot] commented 2 months ago

@mlflow/mlflow-team Please assign a maintainer and start triaging this issue.