File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 2525from numpy .typing import NDArray
2626from typing_extensions import Unpack , assert_never
2727
28- from bioimageio .spec import get_validation_context
2928from bioimageio .spec ._internal .io import HashKwargs
3029from bioimageio .spec .common import FileDescr , FileSource , ZipPath
3130from bioimageio .spec .model import AnyModelDescr , v0_4 , v0_5
@@ -86,9 +85,10 @@ def import_callable(
8685def _import_from_file_impl (
8786 source : FileSource , callable_name : str , ** kwargs : Unpack [HashKwargs ]
8887):
89- with get_validation_context ().replace (perform_io_checks = True ):
90- src_descr = FileDescr (source = source , ** kwargs )
91- assert src_descr .sha256 is not None
88+ src_descr = FileDescr (source = source , ** kwargs )
89+ # ensure sha is valid even if perform_io_checks=False
90+ src_descr .validate_sha256 ()
91+ assert src_descr .sha256 is not None
9292
9393 local_source = src_descr .download ()
9494 source_code = local_source .path .read_text (encoding = "utf-8" )
You can’t perform that action at this time.
0 commit comments