Open d33bs opened 10 months ago
Thank you for the patch to implement retry capability, @d33bs ! We will get this into the main branch.
Sounds good, thank you as well @saramsey ! If it'd be helpful, may I submit a PR towards this cause? I can also understand if you wouldn't suggest it.
In attempting to recreate and run the RTX-KG2 pipeline I found that
kg2_util.download_file_if_not_exist_locally
sometimes had a tendency to fail on first attempt to download a resource. When this happens it can sometimes cause a full pipeline failure for singular download errors. I'm unsure of the exact cause (it could be network location based, or file hosting service, etc) but generally found that the network requests were sometimes initially unable to complete and would succeed if tried again. To avoid this, a simple retry loop may provide a programmatic way to retry a download without much time cost when it comes to a full pipeline run. Adding this retry loop I found removed the cases where I saw failures.Current code (link):
Suggested code: