Skip to content

Commit

Permalink
Fix artifact uris
Browse files Browse the repository at this point in the history
  • Loading branch information
schustmi committed Dec 3, 2024
1 parent c397351 commit f868932
Showing 1 changed file with 5 additions and 1 deletion.
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

0 comments on commit f868932

Please sign in to comment.