Skip to content

Commit

Permalink
Only load orchestrator environment when necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
schustmi committed Dec 13, 2024
1 parent 7503b47 commit c9fbae3
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/zenml/zen_stores/schemas/pipeline_run_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,12 +288,6 @@ def to_model(
Raises:
RuntimeError: if the model creation fails.
"""
orchestrator_environment = (
json.loads(self.orchestrator_environment)
if self.orchestrator_environment
else {}
)

if self.deployment is not None:
deployment = self.deployment.to_model(include_metadata=True)

Expand Down Expand Up @@ -374,6 +368,11 @@ def to_model(
# in the response -> We need to reset the metadata here
step.metadata = None

orchestrator_environment = (
json.loads(self.orchestrator_environment)
if self.orchestrator_environment
else {}
)
metadata = PipelineRunResponseMetadata(
workspace=self.workspace.to_model(),
run_metadata=self.fetch_metadata(),
Expand Down

0 comments on commit c9fbae3

Please sign in to comment.