Hi all, I have a question, is there any way to add...
# ask-metaflow
g
Hi all, I have a question, is there any way to add a custom flow decorator ? I was thinking to do some customization around the existing project decorator class so was wondering if I could create a new one for our use case ?
d
Absolutely. You can of course use regular Python decorators if you don’t need hooks into metaflow internals but you can also create extensions that add metaflow decorators (among other things). That second path is less supported and documented but many people do it and although it may break with changes to metaflow, it should continue working and/or be easy to update if things change. What specifically are you trying to do and I can better advise.
g
Thanks for the reply. That is interesting. Okay let me explain my use case and I think that might help here. Maybe I might be in wrong path altogether. We use Argo workflows to deploy meta flow. And the name of the workflow is generated from current project_flow_name. As an example the Argo workflow name which gets created is projectname.user.username.flowname This is causing us some issues with lengths. So I wanted to add a custom decorator which modifies the final string to something like projectname.user.username.custom where custom is something I pass to the new decorator..
d
so you wnat to change the name of the flow?
g
Or more explicitly the project flow name value