@@ -104,21 +104,23 @@ def debug_model(
104104 prediction_pipeline = create_prediction_pipeline (
105105 bioimageio_model = model , devices = devices , weight_format = weight_format
106106 )
107- inputs = [xr .DataArray (np .load (str (in_path )), dims = input_spec .axes )
108- for in_path , input_spec in zip (model .test_inputs , model .inputs )]
107+ inputs = [
108+ xr .DataArray (np .load (str (in_path )), dims = input_spec .axes )
109+ for in_path , input_spec in zip (model .test_inputs , model .inputs )
110+ ]
109111
110112 inputs_processed , stats = prediction_pipeline .preprocess (* inputs )
111113 outputs_raw = prediction_pipeline .predict (* inputs_processed )
112114 outputs , _ = prediction_pipeline .postprocess (* outputs_raw , input_sample_statistics = stats )
113115 if isinstance (outputs , (np .ndarray , xr .DataArray )):
114116 outputs = [outputs ]
115117
116- expected = [xr .DataArray (np .load (str (out_path )), dims = output_spec .axes )
117- for out_path , output_spec in zip (model .test_outputs , model .outputs )]
118+ expected = [
119+ xr .DataArray (np .load (str (out_path )), dims = output_spec .axes )
120+ for out_path , output_spec in zip (model .test_outputs , model .outputs )
121+ ]
118122 if len (outputs ) != len (expected ):
119- error = (
120- f"Number of outputs and number of expected outputs disagree: { len (outputs )} != { len (expected )} "
121- )
123+ error = f"Number of outputs and number of expected outputs disagree: { len (outputs )} != { len (expected )} "
122124 print (error )
123125 else :
124126 diff = []
@@ -131,5 +133,5 @@ def debug_model(
131133 "outputs_raw" : outputs_raw ,
132134 "outputs" : outputs ,
133135 "expected" : expected ,
134- "diff" : diff
136+ "diff" : diff ,
135137 }
0 commit comments