@@ -552,7 +552,7 @@ def test_functional_segmentor(
552552 output_list = semantic_segmentor .predict (
553553 file_list ,
554554 mode = "tile" ,
555- on_gpu = ON_GPU ,
555+ device = select_device ( on_gpu = ON_GPU ) ,
556556 ioconfig = ioconfig ,
557557 crash_on_exception = True ,
558558 save_dir = f"{ save_dir } /raw/" ,
@@ -581,7 +581,7 @@ def test_functional_segmentor(
581581 [mini_wsi_svs ],
582582 masks = [mini_wsi_msk ],
583583 mode = "wsi" ,
584- on_gpu = ON_GPU ,
584+ device = select_device ( on_gpu = ON_GPU ) ,
585585 ioconfig = ioconfig ,
586586 crash_on_exception = True ,
587587 save_dir = f"{ save_dir } /raw/" ,
@@ -605,7 +605,7 @@ def test_functional_segmentor(
605605 [mini_wsi_svs ],
606606 masks = [mini_wsi_msk ],
607607 mode = "wsi" ,
608- on_gpu = ON_GPU ,
608+ device = select_device ( on_gpu = ON_GPU ) ,
609609 ioconfig = ioconfig ,
610610 crash_on_exception = True ,
611611 save_dir = f"{ save_dir } /raw/" ,
@@ -631,7 +631,7 @@ def __init__(self: XSegmentor) -> None:
631631 semantic_segmentor .predict (
632632 [mini_wsi_jpg ],
633633 mode = "tile" ,
634- on_gpu = ON_GPU ,
634+ device = select_device ( on_gpu = ON_GPU ) ,
635635 patch_input_shape = (1024 , 1024 ),
636636 patch_output_shape = (512 , 512 ),
637637 stride_shape = (256 , 256 ),
@@ -661,7 +661,7 @@ def test_functional_pretrained(remote_sample: Callable, tmp_path: Path) -> None:
661661 semantic_segmentor .predict (
662662 [mini_wsi_svs ],
663663 mode = "wsi" ,
664- on_gpu = ON_GPU ,
664+ device = select_device ( on_gpu = ON_GPU ) ,
665665 crash_on_exception = True ,
666666 save_dir = f"{ save_dir } /raw/" ,
667667 )
@@ -672,7 +672,7 @@ def test_functional_pretrained(remote_sample: Callable, tmp_path: Path) -> None:
672672 semantic_segmentor .predict (
673673 [mini_wsi_jpg ],
674674 mode = "tile" ,
675- on_gpu = ON_GPU ,
675+ device = select_device ( on_gpu = ON_GPU ) ,
676676 crash_on_exception = True ,
677677 save_dir = f"{ save_dir } /raw/" ,
678678 )
@@ -699,7 +699,7 @@ def test_behavior_tissue_mask_local(remote_sample: Callable, tmp_path: Path) ->
699699 semantic_segmentor .predict (
700700 [wsi_with_artifacts ],
701701 mode = "wsi" ,
702- on_gpu = True ,
702+ device = select_device ( on_gpu = ON_GPU ) ,
703703 crash_on_exception = True ,
704704 save_dir = save_dir / "raw" ,
705705 )
@@ -715,7 +715,7 @@ def test_behavior_tissue_mask_local(remote_sample: Callable, tmp_path: Path) ->
715715 semantic_segmentor .predict (
716716 [mini_wsi_jpg ],
717717 mode = "tile" ,
718- on_gpu = True ,
718+ device = select_device ( on_gpu = ON_GPU ) ,
719719 crash_on_exception = True ,
720720 save_dir = f"{ save_dir } /raw/" ,
721721 )
@@ -738,7 +738,7 @@ def test_behavior_bcss_local(remote_sample: Callable, tmp_path: Path) -> None:
738738 semantic_segmentor .predict (
739739 [wsi_breast ],
740740 mode = "wsi" ,
741- on_gpu = True ,
741+ device = select_device ( on_gpu = ON_GPU ) ,
742742 crash_on_exception = True ,
743743 save_dir = save_dir / "raw" ,
744744 )
0 commit comments