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

♻️ Update Changes from New Engine Design #882

Merged
merged 13 commits into from
Nov 21, 2024
Prev Previous commit
Next Next commit
🐛 Fix errors related to new design.
shaneahmed committed Nov 21, 2024
commit 078908ff45a35c32640c4cb1eb683d37e92d9489
4 changes: 2 additions & 2 deletions tests/models/test_patch_predictor.py
Original file line number Diff line number Diff line change
@@ -1025,7 +1025,7 @@ def test_patch_predictor_kather100k_output(
pretrained_model,
probabilities_check=expected_prob,
predictions_check=[6, 3],
on_gpu=ON_GPU,
device=select_device(on_gpu=ON_GPU),
)
# only test 1 on travis to limit runtime
if toolbox_env.running_on_ci():
@@ -1060,7 +1060,7 @@ def test_patch_predictor_pcam_output(sample_patch3: Path, sample_patch4: Path) -
pretrained_model,
probabilities_check=expected_prob,
predictions_check=[1, 0],
on_gpu=ON_GPU,
device=select_device(on_gpu=ON_GPU),
)
# only test 1 on travis to limit runtime
if toolbox_env.running_on_ci():
18 changes: 9 additions & 9 deletions tests/models/test_semantic_segmentation.py
Original file line number Diff line number Diff line change
@@ -552,7 +552,7 @@ def test_functional_segmentor(
output_list = semantic_segmentor.predict(
file_list,
mode="tile",
on_gpu=ON_GPU,
device=select_device(on_gpu=ON_GPU),
ioconfig=ioconfig,
crash_on_exception=True,
save_dir=f"{save_dir}/raw/",
@@ -581,7 +581,7 @@ def test_functional_segmentor(
[mini_wsi_svs],
masks=[mini_wsi_msk],
mode="wsi",
on_gpu=ON_GPU,
device=select_device(on_gpu=ON_GPU),
ioconfig=ioconfig,
crash_on_exception=True,
save_dir=f"{save_dir}/raw/",
@@ -605,7 +605,7 @@ def test_functional_segmentor(
[mini_wsi_svs],
masks=[mini_wsi_msk],
mode="wsi",
on_gpu=ON_GPU,
device=select_device(on_gpu=ON_GPU),
ioconfig=ioconfig,
crash_on_exception=True,
save_dir=f"{save_dir}/raw/",
@@ -631,7 +631,7 @@ def __init__(self: XSegmentor) -> None:
semantic_segmentor.predict(
[mini_wsi_jpg],
mode="tile",
on_gpu=ON_GPU,
device=select_device(on_gpu=ON_GPU),
patch_input_shape=(1024, 1024),
patch_output_shape=(512, 512),
stride_shape=(256, 256),
@@ -661,7 +661,7 @@ def test_functional_pretrained(remote_sample: Callable, tmp_path: Path) -> None:
semantic_segmentor.predict(
[mini_wsi_svs],
mode="wsi",
on_gpu=ON_GPU,
device=select_device(on_gpu=ON_GPU),
crash_on_exception=True,
save_dir=f"{save_dir}/raw/",
)
@@ -672,7 +672,7 @@ def test_functional_pretrained(remote_sample: Callable, tmp_path: Path) -> None:
semantic_segmentor.predict(
[mini_wsi_jpg],
mode="tile",
on_gpu=ON_GPU,
device=select_device(on_gpu=ON_GPU),
crash_on_exception=True,
save_dir=f"{save_dir}/raw/",
)
@@ -699,7 +699,7 @@ def test_behavior_tissue_mask_local(remote_sample: Callable, tmp_path: Path) ->
semantic_segmentor.predict(
[wsi_with_artifacts],
mode="wsi",
on_gpu=True,
device=select_device(on_gpu=ON_GPU),
crash_on_exception=True,
save_dir=save_dir / "raw",
)
@@ -715,7 +715,7 @@ def test_behavior_tissue_mask_local(remote_sample: Callable, tmp_path: Path) ->
semantic_segmentor.predict(
[mini_wsi_jpg],
mode="tile",
on_gpu=True,
device=select_device(on_gpu=ON_GPU),
crash_on_exception=True,
save_dir=f"{save_dir}/raw/",
)
@@ -738,7 +738,7 @@ def test_behavior_bcss_local(remote_sample: Callable, tmp_path: Path) -> None:
semantic_segmentor.predict(
[wsi_breast],
mode="wsi",
on_gpu=True,
device=select_device(on_gpu=ON_GPU),
crash_on_exception=True,
save_dir=save_dir / "raw",
)