Hi, Can some explain to me how namespaces work wh...
# ask-metaflow
m
Hi, Can some explain to me how namespaces work when it comes to flows that are configured as projects, please? Without the project decorator the namespace would be the user name and the client API takes the name of the flow. Not sure how this works when it comes to projects though.
1
b
Namespaces are essentially a filter on tags of a run. Everything that you execute yourself will be tagged with ‘user:user_name’, which therefore ends up in that same namepsace. When you use the @project(name=“my_project”) decorator metaflow adds an additional tag to each run which is ‘project:my_project’. Then you can use namespace(‘project:my_project’) to filter on all runs within your project. This extends off course to other tags that you add manually. More on namespaces and tagging you can find here https://docs.metaflow.org/scaling/tagging#namespaces.
The project decorator also enables branches, see for more info https://docs.metaflow.org/production/coordinating-larger-metaflow-projects.
m
I see. Makes sense. Thanks! Yes, I am aware of branches in projects. I guess these will be tags too in that case?
One follow up thing that is now puzzling me though. If there is are two flows with the same name in different projects, the only thing stopping the client API from mixing the flows of the two projects is the specification of the tag in the API calls?
b
Yes those tags will change the user tag with the project_branch tag.
Yes I think so, I have not encountered that yet. I guess making the names descriptive and/or using the right namespaces prevents confusion in that case.
Each run id of course is unique over all projects.
m
OK, cool. Yeah, I can't see anything particularly bad happening because of it. More for my understanding.
Thanks for explaining. It's all clear now Feel there is room for these points about projects & tagging to be clarified in the docs though. It wasn't clear to me from looking through the docs
👍 2
v
Thanks @brainy-autumn-96225 for great answers 🤗 and thanks @mammoth-rainbow-82717 for feedback re: docs.
#todo
🙌 1
m
@straight-shampoo-11124 Would you be open to a PR to update the docs on this point? Was going to update my internal docs, but probably it makes more sense to make a PR on your docs.
v
PRs are always welcome 🙂 it's ok if it is not perfectly polished, since we may want to adjust it a bit anyways. Hence even a google doc works which conveys the idea you have in mind
m
ok, cool. I'll make a PR updating the documentation regarding projects & tags then 🙂
v
great, thanks a lot! 🙏