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

50 Коммитов

Автор SHA1 Сообщение Дата
mebristo 4a9ccee6d0
BUG: Correct pythonpath separator character in VS code settings file (#267)
Correct PYTHONPATH separator for multiple paths in VS code settings file
2022-03-25 15:07:01 +00:00
mebristo 781f659588
BUG: Pin jinja2 to avoid bug in latest version (#266)
* pin jinja2 to avoid bug in latest version

* Add changelog
2022-03-25 13:07:31 +00:00
maxilse 9153299dbb
BUG: Added tolerance to test (#246)
Transformer pooling test failed sometimes when testing batch_size=1 due to rounding issues. Added a tolerance similar to allclose.
2022-03-17 10:15:30 +00:00
Anton Schwaighofer 3f2ddd133d
ENH: Dataset mounting is now configurable (#241) 2022-03-16 19:59:11 +00:00
Anton Schwaighofer 3c443abf72
DOC: Better onboarding instructions in Readme files (#223)
Also cleaned up many .md files with a linter
2022-03-16 14:31:38 +00:00
maxilse 54632a895f
ENH: Add transformer pooling (#227)
The main thing this PR does is to add TransformerPooling. However, I moved the constructer of the pooling layers outside of DeepMIL to allow for more flexibility in the constructor arguments. This required changing some tests.

The transformer pooling is based on the pytorch Transformer class, however, in the pytorch implementation you have to pass a flag (need_weights) to the forward (??? like why not the init???) of the MultiheadAttention class. See line 186 of attention_layer.py

In the forward() of TransformerPooling (see line 244 of attention_layer.py) we discard the self attention of the cls token and rescale the remaining attention scores, so they sum to one.
2022-03-11 14:27:05 +01:00
Anton Schwaighofer b56e9eaa09
Retire the manual changelog (#216) 2022-03-07 15:26:36 +00:00
Anton Schwaighofer 314433cb95
Adding cross-validation to the hi-ml runner (#198)
* Adding cross-validation
* Simplified model config loading for models in the histopathology folder
* Editor setup for VSCode
* Simplified pytest usage, also from within VSCode
2022-03-07 12:21:09 +00:00
Fernando Pérez-García 92d2f22650
Show workspace name in error message (#196)
* Show workspace name in error message

* Update CHANGELOG

* Update error message fixture in datastore test
2022-03-07 09:49:28 +00:00
vale-salvatelli 0250715c5a
Adding transformation adaptor (#193)
Add a transformation adaptor to allow transformations working only on Tensors/Images to work with a dict in input
2022-03-03 13:36:48 +00:00
Daniel Coelho de Castro 30854eae4f
Fix DeepMIL metrics bug (#195) 2022-02-28 15:16:54 +00:00
maxilse b742223102
update DeepSMILE models (#188)
* update DeepSMILE models

* updated changelog and pyright

* after Melissa's review

* small fixes after review
2022-02-25 14:09:57 +01:00
mebristo fed8220456
Add inference to runner (#186)
Add inference to the hi-ml runner, and downgrade lightning-bolts to 0.4.0 in line with InnerEye
2022-02-22 13:31:26 +00:00
Daniel Coelho de Castro 2bc397b470
Add mean pooling layer (#187) 2022-02-18 15:14:44 +00:00
mebristo b8b52987da
Copy histopathology folder into hi-ml (#181)
* Copy histopathology folder into hi-ml

* Update imports

* Update changelog and pull latest changes from InnerEye

* fix tests after merging changes

* works in AML again

* flake8

* flake8

* flake8

* Add a basic docu for histopathology

* improve test coverage

* fix test

* Add SSL configs and tests

* Update from recent changes and fix tests

* workaround for finding himl, plus pyright fixes

* update test requirements

* fix tests

* fix pandas version conflict

* Add fast flags to tests

* fix test imports

* Add dummy make build

* remove histo module from test-artifact-pkg build step

* fix himl tests

* Address PR comments

* Works in AML

* update pr workflow and fix bug in expt folder handler

* flake8

* update build test yml

* update build test yml

* update build test yml

* Debug build test failing

* Debug build test failing

* Debug build test failing

* Debug build test failing

* Debug build test failing

* Debug build test failing

* Debug build test failing

* Debug build test failing

* Debug build test failing

* Debug build test failing

* update ssl_online to fix test

* fix test running remotely

* update build yaml

* update combine coverage

* small improvements

* small improvements

* mypy

* mypy

* mypy
2022-02-15 16:22:04 +00:00
mebristo c5a0348d36
First version of runner (#178)
* First version of runner

* changelog and pyright

* PR comments

* Runs in AML

* More PR comments

* More PR comments

* Remove GenericConfig from himl

* Add more tests

* pytest and pyright

* Add more tests

* Add more tests

* Add documentation

* bug fix align config attributes

* works on config outside of hi-ml

* flake8 mypy pytest

* Add more tests for config loading

* PR comments and add more tests

* Respond to PR comments

* More PR comments

* pytest, mypy, flake8

* fix test running remotely

* debug why test fails on remote build

* debug why test fails on remote build

* debug why test fails on remote build

* fix test

* Fix tests

* debug test failing on azure agent

* Fix test and update docs

* update test

* Update command line tools

* Update coverage report to only read .py files

* debug coverage problem

* debug coverage failing

* debug coverage failing

* debug coverage failing

* PR comments
2022-02-03 09:12:58 +00:00
maxilse a33c1ed07d
Updated augmentations for histology images (#179)
Fixed HEDJitter augmentation, the previous version was also jittering the D channel
Removed dependency of StainNormalization on skimage, which makes it also faster
Added GaussianBlur that is faster than the torchvision version
Added rotation by multiples of 90 degrees
Adjusted/added the test for all augmentations.
All the above augmentations are frequently used for histopathology.

Added torchvision to the environment since it is necessary for the augmentations.
2022-01-11 14:16:39 +01:00
vale-salvatelli 7902a6e138
Fixing checkpoint downloader (#174)
This PR contains changes to the class CheckpointDownloader to fix a bug in the local path of the downloaded checkpoint
2021-12-21 14:24:14 +00:00
mebristo 484a0a8b28
Make improvements to report tool (#173)
* Allow lists of tables and add report folder zipping

* Add option to base64 encode images

* Turn off subplot axes

* Remove centre align

* pyright

* add_tables accepts list of tables to align with list of csv paths

* mypy

* Missing return statement

* download_files_from_hyperdrive should accept lists of files
2021-12-17 12:55:11 +00:00
mebristo 38fd685579
Add utils and attention layers (#170)
* Move utils from histopathology

* Address PR comments

* flake8

* flake8

* fix build
2021-12-03 17:52:28 +00:00
Anton Schwaighofer 73640a994f
Fix a flaky test. Fix a bug in environment creation with private wheels (#169) 2021-11-30 15:22:39 +00:00
Anton Schwaighofer c4ad965d23
Enable logging from outside AzureML, logging bugfixes (#167) 2021-11-25 14:16:55 +00:00
Anton Schwaighofer 145e7dc9a2
Fix for invalid "." dataset location in AzureML (#161)
* Catch "." and raise an exception
2021-11-23 15:40:59 +00:00
mebristo c7bdf6ac0a
Add HTML report (#152)
* Add HTML report

* Add add_text, validate and read_config_yaml to reportS

* flake8

* Add function to download report contents from AML

* add image gallery type to reports

* Add more tests

* Update report config schema to dictionaries

* Replace dictionary key with var

* fix test

* fix test

* fix test

* fix test
2021-11-22 09:51:53 +00:00
Jonathan Tripp 566739501c
Check other folders for driver_log (#164)
* Check other folders for driver_log
2021-11-18 16:51:38 +00:00
Jonathan Tripp 0e628dfb46
Profile loading png as np (#159)
Profile loading png as np
2021-11-17 19:44:05 +00:00
mebristo f791bede99
Bug fix: update run_config with registered environment (#156)
* Ensure environment is updated after register_environment

* Update test

* Add changelog

* fix changelog
2021-11-15 17:21:12 +00:00
Jonathan Tripp a1e92d1b5e
Profile methods for loading png image files (#132) 2021-11-15 16:47:05 +00:00
mebristo 5b0c7b093e
Add k-fold cross validation wrapper around HyperDrive (#149)
* Started refactor

* Separate out function for retrieving experiment from experiment name

* More refactoring

* refactor cmd line tool args shorter and fewer functions for fetching runs

* update test docstring and fix flake8 error

* Add docs on custom argparsing and custom types, as well as more tests for GenericConfig

* Add more tests

* flake8, mypy, pytest

* Update changelog

* update docs

* Update himl-download

* Update tests

* Address PR comments

* fix pyright issues

* address PR comments

* Update _validate method

* flake8

* fix test

* Add cross-validation with hyperdrive + tests + docs + example

* Add test in AML remote compute

* flake8

* Add function to aggregate metrics from hyperdrive runs

* flake8

* pyright fix

* Address PR comments

* Address PR comments
2021-11-05 12:28:25 +00:00
Jonathan Tripp 27d531b2b2
Locally mount datasets (#145)
* Locally mount or download datasets
2021-11-05 09:24:33 +00:00
Anton Schwaighofer 67066ebe54
Document updated release process (#150) 2021-11-03 12:44:02 +00:00
mebristo e89e7d768b
Mebristo/refactor run id types (#129)
* Started refactor

* Separate out function for retrieving experiment from experiment name

* More refactoring

* refactor cmd line tool args shorter and fewer functions for fetching runs

* update test docstring and fix flake8 error

* Add docs on custom argparsing and custom types, as well as more tests for GenericConfig

* Add more tests

* flake8, mypy, pytest

* Update changelog

* update docs

* Update himl-download

* Update tests

* Address PR comments

* fix pyright issues

* address PR comments

* Update _validate method

* flake8

* fix test
2021-11-01 11:28:46 +00:00
Jonathan Tripp 9da95e1881
Add image load profiling (#138)
Add sample code to profile loading and tiling large images
2021-10-26 14:50:22 +01:00
Anton Schwaighofer 7e00c84daa
Diagnostic tools (#142)
Adding a callback to monitor batch loading times, and a progress bar for AzureML
2021-10-21 15:23:25 +01:00
mebristo 69111971e0
Update changelog and environment version test ready for release (#141)
* Update changelog and environment version test ready for release

* update changelog
2021-10-20 11:10:19 +01:00
mebristo e6e067ee1f
Fix register_environment (#139)
* Fix register_environment

* changelog and mypy
2021-10-20 10:09:21 +01:00
Javier 1cd49695f7
Add pyright and fix issues (#134)
* Fix issues with dev env

* Fix issues with dev env

* Add pyright

* Add pyright

* Fix pyright issues

* Fix pyright issues

* Fix all issues

* Fix all issues

* Change MakeFile

* Fix build

* Fix build

* Fixed test

* Fixed test

* Fix comments

* Fix comments

* Fix comments

* Fix comments

* Add conda back

* Add conda back
2021-10-18 16:54:00 +01:00
Anton Schwaighofer 32a476dcbe
Best Practice Guide for Low Priority VMs (#136) 2021-10-15 14:56:03 +01:00
Anton Schwaighofer b5949faa64
Changes to module names, adding an AzureML Logger (#133)
Packages now create folders "health_ml" and "health_azure", this is a breaking change
2021-10-13 17:08:07 +01:00
Anton Schwaighofer 9e84f5a095
Adding a barrier for downloading in distributed jobs (#128) 2021-10-06 19:07:05 +01:00
Anton Schwaighofer 8aa0ed2620
Bug fix: get_workspace wrongly assumes it runs in AzureML (#127) 2021-10-06 16:18:31 +01:00
mebristo 6612a5810b
Methods for downloading checkpoints, documentation (#123)
* Add test to check downloading large files doesn't time out

* add checkpoint download function

* Add functions to __init__

* Return test file size to large after debugging

* update changelog

* Add test for checkpoint download

* Update test

* Address PR comments

* Add downloading docu

* rename checkpoint download fn

* Address PR comments

* update tests
2021-10-06 15:14:15 +01:00
mebristo 9bf8ea5875
Mebristo/blob storage upload download (#122)
* Add functions to upload and download from blob storage

* Add functions to upload and download from datastores

* Update CHANGELOG

* mypy

* Clarify params and add functions to __init__

* Address PR comments
2021-10-05 10:00:40 +01:00
Anton Schwaighofer 02cbe14475
Preparation for release 0.1.7 (#124) 2021-10-04 15:58:50 +01:00
mebristo f692a79e24
Add function to download Run files without timeout (#113)
* Add function for download_runs (WIP)

* Add function to find file names for a Run

* download runs with single run id

* Stop output files being created during tests

* Add test with local Run

* flake8

* use DEFAULT_WORKSPACE

* move get_workspace into azure_utils to call from get_aml_run

* download_file only for first node if distributed

* Tidy up functions to get AML Run(s)

* dont cover nested functions

* Update himl-tb and himl-download with recent util changes

* Address PR comments

* Replace AML test for download_file
2021-09-30 11:01:18 +01:00
Jonathan Tripp 5ed95e186c
Upload and merge all coverage artifacts (#119)
Upload and merge all coverage artifacts
2021-09-27 09:29:58 +01:00
Anton Schwaighofer 515ba30158
Bug fix: Missing config.json file when providing an AML workspace (#117)
Moving code around for the test suite, to make the hi-ml and hi-ml-azure have a clearly distinct module name, and remove the deep folder hierarchy. Adding init files to the test folders for pytest to pick up files correctly
2021-09-23 17:06:36 +01:00
Jonathan Tripp 3cac37f8b9
Publish two packages (#106)
* Move existing code into hi-ml-azure
* Create new package in hi-ml
* Create top level files
2021-09-22 17:56:35 +01:00
mebristo 46b2d3faf0
Add Tensorboard ability to read from different folders (#112)
* Update run_tensorboard to work with logs in different folders

* fix flake8 complaints

* fix test and changelog

* move types-requests to test_requirements for running mypy

* update test

* move tensorboard example into docs

* shorten command line arg names

* Address PR comments
2021-09-21 15:52:54 +01:00
Anton Schwaighofer 19b081a2f0
Adding changelog (#111)
Adding a changelog, displaying it with the docs, and ensuring it is updated in each PR.
2021-09-16 11:33:45 +01:00