-
Notifications
You must be signed in to change notification settings - Fork 442
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 dynamic artifacts naming, documentation and tests #3201
base: develop
Are you sure you want to change the base?
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
docs/book/how-to/data-artifact-management/handle-data-artifacts/artifacts-naming.md
Show resolved
Hide resolved
docs/book/how-to/data-artifact-management/handle-data-artifacts/artifacts-naming.md
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
This reverts commit 791fc13.
Raises: | ||
RuntimeError: If the name is still a callable. | ||
""" | ||
if callable(self.name): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to reuse the date/time from the pipeline run here, same as we do with model version names? If it's even possible to pass this here, I'm not sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be interesting. Maybe this can be set on a context level instead of pulling fresh each time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't implement this, but I can give it a shot if the PR is conceptually fine with you.
@@ -42,6 +42,11 @@ class ArtifactRequest(BaseRequest): | |||
title="Name of the artifact.", | |||
max_length=STR_FIELD_MAX_LENGTH, | |||
) | |||
original_name: Optional[str] = Field( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really get this, why would an artifact have an original name on top of the name it already has?
Isn't the only issue with this the dynamic naming of step outputs, but once we actually create the artifact there should only be one name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the artifact is created the name is already evaluated, so name_{date}
would be name_20241122
. The original_name
is used to store the original template name_{date}
and to be able to map it to the Run outputs on DAG and other places, since it will be the name in the Deployment and not the evaluated one.
Moreover original_name
is only filled for dynamic names, while for static ones it will be null and filled in runtime with the name
to keep responses consistent.
Describe changes
I implemented the dynamic artifacts naming for output artifacts to support the following use cases:
{time}
and{date}
are supported out of the box + any custom placeholder can be passed vianame_subs
The same applies to
ArtifactConfig(name=...)
pattern.There are breaking changes for frontend since now the user can see something like this:
We talked with @Cahllagerfeld and I shared the solution to use:
original_name
of theartifact
insidePipelineRun
outputs
This is also backward compatible since all static artifacts will have
original_name
set to thename
itself.DO NOT MERGE BEFORE FE CHANGES ARE READY
Pre-requisites
Please ensure you have done the following:
develop
and the open PR is targetingdevelop
. If your branch wasn't based on develop read Contribution guide on rebasing branch to develop.Types of changes