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

Fix artifact uris for artifacts with name placeholders #3237

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/zenml/orchestrators/output_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

from zenml.client import Client
from zenml.logger import get_logger
from zenml.utils import string_utils

if TYPE_CHECKING:
from zenml.artifact_stores import BaseArtifactStore
Expand Down Expand Up @@ -75,10 +76,13 @@ def prepare_output_artifact_uris(
artifact_store = stack.artifact_store
output_artifact_uris: Dict[str, str] = {}
for output_name in step.config.outputs.keys():
substituted_output_name = string_utils.format_name_template(
output_name, substitutions=step_run.config.substitutions
)
artifact_uri = generate_artifact_uri(
artifact_store=stack.artifact_store,
step_run=step_run,
output_name=output_name,
output_name=substituted_output_name,
)
if artifact_store.exists(artifact_uri):
raise RuntimeError("Artifact already exists")
Expand Down
Loading