seldon-core
seldon-core copied to clipboard
Some V2 pre-packaged servers do not allow env var override
Describe the bug
The V2 pre-packaged servers, at least the ones backed by MLServer, do not allow overriding certain environment variables (e.g. MLSERVER_MODEL_URI). Instead, they will always force the default values.
This can become a blocker for certain scenarios (e.g. multi-model serving), where we want to remove the default value to let each model decide on their own.
To reproduce
- Deploy a
SeldonDeploymentmanifest like the one below:
apiVersion: machinelearning.seldon.io/v1
kind: SeldonDeployment
metadata:
name: my-model
spec:
protocol: v2
predictors:
- name: default
graph:
name: model
implementation: SKLEARN_SERVER
modelUri: gs://seldon-models/mlserver/mms3
componentSpecs:
- spec:
containers:
- name: model
env:
- name: MLSERVER_MODEL_URI
value: ""
- Inspect the pod.
- You will notice that the
MLSERVER_MODEL_URIenv var is still set to/mnt/models.
Expected behaviour
The operator should merge the env vars provided through the SeldonDeployment manifest with the default values, to allow the user to override their value.
Environment
Seldon Core 1.15.0-dev
Model Details
- Images of your model: [Output of:
kubectl get seldondeployment -n <yourmodelnamespace> <seldondepname> -o yaml | grep image:where<yourmodelnamespace>] - Logs of your model: [You can get the logs of your model by running
kubectl logs -n <yourmodelnamespace> <seldonpodname> <container>]