Skip to content

Conversation

@deepsource-autofix
Copy link
Contributor

No description provided.

deepsource-autofix bot and others added 4 commits August 7, 2021 13:46
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
…tatement (#2717)

* Refactor unnecessary `else` / `elif` when `if` block has a `return` statement

* Unnecessary `else`/`elif` used after `raise` PYL-R1720

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Co-authored-by: Wenqi Li <wenqil@nvidia.com>
* Replace ternary syntax with if expression

* fixes Duplicate dictionary keys PYL-W0109

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

* remove Unused variable data_

Signed-off-by: Wenqi Li <wenqil@nvidia.com>

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Co-authored-by: Wenqi Li <wenqil@nvidia.com>
@wyli
Copy link
Contributor

wyli commented Aug 7, 2021

/black

monai-bot and others added 2 commits August 7, 2021 13:53
Signed-off-by: monai-bot <monai.miccai2019@gmail.com>
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
Copy link
Contributor

@wyli wyli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is almost an automatic fix, added "self.scaler" to 'monai/engines/workflow.py' otherwise this line is a property definition out of the class constructor

self.scaler = torch.cuda.amp.GradScaler() if self.amp else None
cc @Nic-Ma

@wyli wyli enabled auto-merge (squash) August 7, 2021 14:12
@wyli wyli merged commit 1ffa909 into dev Aug 7, 2021
@wyli wyli deleted the deepsource-fix-1eb41095 branch August 7, 2021 15:36
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.

3 participants