Skip to content

Commit

Permalink
BUG: Use custom checkpoint for test stage in DeepMIL (#318)
Browse files Browse the repository at this point in the history
  • Loading branch information
harshita-s committed Apr 21, 2022
1 parent e31236d commit 65818a4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def get_dataloader_kwargs(self) -> dict:
def get_callbacks(self) -> List[Callback]:
return super().get_callbacks() + [self.callbacks]

def get_path_to_best_checkpoint(self) -> Path:
def get_checkpoint_to_test(self) -> Path:
"""
Returns the full path to a checkpoint file that was found to be best during training, whatever criterion
was applied there. This is necessary since for some models the checkpoint is in a subfolder of the checkpoint
Expand Down

1 comment on commit 65818a4

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filename Stmts Miss Cover Missing
/home/runner/work/hi-ml/hi-ml/hi-ml-azure/src/health_azure/datasets.py 147 31 78.91% 131-157,281,310-314,341-347
/home/runner/work/hi-ml/hi-ml/hi-ml-azure/src/health_azure/himl.py 182 2 98.90% 142,541
/home/runner/work/hi-ml/hi-ml/hi-ml-azure/src/health_azure/himl_download.py 27 10 62.96% 42-56
/home/runner/work/hi-ml/hi-ml/hi-ml-azure/src/health_azure/himl_tensorboard.py 56 4 92.86% 87-89,101
/home/runner/work/hi-ml/hi-ml/hi-ml-azure/src/health_azure/paths.py 21 3 85.71% 24,31,46
/home/runner/work/hi-ml/hi-ml/hi-ml-azure/src/health_azure/traverse.py 127 11 91.34% 28,51,62-63,106-107,124,176-177,213,222
/home/runner/work/hi-ml/hi-ml/hi-ml-azure/src/health_azure/utils.py 768 97 87.37% 133-150,156,239,325,345,353-354,416,452,469,472,479,523,538-545,564,570,585-588,590,629-634,639-641,645,649,656-665,688,757,927,1153,1422,1495-1502,1606,1665-1684,1734,1851,1861,1871,1891-1907,1956,2001,2004-2005,2021
/home/runner/work/hi-ml/hi-ml/hi-ml-histopathology/src/SSL/encoders.py 37 0 100.00%
/home/runner/work/hi-ml/hi-ml/hi-ml-histopathology/src/SSL/lightning_metrics.py 101 27 73.27% 44-45,53,58-59,67,72-73,81,95,120,134-135,143,153-165
/home/runner/work/hi-ml/hi-ml/hi-ml-histopathology/src/SSL/ssl_augmentation_config.py 43 0 100.00%
/home/runner/work/hi-ml/hi-ml/hi-ml-histopathology/src/SSL/utils.py 66 10 84.85% 55,59,90,111-121
/home/runner/work/hi-ml/hi-ml/hi-ml-histopathology/src/SSL/configs/CIFAR_SSL_configs.py 11 1 90.91% 33
/home/runner/work/hi-ml/hi-ml/hi-ml-histopathology/src/SSL/configs/CIFAR_classifier_configs.py 5 0 100.00%
/home/runner/work/hi-ml/hi-ml/hi-ml-histopathology/src/SSL/configs/CXR_SSL_configs.py 19 0 100.00%
/home/runner/work/hi-ml/hi-ml/hi-ml-histopathology/src/SSL/configs/CovidContainers.py 8 1 87.50% 20
/home/runner/work/hi-ml/hi-ml/hi-ml-histopathology/src/SSL/data/cifar_datasets.py 10 1 90.00% 30
/home/runner/work/hi-ml/hi-ml/hi-ml-histopathology/src/SSL/data/cxr_datasets.py 97 32 67.01% 42,49-51,70,141-143,163-164,167-179,190-197,201,210-218
/home/runner/work/hi-ml/hi-ml/hi-ml-histopathology/src/SSL/data/datamodules.py 75 3 96.00% 83-85,133
/home/runner/work/hi-ml/hi-ml/hi-ml-histopathology/src/SSL/data/dataset_cls_utils.py 15 1 93.33% 32
/home/runner/work/hi-ml/hi-ml/hi-ml-histopathology/src/SSL/data/image_transforms.py 54 2 96.30% 33,53
/home/runner/work/hi-ml/hi-ml/hi-ml-histopathology/src/SSL/data/io_util.py 29 6 79.31% 62-68
/home/runner/work/hi-ml/hi-ml/hi-ml-histopathology/src/SSL/data/transform_pipeline.py 60 8 86.67% 71-74,79-82,123
/home/runner/work/hi-ml/hi-ml/hi-ml-histopathology/src/SSL/data/transforms_utils.py 29 0 100.00%
/home/runner/work/hi-ml/hi-ml/hi-ml-histopathology/src/SSL/lightning_containers/ssl_container.py 126 6 95.24% 127,201,286-297
/home/runner/work/hi-ml/hi-ml/hi-ml-histopathology/src/SSL/lightning_containers/ssl_image_classifier.py 29 1 96.55% 39
/home/runner/work/hi-ml/hi-ml/hi-ml-histopathology/src/SSL/lightning_modules/simclr_module.py 47 0 100.00%
/home/runner/work/hi-ml/hi-ml/hi-ml-histopathology/src/SSL/lightning_modules/ssl_classifier_module.py 55 3 94.55% 50-51,58
/home/runner/work/hi-ml/hi-ml/hi-ml-histopathology/src/SSL/lightning_modules/ssl_online_evaluator.py 98 4 95.92% 62,100,105,111
/home/runner/work/hi-ml/hi-ml/hi-ml-histopathology/src/SSL/lightning_modules/byol/byol_models.py 26 0 100.00%
/home/runner/work/hi-ml/hi-ml/hi-ml-histopathology/src/SSL/lightning_modules/byol/byol_module.py 71 1 98.59% 143
/home/runner/work/hi-ml/hi-ml/hi-ml-histopathology/src/SSL/lightning_modules/byol/byol_moving_average.py 24 0 100.00%
/home/runner/work/hi-ml/hi-ml/hi-ml/src/health_ml/deep_learning_config.py 179 19 89.39% 90,105,109-113,174,333,338-343,351-353,421
/home/runner/work/hi-ml/hi-ml/hi-ml/src/health_ml/experiment_config.py 9 0 100.00%
/home/runner/work/hi-ml/hi-ml/hi-ml/src/health_ml/lightning_container.py 83 10 87.95% 68,94,109,159,168-169,189,231-234
/home/runner/work/hi-ml/hi-ml/hi-ml/src/health_ml/model_trainer.py 113 19 83.19% 64-73,85-86,111,114-115,124,133,207-210,240-241
/home/runner/work/hi-ml/hi-ml/hi-ml/src/health_ml/run_ml.py 96 18 81.25% 38-42,85-90,134-135,162,169,188,192,206
/home/runner/work/hi-ml/hi-ml/hi-ml/src/health_ml/runner.py 150 18 88.00% 58,160-162,216-217,232-233,249,267,292-297,343-345,349,353
/home/runner/work/hi-ml/hi-ml/hi-ml/src/health_ml/configs/hello_world.py 109 14 87.16% 41-51,93-95
/home/runner/work/hi-ml/hi-ml/hi-ml/src/health_ml/networks/layers/attention_layers.py 89 3 96.63% 156-158
/home/runner/work/hi-ml/hi-ml/hi-ml/src/health_ml/utils/bag_utils.py 87 15 82.76% 117,143-144,147,150-155,166,169-175
/home/runner/work/hi-ml/hi-ml/hi-ml/src/health_ml/utils/box_utils.py 49 18 63.27% 30,32,41-43,54,65,73,81,94-101,110
/home/runner/work/hi-ml/hi-ml/hi-ml/src/health_ml/utils/checkpoint_handler.py 65 26 60.00% 47,85-89,103-116,122-134
/home/runner/work/hi-ml/hi-ml/hi-ml/src/health_ml/utils/checkpoint_utils.py 78 28 64.10% 52-70,84-92,102-106,119-120,135-136,147,152
/home/runner/work/hi-ml/hi-ml/hi-ml/src/health_ml/utils/common_utils.py 153 20 86.93% 70-71,96,149,151,178-180,234-235,238-240,243,247-249,262,268,332
/home/runner/work/hi-ml/hi-ml/hi-ml/src/health_ml/utils/config_loader.py 83 4 95.18% 80,112,119-120
/home/runner/work/hi-ml/hi-ml/hi-ml/src/health_ml/utils/data_augmentations.py 74 1 98.65% 76
/home/runner/work/hi-ml/hi-ml/hi-ml/src/health_ml/utils/diagnostics.py 123 0 100.00%
/home/runner/work/hi-ml/hi-ml/hi-ml/src/health_ml/utils/fixed_paths.py 15 5 66.67% 21,38,45-47
/home/runner/work/hi-ml/hi-ml/hi-ml/src/health_ml/utils/lightning_loggers.py 61 23 62.30% 34-35,40,45-50,61,64,67,74,87-98,110
/home/runner/work/hi-ml/hi-ml/hi-ml/src/health_ml/utils/logging.py 182 5 97.25% 77-79,149,274
/home/runner/work/hi-ml/hi-ml/hi-ml/src/health_ml/utils/lr_scheduler.py 80 60 25.00% 19,28-33,36-40,43,48-51,54-55,65-78,85-116,125-130,138-141,149-160,163
/home/runner/work/hi-ml/hi-ml/hi-ml/src/health_ml/utils/model_util.py 13 7 46.15% 16-36
/home/runner/work/hi-ml/hi-ml/hi-ml/src/health_ml/utils/regression_test_utils.py 98 1 98.98% 127
/home/runner/work/hi-ml/hi-ml/hi-ml/src/health_ml/utils/reports.py 225 11 95.11% 79,81,271,305,360,362,437,471,483-484,492
/home/runner/work/hi-ml/hi-ml/hi-ml/src/health_ml/utils/serialization.py 92 10 89.13% 96,116,119-120,125-126,150,153,157-158
/home/runner/work/hi-ml/hi-ml/hi-ml/src/health_ml/utils/split_dataset.py 109 32 70.64% 49,57,65-66,87-88,98-105,125,129,133,141-142,274,300-322
/home/runner/work/hi-ml/hi-ml/hi-ml/src/health_ml/utils/type_annotations.py 9 0 100.00%
/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/health_azure/datasets.py 147 38 74.15% 32-36,39,51,56-64,110,118,139,209,261-290,313-314
/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/health_azure/himl.py 182 44 75.82% 130,142,146,152,156,161,166-170,197-203,227-228,232-233,235,240-244,279-287,305,515,535,541,554,568-572,594,603,632-643
/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/health_azure/himl_download.py 27 27 0.00% 6-58
/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/health_azure/himl_tensorboard.py 56 56 0.00% 6-107
/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/health_azure/paths.py 21 21 0.00% 6-48
/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/health_azure/traverse.py 127 110 13.39% 18,28,40-63,72-75,87-107,123-130,141,152-153,166-230,244-253,266-267
/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/health_azure/utils.py 768 419 45.44% 113-117,133-150,156,169-176,223-228,239,243,247,249-250,257,271-284,290,324-325,345,353-359,366,410,414,416,450,452,465-483,496-502,513,523,538-545,561-570,586,589-591,601-602,629-634,639-641,645,649,656-665,688,692,728,749,762,769,792-802,815-822,833-838,860-864,879,892,904-912,922-927,933-936,945-949,953,970-982,999-1007,1023-1036,1046-1050,1060,1073-1085,1101-1157,1185-1186,1192,1222,1261-1275,1282-1298,1314-1315,1345-1346,1392-1394,1422,1479,1495-1502,1514-1515,1567-1573,1605-1616,1665-1684,1708-1709,1734,1748-1749,1768,1816-1829,1850-1877,1892,1895-1900,1940-1944,1954-1962,1976,1983-1985,1998-2027
TOTAL 6215 1347 78.33%

Please sign in to comment.