- 
                Notifications
    
You must be signed in to change notification settings  - Fork 22
 
Open
Description
When I try to run a prediction from a zip source file that I created locally I get a ValueError (full traceback below).
The model was created from scratch locally and validation_summary.display() shows that everything is fine.
To replicate you can run this minimal script where path_to_zip_file should be replaced with the path of the zip file you can download from here. This is also the same model I recently uploaded on model zoo website.
import bioimageio.core
MODEL_SOURCE = 'path_to_zip_file'
model_descr = bioimageio.core.load_model_description(MODEL_SOURCE)
prediction_pipeline = bioimageio.core.create_prediction_pipeline(
        model_descr
)Traceback:
Traceback (most recent call last):
  File "d:\OneDrive\01_Postdoc_HMGU\GitHub\spotMAX_v2\spotmax\BioImageIO\test_any_model_script.py", line 72, in <module>
    main()
  File "d:\OneDrive\01_Postdoc_HMGU\GitHub\spotMAX_v2\spotmax\BioImageIO\test_any_model_script.py", line 55, in main
    prediction_pipeline = bioimageio.core.create_prediction_pipeline(
  File "C:\Users\Francesco\miniforge3\envs\acdc\lib\site-packages\bioimageio\core\_prediction_pipeline.py", line 351, in create_prediction_pipeline
    model_adapter = model_adapter or create_model_adapter(
  File "C:\Users\Francesco\miniforge3\envs\acdc\lib\site-packages\bioimageio\core\model_adapters\_model_adapter.py", line 137, in create
    raise ValueError(
ValueError: The 'pytorch_state_dict' model adapter could not be created in this environment:
AttributeError('Path' object has no attribute 'seek'. You can only torch.load from a file that is seekable. Please pre-load the data into a buffer like io.BytesIO and try to load 
from it instead.).Metadata
Metadata
Assignees
Labels
No labels