1- import os
1+ from marshmallow import missing
2+
23import bioimageio .spec as spec
34from bioimageio .core import load_raw_resource_description , load_resource_description
45from bioimageio .core .resource_io import nodes
56from bioimageio .core .resource_io .utils import resolve_source
67from bioimageio .core .resource_tests import test_model as _test_model
7- from marshmallow import missing
88
99
1010def _test_build_spec (
@@ -16,7 +16,6 @@ def _test_build_spec(
1616 use_implicit_output_shape = False ,
1717 add_deepimagej_config = False ,
1818 use_original_covers = False ,
19- use_absoloute_arch_path = False ,
2019 training_data = None ,
2120 parent = None ,
2221):
@@ -44,11 +43,6 @@ def _test_build_spec(
4443 if weight_type == "pytorch_state_dict" :
4544 model_kwargs = None if weight_spec .kwargs is missing else weight_spec .kwargs
4645 architecture = str (weight_spec .architecture )
47- if use_absoloute_arch_path :
48- arch_path , cls_name = architecture .split (":" )
49- arch_path = os .path .abspath (os .path .join (root , arch_path ))
50- assert os .path .exists (arch_path )
51- architecture = f"{ arch_path } :{ cls_name } "
5246 weight_type_ = None # the weight type can be auto-detected
5347 elif weight_type == "torchscript" :
5448 architecture = None
@@ -233,10 +227,3 @@ def test_build_spec_deepimagej_keras(unet2d_keras, tmp_path):
233227# test with original covers
234228def test_build_spec_with_original_covers (unet2d_nuclei_broad_model , tmp_path ):
235229 _test_build_spec (unet2d_nuclei_broad_model , tmp_path / "model.zip" , "torchscript" , use_original_covers = True )
236-
237-
238- # test with absolute path for the architecture file
239- def test_build_spec_abs_arch_path (unet2d_nuclei_broad_model , tmp_path ):
240- _test_build_spec (
241- unet2d_nuclei_broad_model , tmp_path / "model.zip" , "pytorch_state_dict" , use_absoloute_arch_path = True
242- )
0 commit comments