Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for custom tags at run time #1222

Closed
dhpollack opened this issue Jan 3, 2023 · 3 comments
Closed

Add support for custom tags at run time #1222

dhpollack opened this issue Jan 3, 2023 · 3 comments

Comments

@dhpollack
Copy link
Contributor

It would be nice one could add custom tags via a flow/step decorator or environmental variables. Currently the tagging system seems optimized for post-run tagging, but often times one wants to tag a specific run in order to find that run later. I would propose either a decorator on the flow or environmental variables.

# within flow decorator or on a step
@project(name="my_project", tags=("tag1", "tag2:tag2value" , "tag3"))
class MyFlow(FlowSpec):
  @tags(("start_tag1", "start_tag2:start_tag2_value"))
  def start(self):
    ...

# with an env var
export METAFLOW_USER_TAGS="tag1|tag2:tag2value|tag3"
export METAFLOW_USER_TAGS_DELIMITER="|"
@savingoyal
Copy link
Collaborator

you can already do this - METAFLOW_RUN_TAGS='mytag another_tag' python helloflow.py run to attach mytag and another_tag to the execution. This is semantically equivalent to python helloflow.py run --tag mytag --tag another_tag. Would this help?

@dhpollack
Copy link
Contributor Author

The METAFLOW_RUN_TAGS is exactly what I was looking for. This seems like an undocumented feature. My only complaint now is that it should be in the docs. 😄 Thanks for pointing this out!

@dhpollack
Copy link
Contributor Author

I'll close this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants