-
Notifications
You must be signed in to change notification settings - Fork 6.8k
empty list cannot be cleared issue fixed. #14882
Conversation
@mxnet-label-bot add [pr-awaiting-review] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change seems to be specific to a python version. (e.g. Python 3.7 allows clearing an empty list. Python 2.7 doesn't have clear().) What version of python did you use?
example/ctc/multiproc_data.py
Outdated
@@ -141,4 +141,5 @@ def reset(self): | |||
print("Queue size on reset: {}".format(qsize)) | |||
for i, p in enumerate(self.proc): | |||
p.join() | |||
self.proc.clear() | |||
if len(self.proc) > 0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe a more Pythonic way would be if self.proc
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was using python2.7. I faced issue at that time. So I fixed it.
@hsali Could you please address the review comments? Thanks! |
@hsali Gentle ping.... |
LGTM. |
@hsali Thanks for your contribution. Could you please address the review comments and Is this PR good to go for merge? |
Can a committer merge this PR ? This is good to go! |
@mxnet-bot run ci [all] |
Jenkins CI successfully triggered : [website, windows-cpu, edge, clang, centos-gpu, windows-gpu, unix-cpu, unix-gpu, centos-cpu, sanity, miscellaneous] |
sorry that it took (quite) a while. thanks for the fix @hsali |
Description
checking list before resetting it.
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments