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

558 Коммитов

Автор SHA1 Сообщение Дата
Melissa Bristow 6c9e4c9d17
ENH: Add command line arg for custom SSL checkpoint (#560)
Add command line arg for custom SSL checkpoint
2022-08-09 08:25:49 +01:00
Melissa Bristow d5cb7858c4
ENH: Enable custom SSL encoder checkpoint (#562)
Add command line arg for custom SSL encoder checkpoint
2022-08-08 17:35:19 +01:00
vale-salvatelli 5060e28ea4
ENH: Updating transfer_main to main (#558)
Updating transfer_main to main, this includes

* bug fixes to handle error in saving outputs
* integration test
2022-08-08 11:10:19 +01:00
Harshita Sharma 94efbbf1d0
ENH: Update metrics for binary classification (#557)
In this PR, Average Precision, Specificity, and Cohen Kappa metrics are added for the binary classification case in deepmil.py.
2022-08-08 07:13:02 +01:00
Melissa Bristow 539c8f4edd
BUG: Fix output saving for distributed models (#555)
Reset Accuracy metric after calling compute
2022-08-05 18:56:06 +01:00
Kenza Bouzid c97633913d
ENH: Enable flexible weights initialization from src_checkpoint (#554)
Add flags `pretrain_encoder pretrainer_pooling pretrain_classifier` to init submodules weights from a pretrained checkpoint in `src_checkpoint`
2022-08-05 17:51:18 +01:00
vale-salvatelli 0da84133f1
DOC: Fix broken links in cpath documentation (#547)
Update panda_model.md
2022-08-04 17:08:26 +01:00
Fernando Pérez-García dbca94ce43
FIX: Hotfix HTTP error downloading model with hub (#552) 2022-08-04 16:45:56 +01:00
Kenza Bouzid 122bcc1be3
ENH: Enable flexible finetuning of deepmil submodules (#549)
Add finetuning flags: `tune_encoder tune_pooling tune_classifier` to flexibly finetune each part of the network.
2022-08-04 13:44:16 +01:00
Fernando Pérez-García bdbbf3e812
ENH: Add hubconf to load models without installing (#543)
* Add hubconf file

* Refactor to minimise hubconf dependencies

* Pin hubconf dependencies

* Revert "Pin hubconf dependencies"

This reverts commit bc904a963e as it
didn't seem to work.

* Add support for newer versions of torch

* Add only the model folder to path

* Remove unnecessary try-except block

* Avoid duplicate definition of Hugging Face strings

* Import from a more appropriate module

* Add test to compare package and PyTorch Hub models

* Add version number to package __init__

* Remove branch name from PyTorch Hub repo string

* Check only fields from package model

* Remove unnecessary zip wrap

Co-authored-by: Shruthi42 <13177030+Shruthi42@users.noreply.github.com>

Co-authored-by: Shruthi42 <13177030+Shruthi42@users.noreply.github.com>
2022-08-04 10:22:54 +01:00
Fernando Pérez-García 556c39594a
MNT: Prepare hi-ml-multimodal for PyPI (#545)
* MNT: Prepare package for PyPI

* Update authors field

As suggested by @javier-alvarez.

* Remove keywords and unused path variable

* Fix import
2022-08-03 13:32:41 +01:00
Fernando Pérez-García 822ff24af8
BUG: Fix incompatibility between PIP and Conda CUDA versions (#546)
* Relax TorchVision requirement version

* Update TorchVision versions interval
2022-08-03 13:31:42 +01:00
Kenza Bouzid 62f3f57e4f update workflows 2022-08-02 08:40:53 +00:00
Kenza Bouzid c73103a075
ENH: Make label_column an instance attribute (#538)
Change LABEL_COLUMN and N_CLASSES to be instance attributes instead of class attributes to offer more flexibility to change labels for a same data cohort and make split labels global in the repo.
2022-08-01 16:15:51 +01:00
Melissa Bristow 5db3c2a20f
TEST: Incorporate additional smoke tests (#532)
Add additional smoke tests to the cpath GitHub workflow
2022-07-29 10:16:28 +01:00
maxilse 87237db82f
BUG: Fix CSV parsing of tiles dataset columns with commas (#544) 2022-07-29 09:17:53 +01:00
Melissa Bristow 090368cbfb
ENH: Mark completed regression_test_utils tests as complete (#537)
rename test file and mark run as complete when test is done
2022-07-28 07:23:15 +01:00
maxilse c00324ab79
BUG: Fixed PIL import (#542)
fixed pil import

Co-authored-by: Melissa Bristow <66642528+mebristo@users.noreply.github.com>
2022-07-27 12:03:11 +02:00
Melissa Bristow 2d2aa9bb81
FIX: Flake8 problem that got missed due to auto-merge (#541)
Fix flake8 problem that got missed due to auto-merge
2022-07-27 10:15:47 +01:00
Melissa Bristow 38f749016a
ENH: Allow skipping of top/ bottom tile plotting (#536)
Allow skipping plot attention tiles if num tiles too small
2022-07-27 08:30:24 +00:00
vale-salvatelli 5c9c4a7ded
DOC: Adding tcga DeepMIL results (#539) 2022-07-26 19:15:47 +01:00
vale-salvatelli 500b4023d6
FIX: Fixing typo in panda_model.md (#535)
Fixing typo in panda_model.md
2022-07-26 18:51:04 +01:00
Kenza Bouzid 8b118e0f05
ENH: Enable running inference-only with the hi-ml runner (#518)
Closes #480 
* Add `run_inference_only` flag to trigger trainer.test only
* Add `src_checkpoint` to specify the azure ml run id from which to retrieve the weights checkpoint for inference or resume training
* Rename `ckpt_run_id` -> `ssl_ckpt_run_id` in BasEMIL container to differentiate between different checkpoint run_ids
2022-07-26 09:59:34 +01:00
maxilse 515202187b
ENH: Update tcga_prad paths and remove 'slide_' (#533)
1. Add global variables for the TCGA-PRAD dataset paths
2. Removed the function that adds slide_ to all keys in meta_data
2022-07-25 16:46:45 +01:00
Melissa Bristow 7a7e7e625d
BUG: Clear the top and bottom slides heaps after every validation epoch (#531)
Clear the top and bottom slides heaps after every validation epoch
2022-07-22 15:29:21 +01:00
Fernando Pérez-García 71a993aac8
ENH: Show run ID and prefix if no files are found (#528)
* ENH: Show run ID and prefix if no files are found

* Use a more appropriate exception class
2022-07-22 09:49:07 +01:00
Anton Schwaighofer 388b3f86b8
ENH: Publishing the hi-ml-cpath package (#524)
Also moved the SSL configurations out of the health_cpath folder because they reference code that is not published in the package.
2022-07-21 15:13:47 +01:00
maxilse be1062106a
ENH: Update tiling script (#516)
* ENH: Update tiling script

* slowly updating the create tiles dataset script

* removed logging

* tiling script is updated

* submodule commit test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove subfolder

* solve flake8

* updated PANDA 5X path

* removed dublicated code

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* flake8

* cleaned up test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* added cucim work around

* added cucim work around

* move test to gpu because of cucim

* test

* test

* make test gpu only

* update readme for gpu test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update readme for gpu test

* added original function because of cucim nightmare

* another cucim work around

* remove relative histo folder

* added test

* more tests

* fix mypy

* make panda 5X default

* revert changes in prad dataset

* after Daniel's review

Co-authored-by: Fernando Pérez-García <fepegar@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-07-20 14:07:04 +02:00
Anton Schwaighofer 497945d626
ENH: Split run requirements for cpath folder into file (#519)
Put all packages that are required only by the cpath folder into a requirements file, to later consume in package setup. Adding a script to create a full locked Conda environment.
Removed the automatic merging of requirements files of hi-ml because that now conflicts with the full environment.
2022-07-19 22:36:27 +01:00
Melissa Bristow a41362c6b9
ENH: Add github workflow for smoke testing DeepSMILEPandaSlidesBenchmark (#506)
Add github workflow for smoke test for DeepSMILEPandaSlidesBenchmark
2022-07-19 17:29:28 +01:00
Anton Schwaighofer 9777d3e597
ENH: Only upload codecov reports once (#521) 2022-07-19 15:09:08 +01:00
Fernando Pérez-García ea18b109c7
DOC: Use imperative for PR title in guidelines (#517) 2022-07-19 08:41:14 +01:00
SangamSwadik 18558011a3
ENH: Update PR titles to include more tags (#505)
* Update PR titles

Update PR titles for PR to be more precise

* Add more categories in PR titles

Add Test, fix, mnt and perf, rename style to sty.

* Remove Style

Remove Style as Sty is short alternative for style
2022-07-18 16:01:52 +01:00
Anton Schwaighofer 2407f93f6c
ENH: Rename histopathology folder to match overall naming scheme (#512)
Top-level folder has been renamed from `hi-ml-histopathology` to hi-ml-cpath, the Python namespace from `histopathology` to `health_cpath`.
2022-07-18 13:40:47 +01:00
Anton Schwaighofer 65ba65d16f
ENH: Upgrade Github runner OS from Ubuntu 18 to Ubuntu 20 (#511) 2022-07-15 17:17:46 +01:00
Melissa Bristow 80be584747
BUG: Plot conf matrix when not all labels present (#509)
Confusion matrix should feature all possible labels even when they don't appear in true and predicted labels
2022-07-15 14:59:05 +01:00
Anton Schwaighofer 4f6ac46c97
DOC: Improve Azure setup instructions (#507) 2022-07-15 11:06:35 +00:00
Anton Schwaighofer 3cd327083a
ENH: Simplify publishing workflow by using a single PyPi token (#510)
Rather than having 2 separate publishing tokens, use one with scope "all projects".
2022-07-15 11:59:15 +01:00
Anton Schwaighofer 3ebff595ca
BUG: Mounted dataset disappears when mount script terminates (#504) 2022-07-12 15:43:26 +01:00
Kenza Bouzid dffc822949
ENH: Move all training related functions to MLRunner class. (#499)
Refactor MLRunner to contain all training code. 

- Remove model_train function so that we can reuse the trainer for validation
- Break long functions into smaller testable functions
- Kill DDP processes after validation and load model checkpoints once for extra validation epoch and test
- Fix unit tests accordingly
2022-07-12 10:16:29 +01:00
Melissa Bristow c7777dd90c
DEL: Remove large files from RegressionTestResults (#500)
Remove large files from RegressionTestResults
2022-07-12 09:41:28 +01:00
Anton Schwaighofer 065a1c8e09
DOC: More details about creating Azure resources (#498) 2022-07-11 13:23:03 +01:00
Fernando Pérez-García 585d7081c7
ENH: Prepare codebase for image model release (#497)
* Prepare codebase for image model release

* Fix interpolation mode

* Fix circular imports

* Address reviewers' comments

* Improve documentation for get_similarity_map_from_raw_data

* Address comments on image module

* Add URL to image model weights

* Fix function name

* Support passing the weights path as Path

* Select device dynamically

* update hf paths

* Fix mypy error

* Fix alignment mode error when using NN interpolation

* Fix link to model weights

* Load weights on CPU and choose device in notebook

* Use same tag for text and image models

* Add missing return type

* Remove unused attribute

Co-authored-by: Ozan Oktay <ozan.oktay@microsoft.com>
Co-authored-by: Shruthi42 <13177030+Shruthi42@users.noreply.github.com>
2022-07-11 09:55:27 +00:00
Anton Schwaighofer ce3a0eb338
ENH: Turn on mixed precision training by default (#496) 2022-07-08 15:25:59 +01:00
Fernando Pérez-García 866203eaf1
DOC: Update documentation for hi-ml-multimodal (#493)
* DOC: Update documentation for hi-ml-multimodal

* Update path to package description

* Add missing period

* Address Ozan's suggestions

* Rephrase section on Hugging Face

* Highlight ECCV in citation section
2022-07-08 11:59:11 +01:00
Anton Schwaighofer fdbe2e8cc1
ENH: Remove local dataset definitions from histopathology models (#494) 2022-07-07 21:34:13 +01:00
Anton Schwaighofer c6982b63b4
ENH: Exclude cache files from file watchers to speed up VSCode (#495) 2022-07-07 21:31:43 +01:00
Ozan Oktay 480048dadc
ENH: Add commit ID when downloading CXR-BERT model (#482)
* add hf revision and unify  calls

* add missing header template

* Minor changes

* Fix text imports

* add a commit tag instead of hash since our CI cannot differentiate str from passcode

Co-authored-by: Fernando Pérez-García <fperezgarcia@microsoft.com>
Co-authored-by: Fernando Pérez-García <fepegar@gmail.com>
2022-07-07 09:37:39 +01:00
Fernando Pérez-García 0c065bb6cf
BUG: Fix demo notebook failing on PRs (#492)
* Parameterize branch of argument to PIP

* Remove "notebooks" target from Makefile

* Pass branch name to demo notebook

Adapted from https://stackoverflow.com/a/58034787/3956024

* Echo branch name

* Run notebooks in new job

* Add steps to check out repo and install Python

* Introduce change not present in "main" to test CI

* Fix getting branch name

From https://stackoverflow.com/a/71158878/3956024

* Isolate parameterized cell

* Revert "Introduce change not present in "main" to test CI"

This reverts commit bee1504dfd.
2022-07-07 09:27:20 +01:00
pre-commit-ci[bot] 05e6337d19
ENH: Autoupdate hooks [pre-commit.ci] (#488)
updates:
- [github.com/pre-commit/pre-commit-hooks: v4.2.0 → v4.3.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.2.0...v4.3.0)
- [github.com/pre-commit/mirrors-autopep8: v1.5.7 → v1.6.0](https://github.com/pre-commit/mirrors-autopep8/compare/v1.5.7...v1.6.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Fernando Pérez-García <fepegar@gmail.com>
2022-07-06 10:11:36 +01:00