-
Notifications
You must be signed in to change notification settings - Fork 82
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
⚡ Improve Engine
Performance and Implementation
#578
Draft
shaneahmed
wants to merge
119
commits into
develop
Choose a base branch
from
dev-define-engines-abc
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+4,779
−5,023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Use `pyproject.toml` for `bdist_wheel` configuration
- Improve `Engines` performance and implementation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #578 +/- ##
===========================================
- Coverage 99.90% 91.53% -8.38%
===========================================
Files 69 71 +2
Lines 8715 8930 +215
Branches 1149 1184 +35
===========================================
- Hits 8707 8174 -533
- Misses 3 742 +739
- Partials 5 14 +9 ☔ View full report in Codecov by Sentry. |
- Refactor engines_abc.py
shaneahmed
changed the title
⚡ Improve
⚡ Improve Apr 28, 2023
Engines
Performance and ImplementationEngine
Performance and Implementation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
- Redesigns PatchPredictor engine using the new EngineABC base class. - The WSIs are now processed using the same code as for the processing the patches using WSI based dataloader. - The intermediate output is saved as zarr for the WSIs to resolve memory issues. - The output of model architectures should now be a dictionary. - The output can be specified as AnnotationStore for visualisation using TIAViz. --------- Co-authored-by: abishekrajvg <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Fix `mypy` Type Checks for `cli/common.py`
- Add `PatchPredictor` Engine based on `EngineABC` - Add `return_probabilities` option to Params - Removes `merge_predictions` option in `PatchPredictor` engine. - Defines `post_process_cache_mode` which allows running the algorithm on `WSI` - Add `infer_wsi` for WSI inference - Removes `save_wsi_output` as this is not required after post processing. - Removes `merge_predictions` and fixes docstring in EngineABCRunParams - `compile_model` is now moved to EngineABC init - Fixes bug with `_calculate_scale_factor` - Fixes a bug in `class_dict` definition. - `_get_zarr_array` is now a public function `get_zarr_array` in `misc` - `patch_predictions_as_annotations` runs the loop on `patch_coords` instead of `class_probs` --------- Co-authored-by: Mark Eastwood <[email protected]> Co-authored-by: Mostafa Jahanifar <[email protected]> Co-authored-by: Adam Shephard <[email protected]> Co-authored-by: Jiaqi-Lv <[email protected]>
shaneahmed
added a commit
that referenced
this pull request
Nov 21, 2024
- Add changes from New engine design #578. This will not only simplify the PR but also keep the main repo up to date. - Refactor `model_to` to `model_abc` - Instead of `on_gpu` use `device` as an input in line with `PyTorch`. - `infer_batch` uses `device` as an input instead of `on_gpu`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Engines
performance and implementationmypy
Type Checks forcli/common.py
PatchPredictor
Engine based onEngineABC
return_probabilities
option to Paramsmerge_predictions
option inPatchPredictor
engine.post_process_cache_mode
which allows running the algorithm onWSI
infer_wsi
for WSI inferencesave_wsi_output
as this is not required after post processing.merge_predictions
and fixes docstring in EngineABCRunParamscompile_model
is now moved to EngineABC init_calculate_scale_factor
class_dict
definition._get_zarr_array
is now a public functionget_zarr_array
inmisc
patch_predictions_as_annotations
runs the loop onpatch_coords
instead ofclass_probs