@@ -323,15 +323,19 @@ def _get_deepimagej_config(export_folder, sample_inputs, sample_outputs, pixel_s
323323
324324 if any (preproc is not None for preproc in preprocessing ):
325325 assert len (preprocessing ) == 1
326- preprocess_ij = [_get_deepimagej_macro (name , kwargs ) for name , kwargs in preprocessing [0 ].items ()]
326+ preprocess_ij = [
327+ _get_deepimagej_macro (name , kwargs , export_folder ) for name , kwargs in preprocessing [0 ].items ()
328+ ]
327329 attachments = [preproc ["kwargs" ] for preproc in preprocess_ij ]
328330 else :
329331 preprocess_ij = [{"spec" : None }]
330332 attachments = None
331333
332334 if any (postproc is not None for postproc in postprocessing ):
333335 assert len (postprocessing ) == 1
334- postprocess_ij = [_get_deepimagej_macro (name , kwargs ) for name , kwargs in postprocessing [0 ].items ()]
336+ postprocess_ij = [
337+ _get_deepimagej_macro (name , kwargs , export_folder ) for name , kwargs in postprocessing [0 ].items ()
338+ ]
335339 if attachments is None :
336340 attachments = [postproc ["kwargs" ] for postproc in postprocess_ij ]
337341 else :
@@ -609,7 +613,7 @@ def build_model(
609613 else :
610614 assert len (pixel_sizes ) == n_inputs
611615 for pix_size , axes in zip (pixel_sizes , spatial_axes ):
612- assert isinstance (pixel_sizes , dict )
616+ assert isinstance (pix_size , dict )
613617 assert set (pix_size .keys ()) == set (axes )
614618
615619 #
@@ -730,17 +734,6 @@ def build_model(
730734 if tmp_source is not None :
731735 os .remove (tmp_source )
732736
733- # breakpoint()
734- # debugging: for some reason this causes a validation error for the sample_input / output,
735- # although they are passed in the same format as test inputs / outputs:
736- # (Pdb) model.sample_inputs
737- # [PosixPath('/tmp/bioimageio_cache/extracted_packages/efae734f36ff8634977c9174f01c854c4e2cfc799bc92751a4558a0edd963da6/sample_input_0.tif')]
738- # (Pdb) model.sample_outputs
739- # [PosixPath('/tmp/bioimageio_cache/extracted_packages/efae734f36ff8634977c9174f01c854c4e2cfc799bc92751a4558a0edd963da6/sample_output_0.tif')]
740- # (Pdb) model.test_inputs
741- # [PosixPath('/tmp/bioimageio_cache/extracted_packages/efae734f36ff8634977c9174f01c854c4e2cfc799bc92751a4558a0edd963da6/test_input.npy')]
742- # (Pdb) model.test_outputs
743- # [PosixPath('/tmp/bioimageio_cache/extracted_packages/efae734f36ff8634977c9174f01c854c4e2cfc799bc92751a4558a0edd963da6/test_output.npy')]
744737 model = load_raw_resource_description (model_package )
745738 return model
746739
0 commit comments