Skip to content

Commit 7648657

Browse files
Handle missing root path in build_spec correctly
1 parent fc5a3a6 commit 7648657

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bioimageio/core/build_spec/build_model.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,11 +361,13 @@ def build_model(
361361
root: optional root path for relative paths. This can be helpful when building a spec from another model spec.
362362
weight_kwargs: keyword arguments for this weight type, e.g. "tensorflow_version".
363363
"""
364+
if root is None:
365+
root = "."
366+
root = Path(root)
367+
364368
#
365369
# generate the model specific fields
366370
#
367-
if root is not None:
368-
root = Path(root)
369371

370372
assert len(test_inputs)
371373
assert len(test_outputs)

0 commit comments

Comments
 (0)