Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skip simple procs if their input is not present #387

Merged
merged 1 commit into from
May 2, 2024
Merged

Conversation

FynnBe
Copy link
Member

@FynnBe FynnBe commented May 2, 2024

allows for pre- and postprocessing of optional inputs

Fixes #386

@FynnBe
Copy link
Member Author

FynnBe commented May 2, 2024

tested with

from pathlib import Path

import bioimageio.core
from bioimageio.core.digest_spec import get_test_inputs
from bioimageio.spec import save_bioimageio_package_as_folder
from bioimageio.spec.model import v0_5

local = save_bioimageio_package_as_folder(
    "diplomatic-bug/staged/1", output_path=Path("diplomatic-bug-local")
)
# local = "diplomatic-bug-local"
model_description = bioimageio.core.load_description(local)
assert isinstance(model_description, v0_5.ModelDescr)
inputs = get_test_inputs(model_description)
with bioimageio.core.create_prediction_pipeline(model_description) as pp:
    del inputs.members[bioimageio.core.MemberId("point_prompts")]
    prediction = pp.predict_sample_without_blocking(inputs)

@FynnBe FynnBe merged commit 5449618 into main May 2, 2024
13 checks passed
@FynnBe FynnBe deleted the optional_procs branch May 2, 2024 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optional inputs not working
1 participant