Skip to content

Commit 60b1625

Browse files
authored
Merge pull request #378 from jdeschamps/fix_hash_pytorch
Fix pytorch_state_dict import from library
2 parents ff8af21 + 7681ab7 commit 60b1625

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

bioimageio/core/digest_spec.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from numpy.typing import NDArray
2121
from typing_extensions import Unpack, assert_never
2222

23-
from bioimageio.spec._internal.io_utils import HashKwargs, download
23+
from bioimageio.spec._internal.io import HashKwargs, download
2424
from bioimageio.spec.common import FileSource
2525
from bioimageio.spec.model import AnyModelDescr, v0_4, v0_5
2626
from bioimageio.spec.model.v0_4 import CallableFromDepencency, CallableFromFile
@@ -51,7 +51,7 @@ def import_callable(node: type, /) -> Callable[..., Any]:
5151

5252

5353
@import_callable.register
54-
def _(node: CallableFromDepencency) -> Callable[..., Any]:
54+
def _(node: CallableFromDepencency, **kwargs: Unpack[HashKwargs]) -> Callable[..., Any]:
5555
module = importlib.import_module(node.module_name)
5656
c = getattr(module, str(node.callable_name))
5757
if not callable(c):
@@ -61,7 +61,9 @@ def _(node: CallableFromDepencency) -> Callable[..., Any]:
6161

6262

6363
@import_callable.register
64-
def _(node: ArchitectureFromLibraryDescr) -> Callable[..., Any]:
64+
def _(
65+
node: ArchitectureFromLibraryDescr, **kwargs: Unpack[HashKwargs]
66+
) -> Callable[..., Any]:
6567
module = importlib.import_module(node.import_from)
6668
c = getattr(module, str(node.callable))
6769
if not callable(c):

0 commit comments

Comments
 (0)