|
34 | 34 | ServiceInfo, |
35 | 35 | SnapshotInfo, |
36 | 36 | ) |
| 37 | +from zenml.deployers.server.parameters import build_params_model_from_snapshot |
37 | 38 | from zenml.enums import StackComponentType |
38 | 39 | from zenml.hooks.hook_validators import load_and_run_hook |
39 | 40 | from zenml.integrations.registry import integration_registry |
@@ -135,7 +136,7 @@ def initialize(self) -> None: |
135 | 136 | integration_registry.activate_integrations() |
136 | 137 |
|
137 | 138 | # Build parameter model |
138 | | - self._params_model = self._build_params_model() |
| 139 | + self._params_model = build_params_model_from_snapshot(self.snapshot, strict=True) |
139 | 140 |
|
140 | 141 | # Initialize orchestrator |
141 | 142 | self._orchestrator = SharedLocalOrchestrator( |
@@ -324,14 +325,6 @@ def _map_outputs( |
324 | 325 |
|
325 | 326 | return filtered_outputs |
326 | 327 |
|
327 | | - def _prepare_execute_with_orchestrator( |
328 | | - self, |
329 | | - ) -> PipelineRunResponse: |
330 | | - # Create a placeholder run and execute with a known run id |
331 | | - return run_utils.create_placeholder_run( |
332 | | - snapshot=self.snapshot, logs=None |
333 | | - ) |
334 | | - |
335 | 328 | def _execute_with_orchestrator( |
336 | 329 | self, |
337 | 330 | placeholder_run: PipelineRunResponse, |
@@ -411,25 +404,6 @@ def _execute_with_orchestrator( |
411 | 404 | # Store captured outputs for the caller to use |
412 | 405 | return captured_outputs |
413 | 406 |
|
414 | | - def _build_params_model(self) -> Any: |
415 | | - """Build the pipeline parameters model from the deployment. |
416 | | -
|
417 | | - Returns: |
418 | | - A parameters model derived from the deployment configuration. |
419 | | -
|
420 | | - Raises: |
421 | | - Exception: If the model cannot be constructed. |
422 | | - """ |
423 | | - try: |
424 | | - from zenml.deployers.server.parameters import ( |
425 | | - build_params_model_from_snapshot, |
426 | | - ) |
427 | | - |
428 | | - return build_params_model_from_snapshot(self.snapshot, strict=True) |
429 | | - except Exception as e: |
430 | | - logger.error(f"Failed to construct parameter model: {e}") |
431 | | - raise |
432 | | - |
433 | 407 | def _execute_init_hook(self) -> None: |
434 | 408 | """Execute init hook if present. |
435 | 409 |
|
|
0 commit comments