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

558 Коммитов

Автор SHA1 Сообщение Дата
Fernando Pérez-García 8dc39808ea
TEST: Update CI to compute and upload coverage for hi-ml-multimodal (#685)
Resolves #513.
2022-11-29 21:31:37 +00:00
Fernando Pérez-García 927a2d3ae1
DOC: Refer to CONTRIBUTING for list valid prefixes (#686)
The list of valid prefixes is out of date. Instead of manually syncing
with the docs, I propose linking to them.
2022-11-29 21:29:52 +00:00
Kenza Bouzid bdb89d0b8d
ENH: Enable adding additional env variables from container (#689)
add get_additional_environment_variables to Lightning container to be
able to flexibly add experiments specific env variables, e.g. Azure
mounting env variables for large file experiments... this can be
overridden in the config file directly.
2022-11-29 19:23:12 +00:00
Melissa Bristow a079da888b
FIX: Replace special characters in experiment name with underscores (#688)
Replace all non-alphanumeric characters (except single underscores) in
experiment name with underscores
2022-11-29 09:21:37 +00:00
Anton Schwaighofer e81323f589
ENH: Group AML experiments by PR number (#681)
Ensure that all AML experiments that originate from a PR are submitted
to the same experiment.
- Add capability to hardcode experiment name for AML submission via an
environment variable
- Add a PR job that looks for running AML jobs and cancels them
- Add timeouts for all smoke test jobs
2022-11-28 14:26:24 +00:00
Kenza Bouzid 7c95a4f471
BUG: Cast true labels to int in results dictionary (#682) 2022-11-25 15:10:31 +00:00
Kenza Bouzid 4f1e5f2859
ENH: Enable custom datastore name when running outside AML (#679) 2022-11-25 12:45:27 +00:00
Kenza Bouzid f0b0a5d83e
ENH: Enable custom workspace config path (#678)
Add workspace_config_path param
2022-11-25 12:45:09 +00:00
Kenza Bouzid c98b27a0d7
ENH: Extract coordinates from tensors metada (#677)
- Add coordinates to slides pipeline
- Refactor DeepMILModule into a single class

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-11-24 15:21:27 +00:00
Anton Schwaighofer 00d29fd26f
BUG: Add symbolic link that had gotten deleted by accident (#676)
Undo an accident from #653
2022-11-23 11:45:27 +00:00
Kenza Bouzid 615c8ad188
ENH: Enable LoadROId with Openslide (#672)
Refactor LoadRoiD/LoadPandaRoid transforms to work with OpenSlide and
removed params redundancy with LoadingParams class.

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-11-22 22:51:34 +00:00
Kenza Bouzid a1d24a8a63
ENH: Fix security Alerts (#675)
Update pillow to 9.3.0
2022-11-22 11:43:55 +00:00
Kenza Bouzid e68f9b1db7
ENH: Upgrade monai to 1.0.1 (#668)
Upgrade monai to 1.0.1 
Note that we now need to convert monai outputs to torch tensors since
Rand/GridPatchd transforms return MetaTensors a new data structure in
the latest releases. This is handled in the collate function
2022-11-18 14:20:26 +00:00
Kenza Bouzid 9e812e7ca8
BUG: Use micro average for MultiClassAccuracy (#671)
the default for MultiClassAccuracy is macro [Accuracy — PyTorch-Metrics
0.10.3 documentation
(torchmetrics.readthedocs.io)](https://torchmetrics.readthedocs.io/en/stable/classification/accuracy.html#multiclassaccuracy)

But base class (which we were using before) is micro [Accuracy —
PyTorch-Metrics 0.10.3 documentation
(torchmetrics.readthedocs.io)](https://torchmetrics.readthedocs.io/en/stable/classification/accuracy.html)

We need to set average=micro
2022-11-18 14:19:27 +00:00
Kenza Bouzid 37c7860f2f
BUG: Remove permalinks checks from precommit hooks (#667)
Remove permalink checks from precommit checks.
2022-11-17 17:28:28 +00:00
Kenza Bouzid 321de75cb3
BUG: Fix hanging smoke tests (#666)
Main changes:
- Change prints to logging.info to prevent all ranks from logging
- Run smoke tests with --striclty_aml_v1 flag to be able to wait for
completion
- Set progress=False of LoadTilesBtachd to avoid unnecessary verbosity
in logs
- Fix regression after merge: kill_ddp_processes right after
run_training because we run extra val epoch on a single device
- Remove a test that does nothing
- Use binary/multiclass metrics
- Ignore PL warnings
2022-11-16 14:59:05 +00:00
Kenza Bouzid c4e25b8a79
BUG: Remove all calls to get_ml_client outside v2 (#665)
There was still another call to get_ml_client that was asking for
credentials again preventing running on aml v1 strictly
2022-11-16 11:07:42 +00:00
Kenza Bouzid a597534462
ENH: Upgrade azureml packages (#664)
Our logs are very noisy at the moment with packages compatibility
warnings. This should fix it.
2022-11-16 10:57:05 +00:00
Kenza Bouzid 8b91cd0a7e
BUG: Move MlClient call to v2 scope only (#663)
v2 get_ml_client and therefore get_credential gets called when using
--strictly_azureml_v1. Here we move this call to v2 scope only to be
able to use v1 strictly
2022-11-15 15:03:50 +00:00
Kenza Bouzid 4417a8fba4
BUG: Fix mlflow authentication error (#662)
log_hyperparameters fails with ChainedTokenCredential failure because we
were using an mlflow client that is not linked to the local tracking uri
so it was trying to authenticate to Azure to retrieve the run.
2022-11-15 14:23:06 +00:00
Kenza Bouzid a1f580576c
ENH: Parameterize CuCim backend (#661)
Add wsi_reader_args to be able to use different backend
2022-11-15 13:28:59 +00:00
Kenza Bouzid f97d368870
BUG: Raise ClientAuthenticationError in default get credential (#659)
Device Login was skipped because exception not raised
2022-11-14 14:54:44 +00:00
Kenza Bouzid 70885901e8
ENH: Merge Transfer Main (#658)
Merge work items from transferability study.
2022-11-14 12:39:58 +00:00
Kenza Bouzid b8a1ae0bc0 ENH: Small Fixes for Transfer Main merge 2022-11-14 11:24:17 +00:00
Kenza Bouzid 97724f3686 Merge branch 'transfer_main' into kenzab/merge_transfer_main_main 2022-11-11 13:44:47 +00:00
Melissa Bristow 2fd33ab350
ENH: Add display name, tags and shm size to SDK v2 job (#654)
Add display names, tags and docker shm sizes to AML SDK v2 jobs
2022-11-11 13:14:04 +00:00
Kenza Bouzid 1034324c51
ENH: Add pl_replace_sampler_ddp flag for small validation sets (#648)
- Add pl_replace_sampler_ddp to be able to avoid validation data
distribution -> make sure all processes validate on the entire
validation set (reduce will give the same mean)
- Log extra validation outputs with a different prefix
- Refactor ClassifierParams 
- Add specific batch size for inference

Random [broken pipe
error](https://ml.azure.com/experiments/id/c4ad55a7-ce24-46a5-be8e-0fb478edf47e/runs/refs_pull_648_merge_1667920946_f585577d?wsid=/subscriptions/a85ceddd-892e-4637-ae4b-67d15ddf5f2b/resourceGroups/health-ml/providers/Microsoft.MachineLearningServices/workspaces/hi-ml&tid=72f988bf-86f1-41af-91ab-2d7cd011db47#outputsAndLogs)
2022-11-11 13:12:07 +00:00
Kenza Bouzid e30a0d1f6d
ENH: Merge Main into Transfer Main (#653)
Sync 32 commits from main

Co-authored-by: Fernando Pérez-García <fepegar@gmail.com>
Co-authored-by: Shruthi42 <13177030+Shruthi42@users.noreply.github.com>
Co-authored-by: vale-salvatelli <vale-salvatelli@users.noreply.github.com>
Co-authored-by: Melissa Bristow <66642528+mebristo@users.noreply.github.com>
Co-authored-by: Anton Schwaighofer <antonsc@microsoft.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Fernando Pérez-García <fperezgarcia@microsoft.com>
Co-authored-by: Ozan Oktay <ozan.oktay@microsoft.com>
2022-11-10 18:36:40 +00:00
Melissa Bristow e18d37ee84
FIX: Fix bug in saving validation outputs (#649)
Fix bug causing flat validation accuracy plots and upgrade torchmetrics
2022-11-10 14:57:39 +00:00
Anton Schwaighofer b711b2b545
ENH: Add openslide to cpath conda environment (#646)
Add openslide to `hi-ml-cpath conda` environment, so that code can use
either `cucim` or `openslide` as backend. 
Fixed a bug in github action `prepare_cpath_environment`: updated environment was not getting activated
2022-11-10 09:38:57 +00:00
Anton Schwaighofer bc327980f1
ENH: Run tests for histopathology folder in Conda environment (#487)
Tests for histopathology use a hacky environment build from only
the pip section of the Conda environment. Switch tests to using a full Conda environment.
2022-11-09 17:37:07 +00:00
Melissa Bristow 89bb3d4a02
ENH: Enable hyperparameter search with AML SDK v2 (#650)
Enable hyperparameter search with AML SDK v2
2022-11-09 15:50:54 +00:00
Melissa Bristow 0b65bd42cf
ENH: Incorporate AML SDK v2 (#627)
Incorporate the use of AML SDK v2 into the codebase
2022-11-07 14:27:33 +00:00
Harshita Sharma 6ba3cfe685
BUG: Fix HTML report (#647)
In this PR:
- Fix is introduced to handle missing cross-validation rounds (e.g., when a round fails)
- Extra validation epoch is handled
- Downloading the AML metrics json and saving it as a dataframe is separated into two functions (current version gives a `KeyError` when the json is downloaded for the first time)

Co-authored-by: Harshita Sharma <t-hsharma@microsoft.com>
2022-11-07 09:39:09 +00:00
Kenza Bouzid 41d30807aa
ENH: Download Checkpoints across AML workspaces (#642)
Enable checkpoints transfer across AML workspaces

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Anton Schwaighofer <antonsc@microsoft.com>
2022-11-01 17:38:37 +00:00
Kenza Bouzid d54e28d0e6
ENH: Add log every nsteps parameter (#645)
Add log_every_n_steps trainer parameter
2022-10-28 15:13:26 +01:00
maxilse 21c30d8cc1
ENH: HEDJitter update (#643)
Updated the HEDjitter augmentation to reflect the update in
https://github.com/scikit-image/scikit-image/blob/main/skimage/color/colorconv.py#L1463-L1504

In addition, I included a normalization step. Our implementation is now
following exactly
https://github.com/gatsby2016/Augmentation-PyTorch-Transforms/blob/master/myTransforms.py
while using only Pytorch (instead of skimage).
2022-10-28 10:32:37 +00:00
Kenza Bouzid 431ff2769c
ENH: Extend StainNormalisation Transform to work with Slides Pipeline (#644)
Adjust the input/output shapes.
2022-10-28 10:57:02 +01:00
Kenza Bouzid c156faddb9
BUG: Retrieve tiles_ids from outputs dictionary for loss analysis (#641)
Slides pipeline don't have tile_ids in the batch, we instead retrieve
them from results
2022-10-25 12:59:17 +01:00
Anton Schwaighofer 22e68ebc1f
ENH: Switch to new AzureML runtime (#576) 2022-10-24 13:15:13 +01:00
Kenza Bouzid b2e873daa5
ENH: Separate attention heatmap and slide thumbnail plot options (#640)
Dissociate thumbnails and heatmaps plots to flexibly remove/add each of
these plot options.
Motivations: thumbnail plots can be costly, so we might want to omit it
sometime while including heatmap plots and vice versa.
2022-10-24 09:15:38 +01:00
Kenza Bouzid 84e37efc59
ENH: Run extra validation epoch on a single gpu (#639)
Kill DDP processes after run_training and initialize a new trainer
instance with a single device for inference

Co-authored-by: Anton Schwaighofer <antonsc@microsoft.com>
2022-10-21 14:51:13 +01:00
Kenza Bouzid 048f9b2aa9
BUG: Set instance shuffling to True (#638)
Always shuffle tiles in BagDataset.
2022-10-19 17:54:02 +01:00
Kenza Bouzid 2f39328a56
ENH: Enable heatmaps and thumbnails plots for WSI without masks (#637)
Use LoadROId for WSI without masks.
2022-10-19 16:35:52 +01:00
Melissa Bristow 05a49714c2
FIX: Fix test_get_dataset (#636)
I accidentally created a v2 data asset with the same name as a v1
dataset in our test suite. The data asset cannot be removed or renamed,
hence I am renaming the v1 dataset in the test to get it passing again
2022-10-19 14:34:23 +01:00
Kenza Bouzid fa4e0984d0
ENH: Validate model weights before inference (#635)
Add extra validation of model weights with checkpoint
2022-10-19 14:29:10 +01:00
Kenza Bouzid 7e7d3751bf
ENH: Enable running cross validation via amulet (#631)
This solves the error that we encounter when submitting a cross validation run with Amulter via hi-ml runner that expect a cluster argument to be able to launch a crossvalidation. This is necessary as k folds splits are enabled for crossval_count > 1.
2022-10-18 15:48:04 +01:00
Harshita Sharma bbc19ec084
BUG: Checkpoint path not picked up correctly (#630)
Fix for the checkpoint path (of the best metrics checkpoint) not being
correctly picked up on the cluster.
2022-10-13 11:27:39 +01:00
Kenza Bouzid e2c1ca1cb4
ENH: Track validation loss and add entropy value (#629)
Add entropy values to detect ambiguity and track validation loss during training
2022-10-12 13:24:25 +00:00
Kenza Bouzid 85a317d0f7
MNT: Fix YAML syntax for Amulet jobs (#624) (#626)
Cherry pick #624 to transfer_main.
2022-10-12 13:15:17 +01:00