Skip to content

Fixed mypy failure with DistributedSampler#2971

Merged
vfdev-5 merged 1 commit intomasterfrom
fix-mypy
Jun 21, 2023
Merged

Fixed mypy failure with DistributedSampler#2971
vfdev-5 merged 1 commit intomasterfrom
fix-mypy

Conversation

@vfdev-5
Copy link
Copy Markdown
Collaborator

@vfdev-5 vfdev-5 commented Jun 21, 2023

Description:

  • Fixed mypy failure with DistributedSampler

Reported in this job: https://github.com/pytorch/ignite/actions/runs/5331802470/jobs/9660132586?pr=2967#step:12:16

+ mypy --config-file mypy.ini
ignite/contrib/engines/common.py:267: error: Redundant cast to
"DistributedSampler[Any]"  [redundant-cast]
                cast(DistributedSampler, train_sampler).set_epoch(engine.s...

Check list:

  • New tests are added (if a new feature is added)
  • New doc strings: description and/or example code are in RST format
  • Documentation is updated (if required)

@github-actions github-actions bot added the module: contrib Contrib module label Jun 21, 2023
@vfdev-5 vfdev-5 marked this pull request as ready for review June 21, 2023 08:33
@vfdev-5 vfdev-5 requested a review from sadra-barikbin June 21, 2023 08:34
@vfdev-5 vfdev-5 merged commit 4d780aa into master Jun 21, 2023
@vfdev-5 vfdev-5 deleted the fix-mypy branch June 21, 2023 09:11
Copy link
Copy Markdown
Collaborator

@sadra-barikbin sadra-barikbin left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: contrib Contrib module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants