Rate-limit the PubChem crawl and checkpoint incrementally - #75
Merged
Merged
Conversation
The 4-calls-per-molecule burst was tripping PubChem's 503 throttle, so retry backoff dominated wall time (a full labeled-set pass would have taken hours). Pace requests to ~4.5/s (under the 5/s ceiling) with a shared min-interval, and back off harder on an explicit 503 — steady pacing runs the whole 3,845-molecule set in ~90s. Also checkpoint the merged table every 100 molecules and skip already-named InChIKeys on start, so a long crawl survives interruption and resumes where it left off instead of only writing once at the very end. Signed-off-by: Austin L. <86896075+rvnminers-A-and-N@users.noreply.github.com>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The 4-calls-per-molecule burst tripped PubChem's 503 throttle, so retry backoff dominated wall time. Pace requests to ~4.5/s (under the 5/s ceiling) with a shared min-interval and back off harder on an explicit 503 — steady pacing runs the whole 3,845-molecule set in ~90s (vs. hours throttled). Also checkpoint the merged table every 100 molecules and skip already-named InChIKeys on start, so a long crawl survives interruption and resumes cleanly.
Ran end-to-end:
properties.parquetnow holds 3,194 rows — 2,729 with common+IUPAC names, 236 with measured BP. Server restarted; substitution/palette/neighbor names now resolve instantly and offline from the table.