Skip to content

Commit

Permalink
Merge pull request #545 from AllenCell/hotfix/prediction-updates-cyto…
Browse files Browse the repository at this point in the history
…-dl==0.4.1

Update prediction to use cyto-dl==0.4.1
  • Loading branch information
yrkim98 authored Nov 1, 2024
2 parents d29161b + cc96c6f commit ea92306
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def test_build_overrides() -> None:
/ "0_exp"
/ "prediction_output_test"
)
assert overrides["data.transforms.predict.transforms[1].reader[0].C"] == 3
assert overrides["input_channel"] == 3
assert overrides["data.columns"] == ["raw", "split"]
assert overrides["data.split_column"] == "split"

Expand Down
2 changes: 1 addition & 1 deletion src/allencell_ml_segmenter/prediction/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def get_output_seg_directory(self) -> Optional[Path]:
Gets path to where segmentation predictions are stored.
"""
return (
self._output_directory / "target"
self._output_directory / "seg"
if self._output_directory is not None
else None
)
Expand Down
6 changes: 2 additions & 4 deletions src/allencell_ml_segmenter/services/prediction_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,8 @@ def build_overrides(self, checkpoint: Path) -> dict[str, Any]:
channel: Optional[int] = (
self._prediction_model.get_image_input_channel_index()
)
if channel:
overrides["data.transforms.predict.transforms[1].reader[0].C"] = (
channel
)
if channel is not None:
overrides["input_channel"] = channel

# selecting hardware- GPU if available (and correct drivers installed),
# CPU otherwise.
Expand Down

0 comments on commit ea92306

Please sign in to comment.