Hello. I have a question about running flows. My f...
# ask-metaflow
f
Hello. I have a question about running flows. My flows have need to include some configuration files and other important artifacts so I use
--package-suffixes
and I'm also using a uv environment via
--environment=uv
. Since these arguments come before the metaflow commands (run, show, etc.), it doesn't appear that I can set these in a configuration some way. Is there some way to set these via a configuration or even hard code them into the flow script? I tried argument injection in
__main__
but it didn't work.
a
you can set these as environment variables. also, for config files, we do now have a
Config
object - would that work for your usecase?
f
I am already using the Config object in general, I have some configs I am setting but these appear to be flow level, not runtime flags. I can do the environment variables though, that seems to be an easy fix. Are .metaflowconfigs nested? If I specify a .metaflowconfig file in this specifc flow / project, and there is another .metaflowconfig in my home directory that has all the info needed to execute in batch/k8s. Will they both be used? or only the local one?
a
what is the
.metaflowconfig
file?
f
That's the config file in my home directory. It contains a json key value pair of environment variables like METAFLOW_BATCH_CONTAINER_IMAGE, METAFLOW_BATCH_CONTAINER_REGISTRY, METAFLOW_SERVICE_URL etc.
a
we have a folder, but not a file by that name
and these env vars are not picked from that folder
f
Sorry I might have said it in a confusing way, The file is actually ~/.metaflowconfig/config.json