Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,12 @@ jobs:
cache-environment: true
environment-file: dev/env-py38.yaml
post-cleanup: 'all'
- name: additional setup
- name: additional setup spec
run: |
conda remove --yes --force bioimageio.spec || true # allow failure for cached env
pip install --no-deps git+https://github.com/bioimage-io/spec-bioimage-io
pip install --no-deps -e .
- name: additional setup core
run: pip install --no-deps -e .
- name: pytest-spec-main
run: pytest --disable-pytest-warnings

Expand Down
2 changes: 1 addition & 1 deletion bioimageio/core/VERSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "0.6.9"
"version": "0.6.10"
}
4 changes: 2 additions & 2 deletions bioimageio/core/prediction.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def predict_many(
f"Missing `{{member_id}}` in save_output_path={save_output_path}"
)

if not isinstance(inputs, collections.Mapping) and "{sample_id}" not in str(
if not isinstance(inputs, collections.abc.Mapping) and "{sample_id}" not in str(
save_output_path
):
raise ValueError(
Expand All @@ -179,7 +179,7 @@ def predict_many(

pp = create_prediction_pipeline(model)

if not isinstance(inputs, collections.Mapping):
if not isinstance(inputs, collections.abc.Mapping):
sample_id = str(sample_id)
if "{i}" not in sample_id and "{i:" not in sample_id:
sample_id += "{i:03}"
Expand Down
2 changes: 1 addition & 1 deletion dev/env-py38.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
- conda-forge
- defaults
dependencies:
- bioimageio.spec>=0.5.3.2
- bioimageio.spec>=0.5.3.3
- black
- crick # uncommented
- filelock
Expand Down
2 changes: 1 addition & 1 deletion dev/env-tf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
- conda-forge
- defaults
dependencies:
- bioimageio.spec>=0.5.3.2
- bioimageio.spec>=0.5.3.3
- black
# - crick # currently requires python<=3.9
- filelock
Expand Down
2 changes: 1 addition & 1 deletion dev/env-wo-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
- conda-forge
- defaults
dependencies:
- bioimageio.spec>=0.5.3.2
- bioimageio.spec>=0.5.3.3
- black
# - crick # currently requires python<=3.9
- filelock
Expand Down
2 changes: 1 addition & 1 deletion dev/env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: core
channels:
- conda-forge
dependencies:
- bioimageio.spec>=0.5.3.2
- bioimageio.spec>=0.5.3.3
- black
# - crick # currently requires python<=3.9
- filelock
Expand Down
22 changes: 15 additions & 7 deletions example/model_usage.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
"source": [
"# Bioimage Model Zoo Core Example notebook\n",
"\n",
"This notebook shows how to interact with the `bioimageio.core` programmatically to explore, load, use, and export content from the [BioImage Model Zoo](https://bioimage.io)."
"This notebook shows how to interact with the `bioimageio.core` programmatically to explore, load, use, and export content from the [BioImage Model Zoo](https://bioimage.io).\n",
"\n",
"\n",
"quick links:\n",
"- [Create an input sample for a given model](#create_sample_for_model)"
]
},
{
Expand All @@ -30,9 +34,10 @@
"outputs": [],
"source": [
"try:\n",
" import bioimageio.core\n",
" import torch\n",
" import matplotlib\n",
" import torch\n",
"\n",
" import bioimageio.core\n",
"except ImportError:\n",
" %pip install bioimageio.core==0.6.7 torch==2.3.1 matplotlib==3.9.0"
]
Expand Down Expand Up @@ -73,11 +78,13 @@
"outputs": [],
"source": [
"# Load general dependencies\n",
"from imageio.v2 import imread\n",
"from bioimageio.spec.utils import download\n",
"from pprint import pprint\n",
"\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"from imageio.v2 import imread\n",
"\n",
"from bioimageio.spec.utils import download\n",
"\n",
"\n",
"# Function to display input and prediction output images\n",
Expand Down Expand Up @@ -300,8 +307,8 @@
"metadata": {},
"outputs": [],
"source": [
"from bioimageio.spec.utils import load_array\n",
"from bioimageio.spec.model import v0_5\n",
"from bioimageio.spec.utils import load_array\n",
"\n",
"assert isinstance(model, v0_5.ModelDescr)\n",
"input_image = load_array(model.inputs[0].test_tensor)\n",
Expand Down Expand Up @@ -359,7 +366,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"`bioimageio.core` provides the helper function `create_sample_for_model` to automatically create the `Sample` for the given model."
"`bioimageio.core` provides the helper function `create_sample_for_model` to automatically create the `Sample` for the given model.\n",
"<a id='create_sample_for_model'></a>"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
],
packages=find_namespace_packages(exclude=["tests"]),
install_requires=[
"bioimageio.spec ==0.5.3.2",
"bioimageio.spec ==0.5.3.3",
"imageio>=2.10",
"loguru",
"numpy",
Expand Down
Loading