Skip to content

Commit

Permalink
TST: update tests for dev branch (#143)
Browse files Browse the repository at this point in the history
* begin to update tests

* do not resize images prior to transform

This introduces subtle differences from the current stable version of
wsinfer.

* fix for issue #125

* do not save slide path in model outputs csv

* add test_cli_run_with_registered_models

* add reference model outputs

These reference outputs were created using a patched version of 0.3.6
wsinfer. The patches involved padding the patches from large-image to be
the expected patch size. Large image does not pad images by default,
whereas openslide and tiffslide pad with black.

* skip jit tests and cli with custom config
  • Loading branch information
kaczmarj authored Jul 12, 2023
1 parent bb0316f commit caedf0e
Show file tree
Hide file tree
Showing 11 changed files with 1,185 additions and 835 deletions.
145 changes: 145 additions & 0 deletions tests/reference/breast-tumor-inception_v4.tcga-brca/purple.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
minx,miny,width,height,prob_notumor,prob_tumor
0,0,350,350,0.9564111828804016,0.0435887686908245
0,350,350,350,0.9564111828804016,0.0435887686908245
0,700,350,350,0.9564111828804016,0.0435887686908245
0,1050,350,350,0.9564111828804016,0.0435887686908245
0,1400,350,350,0.9564111828804016,0.0435887686908245
0,1750,350,350,0.9564111828804016,0.0435887686908245
0,2100,350,350,0.9564111828804016,0.0435887686908245
0,2450,350,350,0.9564111828804016,0.0435887686908245
0,2800,350,350,0.9564111828804016,0.0435887686908245
0,3150,350,350,0.9564111828804016,0.0435887686908245
0,3500,350,350,0.9564111828804016,0.0435887686908245
0,3850,350,350,0.9600746631622314,0.0399253033101558
350,0,350,350,0.9564111828804016,0.0435887686908245
350,350,350,350,0.9564111828804016,0.0435887686908245
350,700,350,350,0.9564111828804016,0.0435887686908245
350,1050,350,350,0.9564111828804016,0.0435887686908245
350,1400,350,350,0.9564111828804016,0.0435887686908245
350,1750,350,350,0.9564111828804016,0.0435887686908245
350,2100,350,350,0.9564111828804016,0.0435887686908245
350,2450,350,350,0.9564111828804016,0.0435887686908245
350,2800,350,350,0.9564111828804016,0.0435887686908245
350,3150,350,350,0.9564111828804016,0.0435887686908245
350,3500,350,350,0.9564111828804016,0.0435887686908245
350,3850,350,350,0.9600746631622314,0.0399253033101558
700,0,350,350,0.9564111828804016,0.0435887686908245
700,350,350,350,0.9564111828804016,0.0435887686908245
700,700,350,350,0.9564111828804016,0.0435887686908245
700,1050,350,350,0.9564111828804016,0.0435887686908245
700,1400,350,350,0.9564111828804016,0.0435887686908245
700,1750,350,350,0.9564111828804016,0.0435887686908245
700,2100,350,350,0.9564111828804016,0.0435887686908245
700,2450,350,350,0.9564111828804016,0.0435887686908245
700,2800,350,350,0.9564111828804016,0.0435887686908245
700,3150,350,350,0.9564111828804016,0.0435887686908245
700,3500,350,350,0.9564111828804016,0.0435887686908245
700,3850,350,350,0.9600746631622314,0.0399253033101558
1050,0,350,350,0.9564111828804016,0.0435887686908245
1050,350,350,350,0.9564111828804016,0.0435887686908245
1050,700,350,350,0.9564111828804016,0.0435887686908245
1050,1050,350,350,0.9564111828804016,0.0435887686908245
1050,1400,350,350,0.9564111828804016,0.0435887686908245
1050,1750,350,350,0.9564111828804016,0.0435887686908245
1050,2100,350,350,0.9564111828804016,0.0435887686908245
1050,2450,350,350,0.9564111828804016,0.0435887686908245
1050,2800,350,350,0.9564111828804016,0.0435887686908245
1050,3150,350,350,0.9564111828804016,0.0435887686908245
1050,3500,350,350,0.9564111828804016,0.0435887686908245
1050,3850,350,350,0.9600746631622314,0.0399253033101558
1400,0,350,350,0.9564111828804016,0.0435887686908245
1400,350,350,350,0.9564111828804016,0.0435887686908245
1400,700,350,350,0.9564111828804016,0.0435887686908245
1400,1050,350,350,0.9564111828804016,0.0435887686908245
1400,1400,350,350,0.9564111828804016,0.0435887686908245
1400,1750,350,350,0.9564111828804016,0.0435887686908245
1400,2100,350,350,0.9564111828804016,0.0435887686908245
1400,2450,350,350,0.9564111828804016,0.0435887686908245
1400,2800,350,350,0.9564111828804016,0.0435887686908245
1400,3150,350,350,0.9564111828804016,0.0435887686908245
1400,3500,350,350,0.9564111828804016,0.0435887686908245
1400,3850,350,350,0.9600746631622314,0.0399253033101558
1750,0,350,350,0.9564111828804016,0.0435887686908245
1750,350,350,350,0.9564111828804016,0.0435887686908245
1750,700,350,350,0.9564111828804016,0.0435887686908245
1750,1050,350,350,0.9564111828804016,0.0435887686908245
1750,1400,350,350,0.9564111828804016,0.0435887686908245
1750,1750,350,350,0.9564111828804016,0.0435887686908245
1750,2100,350,350,0.9564111828804016,0.0435887686908245
1750,2450,350,350,0.9564111828804016,0.0435887686908245
1750,2800,350,350,0.9564111828804016,0.0435887686908245
1750,3150,350,350,0.9564111828804016,0.0435887686908245
1750,3500,350,350,0.9564111828804016,0.0435887686908245
1750,3850,350,350,0.9600746631622314,0.0399253033101558
2100,0,350,350,0.9564111828804016,0.0435887686908245
2100,350,350,350,0.9564111828804016,0.0435887686908245
2100,700,350,350,0.9564111828804016,0.0435887686908245
2100,1050,350,350,0.9564111828804016,0.0435887686908245
2100,1400,350,350,0.9564111828804016,0.0435887686908245
2100,1750,350,350,0.9564111828804016,0.0435887686908245
2100,2100,350,350,0.9564111828804016,0.0435887686908245
2100,2450,350,350,0.9564111828804016,0.0435887686908245
2100,2800,350,350,0.9564111828804016,0.0435887686908245
2100,3150,350,350,0.9564111828804016,0.0435887686908245
2100,3500,350,350,0.9564111828804016,0.0435887686908245
2100,3850,350,350,0.9600746631622314,0.0399253033101558
2450,0,350,350,0.9564111828804016,0.0435887686908245
2450,350,350,350,0.9564111828804016,0.0435887686908245
2450,700,350,350,0.9564111828804016,0.0435887686908245
2450,1050,350,350,0.9564111828804016,0.0435887686908245
2450,1400,350,350,0.9564111828804016,0.0435887686908245
2450,1750,350,350,0.9564111828804016,0.0435887686908245
2450,2100,350,350,0.9564111828804016,0.0435887686908245
2450,2450,350,350,0.9564111828804016,0.0435887686908245
2450,2800,350,350,0.9564111828804016,0.0435887686908245
2450,3150,350,350,0.9564111828804016,0.0435887686908245
2450,3500,350,350,0.9564111828804016,0.0435887686908245
2450,3850,350,350,0.9600746631622314,0.0399253033101558
2800,0,350,350,0.9564111828804016,0.0435887686908245
2800,350,350,350,0.9564111828804016,0.0435887686908245
2800,700,350,350,0.9564111828804016,0.0435887686908245
2800,1050,350,350,0.9564111828804016,0.0435887686908245
2800,1400,350,350,0.9564111828804016,0.0435887686908245
2800,1750,350,350,0.9564111828804016,0.0435887686908245
2800,2100,350,350,0.9564111828804016,0.0435887686908245
2800,2450,350,350,0.9564111828804016,0.0435887686908245
2800,2800,350,350,0.9564111828804016,0.0435887686908245
2800,3150,350,350,0.9564111828804016,0.0435887686908245
2800,3500,350,350,0.9564111828804016,0.0435887686908245
2800,3850,350,350,0.9600746631622314,0.0399253033101558
3150,0,350,350,0.9564111828804016,0.0435887686908245
3150,350,350,350,0.9564111828804016,0.0435887686908245
3150,700,350,350,0.9564111828804016,0.0435887686908245
3150,1050,350,350,0.9564111828804016,0.0435887686908245
3150,1400,350,350,0.9564111828804016,0.0435887686908245
3150,1750,350,350,0.9564111828804016,0.0435887686908245
3150,2100,350,350,0.9564111828804016,0.0435887686908245
3150,2450,350,350,0.9564111828804016,0.0435887686908245
3150,2800,350,350,0.9564111828804016,0.0435887686908245
3150,3150,350,350,0.9564111828804016,0.0435887686908245
3150,3500,350,350,0.9564111828804016,0.0435887686908245
3150,3850,350,350,0.9600746631622314,0.0399253033101558
3500,0,350,350,0.9564111828804016,0.0435887686908245
3500,350,350,350,0.9564111828804016,0.0435887686908245
3500,700,350,350,0.9564111828804016,0.0435887686908245
3500,1050,350,350,0.9564111828804016,0.0435887686908245
3500,1400,350,350,0.9564111828804016,0.0435887686908245
3500,1750,350,350,0.9564111828804016,0.0435887686908245
3500,2100,350,350,0.9564111828804016,0.0435887686908245
3500,2450,350,350,0.9564111828804016,0.0435887686908245
3500,2800,350,350,0.9564111828804016,0.0435887463390827
3500,3150,350,350,0.9564111828804016,0.0435887463390827
3500,3500,350,350,0.9564111828804016,0.0435887463390827
3500,3850,350,350,0.9600746631622314,0.0399253405630588
3850,0,350,350,0.967224657535553,0.0327753536403179
3850,350,350,350,0.967224657535553,0.0327753536403179
3850,700,350,350,0.967224657535553,0.0327753536403179
3850,1050,350,350,0.967224657535553,0.0327753536403179
3850,1400,350,350,0.967224657535553,0.0327753536403179
3850,1750,350,350,0.967224657535553,0.0327753536403179
3850,2100,350,350,0.967224657535553,0.0327753536403179
3850,2450,350,350,0.967224657535553,0.0327753536403179
3850,2800,350,350,0.967224657535553,0.0327753536403179
3850,3150,350,350,0.967224657535553,0.0327753536403179
3850,3500,350,350,0.967224657535553,0.0327753536403179
3850,3850,350,350,0.9655932784080504,0.0344067215919494
145 changes: 145 additions & 0 deletions tests/reference/breast-tumor-resnet34.tcga-brca/purple.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
minx,miny,width,height,prob_notumor,prob_tumor
0,0,350,350,0.9525965452194214,0.0474034734070301
0,350,350,350,0.9525965452194214,0.0474034734070301
0,700,350,350,0.9525965452194214,0.0474034734070301
0,1050,350,350,0.9525965452194214,0.0474034734070301
0,1400,350,350,0.9525965452194214,0.0474034734070301
0,1750,350,350,0.9525965452194214,0.0474034734070301
0,2100,350,350,0.9525965452194214,0.0474034734070301
0,2450,350,350,0.9525965452194214,0.0474034734070301
0,2800,350,350,0.9525965452194214,0.0474034734070301
0,3150,350,350,0.9525965452194214,0.0474034734070301
0,3500,350,350,0.9525965452194214,0.0474034734070301
0,3850,350,350,0.983870267868042,0.0161297302693128
350,0,350,350,0.9525965452194214,0.0474034734070301
350,350,350,350,0.9525965452194214,0.0474034734070301
350,700,350,350,0.9525965452194214,0.0474034734070301
350,1050,350,350,0.9525965452194214,0.0474034734070301
350,1400,350,350,0.9525965452194214,0.0474034734070301
350,1750,350,350,0.9525965452194214,0.0474034734070301
350,2100,350,350,0.9525965452194214,0.0474034734070301
350,2450,350,350,0.9525965452194214,0.0474034734070301
350,2800,350,350,0.9525965452194214,0.0474034734070301
350,3150,350,350,0.9525965452194214,0.0474034734070301
350,3500,350,350,0.9525965452194214,0.0474034734070301
350,3850,350,350,0.983870267868042,0.0161297302693128
700,0,350,350,0.9525965452194214,0.0474034734070301
700,350,350,350,0.9525965452194214,0.0474034734070301
700,700,350,350,0.9525965452194214,0.0474034734070301
700,1050,350,350,0.9525965452194214,0.0474034734070301
700,1400,350,350,0.9525965452194214,0.0474034734070301
700,1750,350,350,0.9525965452194214,0.0474034734070301
700,2100,350,350,0.9525965452194214,0.0474034734070301
700,2450,350,350,0.9525965452194214,0.0474034734070301
700,2800,350,350,0.9525965452194214,0.0474034734070301
700,3150,350,350,0.9525965452194214,0.0474034734070301
700,3500,350,350,0.9525965452194214,0.0474034734070301
700,3850,350,350,0.983870267868042,0.0161297302693128
1050,0,350,350,0.9525965452194214,0.0474034734070301
1050,350,350,350,0.9525965452194214,0.0474034734070301
1050,700,350,350,0.9525965452194214,0.0474034734070301
1050,1050,350,350,0.9525965452194214,0.0474034734070301
1050,1400,350,350,0.9525965452194214,0.0474034734070301
1050,1750,350,350,0.9525965452194214,0.0474034734070301
1050,2100,350,350,0.9525965452194214,0.0474034734070301
1050,2450,350,350,0.9525965452194214,0.0474034734070301
1050,2800,350,350,0.9525965452194214,0.0474034734070301
1050,3150,350,350,0.9525965452194214,0.0474034734070301
1050,3500,350,350,0.9525965452194214,0.0474034734070301
1050,3850,350,350,0.983870267868042,0.0161297302693128
1400,0,350,350,0.9525965452194214,0.0474034734070301
1400,350,350,350,0.9525965452194214,0.0474034734070301
1400,700,350,350,0.9525965452194214,0.0474034734070301
1400,1050,350,350,0.9525965452194214,0.0474034734070301
1400,1400,350,350,0.9525965452194214,0.0474034734070301
1400,1750,350,350,0.9525965452194214,0.0474034734070301
1400,2100,350,350,0.9525965452194214,0.0474034734070301
1400,2450,350,350,0.9525965452194214,0.0474034734070301
1400,2800,350,350,0.9525965452194214,0.0474034734070301
1400,3150,350,350,0.9525965452194214,0.0474034734070301
1400,3500,350,350,0.9525965452194214,0.0474034734070301
1400,3850,350,350,0.983870267868042,0.0161297302693128
1750,0,350,350,0.9525965452194214,0.0474034734070301
1750,350,350,350,0.9525965452194214,0.0474034734070301
1750,700,350,350,0.9525965452194214,0.0474034734070301
1750,1050,350,350,0.9525965452194214,0.0474034734070301
1750,1400,350,350,0.9525965452194214,0.0474034734070301
1750,1750,350,350,0.9525965452194214,0.0474034734070301
1750,2100,350,350,0.9525965452194214,0.0474034734070301
1750,2450,350,350,0.9525965452194214,0.0474034734070301
1750,2800,350,350,0.9525965452194214,0.0474034734070301
1750,3150,350,350,0.9525965452194214,0.0474034734070301
1750,3500,350,350,0.9525965452194214,0.0474034734070301
1750,3850,350,350,0.983870267868042,0.0161297302693128
2100,0,350,350,0.9525965452194214,0.0474034734070301
2100,350,350,350,0.9525965452194214,0.0474034734070301
2100,700,350,350,0.9525965452194214,0.0474034734070301
2100,1050,350,350,0.9525965452194214,0.0474034734070301
2100,1400,350,350,0.9525965452194214,0.0474034734070301
2100,1750,350,350,0.9525965452194214,0.0474034734070301
2100,2100,350,350,0.9525965452194214,0.0474034734070301
2100,2450,350,350,0.9525965452194214,0.0474034734070301
2100,2800,350,350,0.9525965452194214,0.0474034734070301
2100,3150,350,350,0.9525965452194214,0.0474034734070301
2100,3500,350,350,0.9525965452194214,0.0474034734070301
2100,3850,350,350,0.983870267868042,0.0161297302693128
2450,0,350,350,0.9525965452194214,0.0474034734070301
2450,350,350,350,0.9525965452194214,0.0474034734070301
2450,700,350,350,0.9525965452194214,0.0474034734070301
2450,1050,350,350,0.9525965452194214,0.0474034734070301
2450,1400,350,350,0.9525965452194214,0.0474034734070301
2450,1750,350,350,0.9525965452194214,0.0474034734070301
2450,2100,350,350,0.9525965452194214,0.0474034734070301
2450,2450,350,350,0.9525965452194214,0.0474034734070301
2450,2800,350,350,0.9525965452194214,0.0474034734070301
2450,3150,350,350,0.9525965452194214,0.0474034734070301
2450,3500,350,350,0.9525965452194214,0.0474034734070301
2450,3850,350,350,0.983870267868042,0.0161297302693128
2800,0,350,350,0.9525965452194214,0.0474034734070301
2800,350,350,350,0.9525965452194214,0.0474034734070301
2800,700,350,350,0.9525965452194214,0.0474034734070301
2800,1050,350,350,0.9525965452194214,0.0474034734070301
2800,1400,350,350,0.9525965452194214,0.0474034734070301
2800,1750,350,350,0.9525965452194214,0.0474034734070301
2800,2100,350,350,0.9525965452194214,0.0474034734070301
2800,2450,350,350,0.9525965452194214,0.0474034734070301
2800,2800,350,350,0.9525965452194214,0.0474034734070301
2800,3150,350,350,0.9525965452194214,0.0474034734070301
2800,3500,350,350,0.9525965452194214,0.0474034734070301
2800,3850,350,350,0.983870267868042,0.0161297302693128
3150,0,350,350,0.9525965452194214,0.0474034734070301
3150,350,350,350,0.9525965452194214,0.0474034734070301
3150,700,350,350,0.9525965452194214,0.0474034734070301
3150,1050,350,350,0.9525965452194214,0.0474034734070301
3150,1400,350,350,0.9525965452194214,0.0474034734070301
3150,1750,350,350,0.9525965452194214,0.0474034734070301
3150,2100,350,350,0.9525965452194214,0.0474034734070301
3150,2450,350,350,0.9525965452194214,0.0474034734070301
3150,2800,350,350,0.9525965452194214,0.0474034734070301
3150,3150,350,350,0.9525965452194214,0.0474034734070301
3150,3500,350,350,0.9525965452194214,0.0474034734070301
3150,3850,350,350,0.983870267868042,0.0161297302693128
3500,0,350,350,0.9525965452194214,0.0474034734070301
3500,350,350,350,0.9525965452194214,0.0474034734070301
3500,700,350,350,0.9525965452194214,0.0474034734070301
3500,1050,350,350,0.9525965452194214,0.0474034734070301
3500,1400,350,350,0.9525965452194214,0.0474034734070301
3500,1750,350,350,0.9525965452194214,0.0474034734070301
3500,2100,350,350,0.9525965452194214,0.0474034734070301
3500,2450,350,350,0.9525965452194214,0.0474034734070301
3500,2800,350,350,0.9525965452194214,0.0474034063518047
3500,3150,350,350,0.9525965452194214,0.0474034063518047
3500,3500,350,350,0.9525965452194214,0.0474034063518047
3500,3850,350,350,0.983870267868042,0.0161297619342803
3850,0,350,350,0.9536041617393494,0.0463958717882633
3850,350,350,350,0.9536041617393494,0.0463958717882633
3850,700,350,350,0.9536041617393494,0.0463958717882633
3850,1050,350,350,0.9536041617393494,0.0463958717882633
3850,1400,350,350,0.9536041617393494,0.0463958717882633
3850,1750,350,350,0.9536041617393494,0.0463958717882633
3850,2100,350,350,0.9536041617393494,0.0463958717882633
3850,2450,350,350,0.9536041617393494,0.0463958717882633
3850,2800,350,350,0.9536041617393494,0.0463958717882633
3850,3150,350,350,0.9536041617393494,0.0463958717882633
3850,3500,350,350,0.9536041617393494,0.0463958717882633
3850,3850,350,350,0.9831942915916444,0.0168057028204202
Loading

0 comments on commit caedf0e

Please sign in to comment.