@@ -323,15 +323,19 @@ def _get_deepimagej_config(export_folder, sample_inputs, sample_outputs, pixel_s
323
323
324
324
if any (preproc is not None for preproc in preprocessing ):
325
325
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
+ ]
327
329
attachments = [preproc ["kwargs" ] for preproc in preprocess_ij ]
328
330
else :
329
331
preprocess_ij = [{"spec" : None }]
330
332
attachments = None
331
333
332
334
if any (postproc is not None for postproc in postprocessing ):
333
335
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
+ ]
335
339
if attachments is None :
336
340
attachments = [postproc ["kwargs" ] for postproc in postprocess_ij ]
337
341
else :
@@ -609,7 +613,7 @@ def build_model(
609
613
else :
610
614
assert len (pixel_sizes ) == n_inputs
611
615
for pix_size , axes in zip (pixel_sizes , spatial_axes ):
612
- assert isinstance (pixel_sizes , dict )
616
+ assert isinstance (pix_size , dict )
613
617
assert set (pix_size .keys ()) == set (axes )
614
618
615
619
#
@@ -730,17 +734,6 @@ def build_model(
730
734
if tmp_source is not None :
731
735
os .remove (tmp_source )
732
736
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')]
744
737
model = load_raw_resource_description (model_package )
745
738
return model
746
739
0 commit comments