Is it possible to dynamically pass a value into al...
# ask-metaflow
i
Is it possible to dynamically pass a value into all metaflow k8s jobs? I have users in JupyterHub running on GKE, who are using Metaflow to do data processing and model training. In the model training jobs, they are utilizing MLflow to log model experiment details. MLflow populates their
user
field by the
MLFLOW_USERNAME
environment variable. In JupyterHub, I have the user pods dynamically setting this environment variable so I can track who is training what models. However when users launch jobs using
python file.py run --with kubernetes
, their MLflow user reports back as
root
. What I would like to see is their user (i.e. dynamically change the
MLFLOW_USERNAME
value on their jobs) to be
zbloss
for example.
1
v
it's similar to this previous questions of yours, right? you could have a custom decorator as outlined in that thread setting
MFLOW_USERNAME
or you could set a default
@environment
through a config file, in case it's just a static value that you want to set everywhere
i
Yeah it maybe it's worth throwing that config into a configmap that gets auto-mounted
v
you could do that, or you can just use Metaflow configs
i
That's what I was thinking. Putting these configs into a configmap then using @environment to point to that configuration
👍 1