Skip to content

Commit

Permalink
🐛 Fix errors related to new design.
Browse files Browse the repository at this point in the history
  • Loading branch information
shaneahmed committed Nov 21, 2024
1 parent a93ee0c commit 078908f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions tests/models/test_patch_predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down Expand Up @@ -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():
Expand Down
18 changes: 9 additions & 9 deletions tests/models/test_semantic_segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/",
Expand Down Expand Up @@ -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/",
Expand All @@ -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/",
Expand All @@ -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),
Expand Down Expand Up @@ -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/",
)
Expand All @@ -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/",
)
Expand All @@ -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",
)
Expand All @@ -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/",
)
Expand All @@ -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",
)
Expand Down

0 comments on commit 078908f

Please sign in to comment.