Skip to content
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

Catch exception in download #28090

Merged
merged 3 commits into from
Oct 20, 2020

Conversation

phlrain
Copy link
Collaborator

@phlrain phlrain commented Oct 19, 2020

PR types

Others

PR changes

Others

Describe

第三方request库 在网络异常得时候会抛出异常,添加catch机制,在出异常的时候,能执行re-try流程

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot-old
Copy link

paddle-bot-old bot commented Oct 19, 2020

✅ This PR's description meets the template requirements!
Please wait for other CI results.

if log_index % log_interval == 0:
sys.stderr.write(".")
sys.stdout.flush()
except Exception as e:
Copy link
Contributor

Choose a reason for hiding this comment

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

Please set a retry time, otherwise, it may result in an infinite loop?

Copy link
Contributor

@XieYunshen XieYunshen left a comment

Choose a reason for hiding this comment

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

LGTM

@phlrain phlrain merged commit 651dab4 into PaddlePaddle:develop Oct 20, 2020
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