Граф коммитов

332 Коммитов

Автор SHA1 Сообщение Дата
Anton Schwaighofer a3a066e4fe
ENH: Add a structured template for issues (#727) 2022-05-24 11:47:44 +01:00
Peter Hessey bf075678ca
BUG: Fix broken build pipeline by updating package versions (#725)
* ⬇️ Fix cloudpickle to appropriate version range

* ⬆️ Upgrade InnerEye-DICOM-RT Dependency
2022-05-18 09:13:21 +01:00
Fernando Pérez-García a15a1a2ce3
DOC: Add part of the API to the Sphinx docs (#718)
* Add part of the API to the Sphinx docs

* Improve layout of landing page

* Remove redundant caption

* Include all documentation in Sphinx and fix docstrings

* Remove redundant options
2022-04-19 15:04:17 +01:00
Anton Schwaighofer c5b16e5d62
ENH: Customized VSCode Window Color (#712) 2022-04-13 14:47:05 +01:00
Anton Schwaighofer 14b968c282
DOC: Add a smoke-test model for AzureML setup (#708)
- Details how to test AzureML without uploading data.
- Also sneaked in an update of hi-ml to fffbb0f8
2022-04-13 14:05:09 +01:00
Fernando Pérez-García 6aab3b1f93
STYLE: Ensure line breaks at the end of all files (#717)
* Add line breaks at the end of all files

* Handle last line in VS Code settings
2022-04-04 15:08:43 +01:00
Fernando Pérez-García 2edbdc8d64
STYLE: Trim trailing whitespaces with pre-commit (#715) 2022-04-04 10:27:38 +01:00
Fernando Pérez-García 760cbe0305
ENH: Enforce prefixes for pull request titles (#713)
Enforce prefixes for pull request titles

Co-authored-by: Anton Schwaighofer <antonsc@microsoft.com>
2022-03-30 15:18:28 +01:00
Fernando Pérez-García 5aef988b96
Ignore Sphinx build folders (#698) 2022-03-30 14:47:28 +01:00
Fernando Pérez-García 3eaf2f9053
Deprecate manual changelog (#707) 2022-03-29 13:43:50 +01:00
Fernando Pérez-García f1ae24aa69
Update hi-ml submodule (#709) 2022-03-29 08:56:46 +01:00
Jacopo Teneggi b2ae826653
Import submodules to sys.path to fix autodoc's warning (#704) 2022-03-23 21:32:00 +00:00
maxilse 6791dce4c3
Automatically and linearly scale the learning rate of the SSL encoder to the number of GPUS (#667)
The learning rate is now linearly scaled by the number of GPUs available, e.g., lr = 0.001, 8 GPUs are available => lr=0.008.

I tested it for SimCLR and BYOL (https://ml.azure.com/experiments/id/81fa8775-1a25-47ae-9fe7-c13a6b91a421?wsid=/subscriptions/db9fc1d1-b44e-45a8-902d-8c766c255568/resourceGroups/innereyerg/providers/Microsoft.MachineLearningServices/workspaces/innereye4ws&tid=72f988bf-86f1-41af-91ab-2d7cd011db47).

In both cases the results are as expected:

SimCLR: More GPUs give better representations due to larger batches == more negative eaxmples.
BYOL: More GPUs speed up the training but do not give better results.
I did not add any test since we have these two tests already: test_simclr_num_gpus() and test_simclr_num_nodes()
2022-03-22 10:23:39 +00:00
Fernando Pérez-García 45e7d5ff4d
Fix some Sphinx warnings (#699)
* Fix shell lexer name

* Update CHANGELOG

* Fix CHANGELOG

* Fix "html_static_path entry '_static' does not exist"

* Clean up preprocess script

* Fix link to InnerEye-DataQuality

* Use shutil.copy to copy files

* Remove extra info from CHANGELOG

* Fix broken link to LICENSE

* Fix lexer name for YAML

* Remove colons from headers

* Fix InnerEye module not being found
2022-03-22 09:46:15 +00:00
Jacopo Teneggi 95d8b72ae6
Specify `formatter_class=argparse.ArgumentDefaultsHelpFormatter` in `generic_parsing.py` to show default values for arguments in help message (#689) 2022-03-15 17:27:01 +00:00
Anton Schwaighofer f0d2337d1b
Improve setup for running the HelloWorld model in AzureML (#693) 2022-03-15 14:07:28 +00:00
Fernando Pérez-García 63fb8688b0
Update TorchIO version (#677)
* Update TorchIO version

Resolves #672.
2022-03-14 16:50:29 +00:00
Fernando Pérez-García d929ccbd46
Ensure the shape of input patches is compatible with model constraints (#682)
* Ensure patches shape is compatible with model constraints

* Remove test for images that are too small
2022-03-10 17:01:25 +00:00
Javier 3c919dca14
Replace data quality folder with a link to the commit (#692)
* Move to commit link

* Remove build

* Update paper link

* Update README

* Add changelog
2022-03-10 09:14:25 +00:00
Javier 1606729c7a
Clean up legacy code (#671)
* Remove rnns

* Fix flake8

* Edit README

* Edit README

* Remove sequence

* Remove sequence

* Fix all

* Remove more

* Remove ignore

* Fix tests

* Undo config

* Fix config

* Revert pycharm

* Fix tests

* Undo outputlogger

* Fix flake8

* Fix ignore file

* Revert hi-ml

* Disable fail on alert
2022-03-09 14:53:12 +00:00
Fernando Pérez-García 8a78ec8c1e
Pad model outputs if they are smaller than the inputs (#681) 2022-03-09 13:32:26 +00:00
Fernando Pérez-García 5336a67f66
Fix Markdown linting errors (#684) 2022-03-08 16:48:53 +00:00
Fernando Pérez-García b1f3ef54d6
Fix missing separator error in docs Makefile (#683) 2022-03-07 18:00:34 +00:00
Fernando Pérez-García 6b62d8cbcd
Print out name of log level, not only the number (#678) 2022-03-07 10:11:47 +00:00
Harshita Sharma 501f3920c6
Add FP and TN to DeepMIL outputs and configure outputs for multi-class classification (#679) 2022-03-04 16:16:49 +00:00
Dr Kenji Takeda a4c82df78e
Updated README.md (#680)
Add acknowledgements section

Co-authored-by: Fernando Pérez-García <fperezgarcia@microsoft.com>
2022-03-03 16:46:05 +00:00
Daniel Coelho de Castro e984554c9e
Fix DeepMIL metrics bug (#674)
* Fix DeepMIL metrics input bug

* Add first version of metrics tests

* Update submodule

* Add test for DeepMIL metrics inputs

* Clean-up and update submodule

* Update changelog

* Upgrade mlflow due to Component Governance warning
2022-03-01 10:10:13 +01:00
Fernando Pérez-García d7e5d8b5e5
Replace RadIO with TorchIO for patch-based inference (#666)
* Replace RadIO with TorchIO

* Ensure patches are float32 for forward pass

* Update changelog

* Ignore some types to fix mypy errors

* Remove APEX from conda environment in docs example

Co-authored-by: Javier <jaalvare@microsoft.com>
2022-02-23 10:28:11 +00:00
Daniel Coelho de Castro e2ec5cc839
Add subsampling transform and mean pooling (#656)
* Add subsampling transform

* Add option to allow_missing_keys for Subsampled

* Add dropout param to BaseMIL

* Add docstring and tests for Subsampled

* Update changelog

* Update to hi-ml with mean pooling

* Enable mean pooling in DeepMIL

* Add/refactor mean pooling tests

* Update changelog

* Update to latest hi-ml with mean pooling
2022-02-21 11:24:14 +00:00
maxilse 1600ef3ddf
Fix DeepMIL for TCGA CRCK dataset (#659)
While we updated DeepMIL for the Panda dataset to work with the latest changes, we did not update DeepMIL for the TCGA CRCK dataset.

This PR updates how the caching of the encoded tiles is done and how the checkpoints of the DeepMIL model is saved and loaded.

No additional tests are required since these are the same functions that we use for the Panda dataset. For all of them a test already exists.

Last, the PR updates the cudatoolkit version, Anton and I found that this is the root cause for all our problems with ddp
2022-02-16 09:50:59 +00:00
Harshita Sharma 914a89383d
Enable fine-tuning in Deepmil (#650) 2022-02-09 10:01:57 +00:00
Daniel Coelho de Castro eda76357f0
Add dropout to DeepMIL and fix feature extractor setup (#653)
* Add dropout to DeepMILModule, with param in BaseMIL
* Fix feature extractor setup for torchvision models
2022-02-07 13:09:04 +00:00
Anton Schwaighofer d617c8107c
Re-enable Linux build (#655)
Also refactored tests that caused test discovery to slow down
2022-02-04 15:41:42 +00:00
Anton Schwaighofer a6b15166b7
Fix for stuck Linux build: Move pytest to Windows (#652)
Also renamed many build legs so that they can be found more easily in the UI.
2022-02-04 11:20:03 +00:00
maxilse b8fe0eb2f1
Fix in _convert_to_tensor_if_necessary so that also np.array get converted correctly (#649) 2022-02-01 14:53:41 +00:00
Anton Schwaighofer 4fdeed23e4
Workaround for bug in PL 1.5.5: CombinedLoader cannot be used with DDP for training data (#646)
Fix for https://github.com/PyTorchLightning/pytorch-lightning/issues/11632
2022-02-01 14:25:21 +00:00
Harshita Sharma 710bc3661e
Add class-wise metrics logging and confusion matrix to DeepMIL (#647) 2022-02-01 13:13:07 +00:00
vale-salvatelli fb258d5c9a
Enabling DeepSMILE on large encoded datasets (#637)
This PR contains two changes necessary to run DeepSMILE on a large dataset when using the Innereye SSL checkpoint (or any other encoder with high dimension): 1 -option to encode in chunks (this prevents OOM error when performing the encoding) 2 -option to load the cached encoded dataset in CPU (this prevents OOM when loading from the cache)
It also changes how the PNG images are loaded all over the histo pipeline to make the loading faster (see https://hi-ml.readthedocs.io/en/latest/loading_images.html)
2022-01-25 10:31:06 +00:00
Anton Schwaighofer 61d9cab5cc
Cancel queued AzureML jobs when starting a PR build (#640)
AzureML jobs from failed previous PR builds do not get cancelled, consuming excessive resources. Now kill all queued and running jobs before starting new ones.
2022-01-25 09:07:18 +00:00
maxilse 6a4919c361
SimCLR recovery test (#643) 2022-01-24 18:56:54 +00:00
Harshita Sharma 884e3fd7dc
Panda SSL tile selection and binary evaluation (#635)
* panda tile selection and binary label

* changelog

* PR comments

* flake8 errors

* remove reset_index

* update pillow and ipython

Co-authored-by: t-hsharma <t-hsharma@microsoft.com>
2022-01-24 15:10:40 +00:00
Anton Schwaighofer 56ee8b67b5
Fix length problem in SSL Cosine LR (#638)
SimCLR cosine LR scheduler was getting wrong length information when the linear head dataset was longer than the encoder dataset. Also, removed lots of obsolete pytest.skipif.is_windows() annotations.
2022-01-21 15:02:02 +00:00
Harshita Sharma 0b8fe32b38
Plotting heatmap and thumbnails for test PANDA slides (#634)
* heatmap and thumbnail output, deepmil module for panda

* deepmil module panda subclass

* heatmap of selected tiles with correct location

* scaled and shifted rectangle coordinates

* slide dataset at container level

* Instantiate dataset class in basemil

* dataset paths for AML

* heatmap utils selected

* fix mypy and flake8 errors

* mypy error resolved

* address PR comments

* flake8 errors resolved

* PR comments addressed

* add test for plots

* PR comments more

* test for heatmap

* tests for heatmap

* add file comparison plot tests

* reverting test_dict values for other test with hardcoded values

* PR comments Valentina

* PR comments

* change colormap to reds

* remove redundant for loop

Co-authored-by: t-hsharma <t-hsharma@microsoft.com>
2022-01-19 07:08:12 +00:00
Anton Schwaighofer ccb53d01ad
Improve recovery of preempted jobs (#633)
Autosaving checkpoints by default every 1 epoch to a fixed file name. Retiring the "top k" recovery checkpoint notion because that was tied to specific models that needed more than 1 checkpoint.
2022-01-17 12:05:39 +00:00
vale-salvatelli 25db288768
fixing PandaInnereyeSSLMIL (#625)
* fixing PandaInnereSSLMIL
* update hi-ml to latest version (include checkpoint downloader fix and new augmentations)
2022-01-11 17:54:36 +00:00
Anton Schwaighofer 015e9e4829
Moving nii.gz from git lfs to git to simplify the HelloWorld test (#632) 2022-01-11 16:19:17 +00:00
Anton Schwaighofer 1523882e82
Upgrade to PyTorch 1.10 (#585) 2022-01-10 08:59:59 +00:00
Anton Schwaighofer ac6a3128df
SSL Online evaluator: save checkpoints without DDP wrapper (#623) 2022-01-06 14:54:34 +00:00
Anton Schwaighofer e761af0e2f
Bug fix: SSL on multiple nodes used wrong LR scheduler (#628) 2022-01-06 14:12:26 +00:00
Daniel Coelho de Castro 6a4d334a99
Enable tiling non-PANDA WSI datasets (#621)
* Add basic dataset and environment changes

* Add loading/preproc utils

* Back-up PANDA tiling scripts

* Refactor and generalise tiling scripts

* Remove Azure scripts

* Add test WSI file

* Add preprocessing tests

* Update changelog

* Add Linux condition for cuCIM in environment.yml

* Use PANDA instead of TCGA-PRAD in test

* Leave TcgaPradDataset as an example

* Fix skipped InnerEye dataset tests

* Create and test mock slides dataset

* Remove Tests/ML/datasets from pytest discovery
2021-12-16 16:11:55 +00:00