🎨 New EngineABC Design for Patches#635
Merged
shaneahmed merged 153 commits intodev-define-engines-abcfrom Oct 31, 2023
Merged
Conversation
- Refactor base code from IOSegmentorConfig to IOConfigABC
- No need for a separate function
- Enable git workflow on this PR
- Add missing variable
- Move `to_baseline` code to ABC
- Move `to_baseline` code to ABC
- Fix incorrect calculations for output_resolutions
- Update `PatchPredictor` to use `ModelIOConfigABC` Signed-off-by: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com>
- Define `ModelIOConfigABC` as a dataclass Signed-off-by: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com>
- Remove kwargs. - Define dataclass attributes. Signed-off-by: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com>
- Add `IOInstanceSegmentorConfig` Signed-off-by: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com>
- Update yaml for `IOInstanceSegmentorConfig` Signed-off-by: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com>
- Update yaml for `IOInstanceSegmentorConfig` Signed-off-by: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com>
- Update `to_baseline` for `IOInstanceSegmentorConfig` Signed-off-by: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com>
- Update IOInstanceSegmentorConfig in test_nucleus_instance_segmentor.py Signed-off-by: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com>
- Update cli for IOInstanceSegmentorConfig Signed-off-by: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com>
- Remove unnecessary test after kwargs removal Signed-off-by: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com>
- Move ioconfigs to io_config.py Signed-off-by: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com>
- Fix circular import Signed-off-by: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com>
- Refactor to reduce code in inheriting class Signed-off-by: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com>
- Fix deepsource errors Signed-off-by: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com>
- Fix ioconfig import to avoid circular imports Signed-off-by: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com>
- Fix missing input arguments Signed-off-by: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com>
- Improve error catching Signed-off-by: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com>
- Default configuration is not correct Signed-off-by: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com>
- Fix error check Signed-off-by: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com>
- Fix typo Signed-off-by: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com>
- Fix unnecessary update Signed-off-by: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com>
…ueImageAnalytics/tiatoolbox into dev-redefine-patchpredictor
shaneahmed
commented
Oct 18, 2023
shaneahmed
commented
Oct 18, 2023
shaneahmed
commented
Oct 18, 2023
adamshephard
approved these changes
Oct 20, 2023
Contributor
|
Review comments addressed and pushed. I've only made changes to engine_abc and test_engine_abc. The |
mostafajahanifar
requested changes
Oct 20, 2023
Collaborator
mostafajahanifar
left a comment
There was a problem hiding this comment.
Thanks, Shan and collaborators for working on this. Looks like to is in good shape. I only made a couple of suggestions to consider.
| num_postproc_workers (int): | ||
| Number of workers to postprocess the results of the model. default = 0 | ||
| verbose (bool): | ||
| Whether to output logging information. |
Collaborator
There was a problem hiding this comment.
Actually, it would be nice to give the user option set the path to save engine logs for a specific run.
Shan: let's do it in a separate PR.
Abishek: EngineABC's verbose option displays the progress bar. Should we really have an option to save this to a file?
________________________________________________________________ test_engine_run_with_verbose _________________________________________________________________
-------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------
100%|#############################################| 2/2 [00:00<00:00, 5.37it/s]
progress_bar = None
if self.verbose:
progress_bar = tqdm.tqdm(
total=int(len(data_loader)),
leave=True,
ncols=80,
ascii=True,
position=0,
)
570615d to
122e114
Compare
…-redefine-patchpredictor # Conflicts: # tests/test_utils.py # tiatoolbox/utils/misc.py
for more information, see https://pre-commit.ci
…ueImageAnalytics/tiatoolbox into dev-redefine-patchpredictor
for more information, see https://pre-commit.ci
…ueImageAnalytics/tiatoolbox into dev-redefine-patchpredictor
for more information, see https://pre-commit.ci
…ueImageAnalytics/tiatoolbox into dev-redefine-patchpredictor
shaneahmed
commented
Oct 31, 2023
Member
Author
shaneahmed
left a comment
There was a problem hiding this comment.
Thanks @AbishekRajVG Looks good!
This file contains hidden or 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
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.
EngineABCdesignPatchPredictorbased on the new designmodel_tofromutils.misctomodel_abcload_torch_modelinmodel_abc