Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Add essential changes from main #601

Closed
wants to merge 30 commits into from
Closed

ENH: Add essential changes from main #601

wants to merge 30 commits into from

Conversation

ant0nsc
Copy link
Collaborator

@ant0nsc ant0nsc commented Sep 13, 2022

Add code from PRs

kenza-bouzid and others added 30 commits August 2, 2022 08:40
Add finetuning flags: `tune_encoder tune_pooling tune_classifier` to flexibly finetune each part of the network.
Add flags `pretrain_encoder pretrainer_pooling pretrain_classifier` to init submodules weights from a pretrained checkpoint in `src_checkpoint`
In this PR, Average Precision, Specificity, and Cohen Kappa metrics are added for the binary classification case in deepmil.py.
Updating transfer_main to main, this includes

* bug fixes to handle error in saving outputs
* integration test
Add command line arg for custom SSL checkpoint
Add `dataframe_kwargs` to BaseDatasets and HistoDatamodule to be able to read only subset of csv and custom datatype
Index datasets dataframe by tile_id or slide_id only when necessary (e.g. the current index is not already to tile_id or slide_id columns)
* update check
Add pl_sync_batchnorm flag to turn on and off batch norm synchronization via commandline/config files
Add a smoke test where all finetuning flags are switched on to make sure checkpoint loading and submodules initialization are completed properly.
Add debug_ddp to assign different options to `TORCH_DISTRIBUTED_DEBUG` env variable.
Add parameter to control tiles intensity scaling to be able to run augmentations on uint8 data to save some memory and speed up computations.
Add specific ImageNet encoders for transferability study: Resnet18/50 with and without preproc
…577)

Use df.assign to fix SettingWithCopyWarning  warning and make metadata validation optional to be able to read only subsets of dataset csv
…578)

In this PR:

Average precision metric is added to multi-class (n_classes > 1) case.
AUROC is modified such that num_classes=None for binary case, as prescribed in Pytorch documentation https://torchmetrics.readthedocs.io/en/stable/classification/auroc.html.
Parameter num_classes is not explicitly given in Specificity, similar to the other binary metrics.
Hardcoded threshold=0.5 is removed from binary metrics (since this is default value).
Confusion matrix is normalized on true values.
Metrics are re-organized for readability.
We used to display probabilities of ground truth labels instead of predicted ones.
Predicted labels should be integers.
Add a log to print the epoch of best checkpoint.
Enable stain normalization to work with multiple images (e.g., when a bag of tiles is given as input).
In this PR:
- transformer_dropout parameter is added to TransformerPooling and TransformerPoolingBenchmark pooling layers.
- Tests are updated with the transformer_dropout parameter.
Adding grad accumulation to trainer container params
Update environment variable settings for multi node jobs
Enable submitting jobs to Singularity via Amulet
@ant0nsc ant0nsc closed this Sep 13, 2022
@ant0nsc ant0nsc deleted the antonsc/from_main branch September 13, 2022 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants