@@ -137,7 +137,7 @@ def initialize(self) -> None:
137137
138138 # Build parameter model
139139 self ._params_model = build_params_model_from_snapshot (
140- snapshot = self .snapshot ,
140+ self .snapshot , strict = True
141141 )
142142
143143 # Initialize orchestrator
@@ -504,29 +504,33 @@ def _build_response(
504504 # ----------
505505
506506 @property
507- def input_schema (self ) -> Optional [ Dict [str , Any ] ]:
508- """Return the JSON schema for pipeline input parameters if available .
507+ def input_schema (self ) -> Dict [str , Any ]:
508+ """Return the JSON schema for pipeline input parameters.
509509
510510 Returns:
511- The JSON schema for pipeline parameters if available .
511+ The JSON schema for pipeline parameters.
512512 """
513- try :
514- if self .snapshot .pipeline_spec :
515- return self .snapshot .pipeline_spec .input_schema
516- except Exception :
517- return None
518- return None
513+ if (
514+ self .snapshot .pipeline_spec
515+ and self .snapshot .pipeline_spec .input_schema
516+ ):
517+ return self .snapshot .pipeline_spec .input_schema
518+ # This should never happen, given that we check for this in the
519+ # base deployer.
520+ raise RuntimeError ("The pipeline input schema is not available." )
519521
520522 @property
521- def output_schema (self ) -> Optional [ Dict [str , Any ] ]:
522- """Return the JSON schema for the deployment response if available .
523+ def output_schema (self ) -> Dict [str , Any ]:
524+ """Return the JSON schema for the pipeline outputs .
523525
524526 Returns:
525- The JSON schema for the deployment response if available .
527+ The JSON schema for the pipeline outputs .
526528 """
527- try :
528- if self .snapshot .pipeline_spec :
529- return self .snapshot .pipeline_spec .output_schema
530- except Exception :
531- return None
532- return None
529+ if (
530+ self .snapshot .pipeline_spec
531+ and self .snapshot .pipeline_spec .output_schema
532+ ):
533+ return self .snapshot .pipeline_spec .output_schema
534+ # This should never happen, given that we check for this in the
535+ # base deployer.
536+ raise RuntimeError ("The pipeline output schema is not available." )
0 commit comments