Hello, I would like to know how I can change the n...
# ask-metaflow
p
Hello, I would like to know how I can change the namespace before launching a run. I understand that the default namespace is the name of my linux account, but we are several people using this account so I need to change the namespace. I tried using
python myscript run --namespace "mynamespace"
but it does not work, and I also tried to change the namespace in the script before calling my flow object but it does not work either 🙄 Any help is welcome...
1
l
Hey Timothée 👋 Can you expand on what didn’t work ? Were you trying to access the results from the namespace your ran your flow in ? Did you have a problem executing the flow ?
p
Hey 🙂 No the problem I have is that I want to run my script under a new namespace (let us say it is called 'tim'). I tried
python myscript run --namespace "tim"
but it does not work -> I still see something like "running the flow under namespace 'account01'" in the logs where 'account01' is my login on my linux machine. I would like my runs to be under the namespace 'tim'
a
You're close, try this
python flow.py run --namespace user:tim
a
@powerful-dress-75267 in Metaflow tags are used as namespaces. Just by running
python flow.py run --tag tim
will ensure that your run in part of the namespace tim. Any run can be part of many namespaces. In this case, it will be part of user:account01 and tim.
p
python flow.py run --namespace user:tim does not work. using --tag user:tim does work, but it seems like a bug to me, what is the point of having a --namespace option if it does not work ? Thank you for your help anyways 👍
a
@powerful-dress-75267 the intention behind
--namespace foo
is not to run the flow inside the namespace foo, but to make the artifacts generated in the namespace foo be made available for consumption inside the run.
😮 1
p
OK thank you, sorry for this misunderstanding