Title: ValueError when creating prediction pipeline with locally created model · Issue #443 · bioimage-io/core-bioimage-io-python · GitHub
Open Graph Title: ValueError when creating prediction pipeline with locally created model · Issue #443 · bioimage-io/core-bioimage-io-python
X Title: ValueError when creating prediction pipeline with locally created model · Issue #443 · bioimage-io/core-bioimage-io-python
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 replica...
Open Graph 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() s...
X 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() s...
Opengraph URL: https://github.com/bioimage-io/core-bioimage-io-python/issues/443
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ValueError when creating prediction pipeline with locally created model","articleBody":"When I try to run a prediction from a zip source file that I created locally I get a `ValueError` (full traceback below). \r\n\r\nThe model was created from scratch locally and `validation_summary.display()` shows that everything is fine. \r\n\r\nTo 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](https://1drv.ms/u/c/fcfe050bfa6c5471/ERJYz8U8WT1DmNH2pjEg-90Bb9GDnNjO8kIgyErag5KCQw?e=5wPR6Y). This is also the same model I recently uploaded on model zoo website.\r\n\r\n```python\r\nimport bioimageio.core\r\nMODEL_SOURCE = 'path_to_zip_file'\r\nmodel_descr = bioimageio.core.load_model_description(MODEL_SOURCE)\r\nprediction_pipeline = bioimageio.core.create_prediction_pipeline(\r\n model_descr\r\n)\r\n```\r\n\r\nTraceback:\r\n\r\n```shell\r\nTraceback (most recent call last):\r\n File \"d:\\OneDrive\\01_Postdoc_HMGU\\GitHub\\spotMAX_v2\\spotmax\\BioImageIO\\test_any_model_script.py\", line 72, in \u003cmodule\u003e\r\n main()\r\n File \"d:\\OneDrive\\01_Postdoc_HMGU\\GitHub\\spotMAX_v2\\spotmax\\BioImageIO\\test_any_model_script.py\", line 55, in main\r\n prediction_pipeline = bioimageio.core.create_prediction_pipeline(\r\n File \"C:\\Users\\Francesco\\miniforge3\\envs\\acdc\\lib\\site-packages\\bioimageio\\core\\_prediction_pipeline.py\", line 351, in create_prediction_pipeline\r\n model_adapter = model_adapter or create_model_adapter(\r\n File \"C:\\Users\\Francesco\\miniforge3\\envs\\acdc\\lib\\site-packages\\bioimageio\\core\\model_adapters\\_model_adapter.py\", line 137, in create\r\n raise ValueError(\r\nValueError: The 'pytorch_state_dict' model adapter could not be created in this environment:\r\nAttributeError('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 \r\nfrom it instead.).\r\n```","author":{"url":"https://github.com/ElpadoCan","@type":"Person","name":"ElpadoCan"},"datePublished":"2024-12-13T11:16:07.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/443/core-bioimage-io-python/issues/443"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:fc5e4cdd-7d85-54b2-c029-e3496eeb5e88 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ADCC:3D0908:5641D6:7AE171:6A4BCC00 |
| html-safe-nonce | 0319f5470e106686e9b1615be59f650e85d01ed4eb687be0e3c5c7210eda416c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRENDOjNEMDkwODo1NjQxRDY6N0FFMTcxOjZBNEJDQzAwIiwidmlzaXRvcl9pZCI6IjM0NTI0ODEyOTYyNzc0MjUxNTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | fc0c31c672a5eacfab0aca1114d110787cd5b081a2a9f8d9ef4219a9d45e0434 |
| hovercard-subject-tag | issue:2738155379 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/bioimage-io/core-bioimage-io-python/443/issue_layout |
| twitter:image | https://opengraph.githubassets.com/02731b0652d61fac4703e8d6fddd33514545ea1c413cb831f1d6850fbcfa8e40/bioimage-io/core-bioimage-io-python/issues/443 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/02731b0652d61fac4703e8d6fddd33514545ea1c413cb831f1d6850fbcfa8e40/bioimage-io/core-bioimage-io-python/issues/443 |
| og:image:alt | 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() s... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ElpadoCan |
| hostname | github.com |
| expected-hostname | github.com |
| None | 14aa00ce5bdb34d0eefb5facbffd7de9e144c688d8a93ef8df902d5f94b51dd7 |
| turbo-cache-control | no-preview |
| go-import | github.com/bioimage-io/core-bioimage-io-python git https://github.com/bioimage-io/core-bioimage-io-python.git |
| octolytics-dimension-user_id | 54582174 |
| octolytics-dimension-user_login | bioimage-io |
| octolytics-dimension-repository_id | 218790457 |
| octolytics-dimension-repository_nwo | bioimage-io/core-bioimage-io-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 218790457 |
| octolytics-dimension-repository_network_root_nwo | bioimage-io/core-bioimage-io-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 58b8f89190447502561829f30862aa0a99d53367 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width