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

Github API rate optimization #28

Merged
merged 1 commit into from
Nov 21, 2022
Merged

Conversation

oindrillac
Copy link
Collaborator

@oindrillac oindrillac commented Nov 18, 2022

Resolves #24

Modified the workflow file to use the user provided Github token instead of the automatically generated token. This drastically increases the API limit from 1000 to 5000.

Also modified the github_handling logic:

  • To log the API limit left after collecting each PR
  • Optimize the object instantiation across the notebook to make fewer API calls to Github

Like seen in this workflow https://github.com/oindrillac/time-to-merge-tool/actions/runs/3499848007/jobs/5861864319, we increased the API limit we started with to 5000 and as a result, we collected all PRs (250) in one go. Moving forward we should be able to collect ~600 PRs without getting rate limited.

Screenshot 2022-11-18 at 4 13 05 PM

Note: The model training step fails currently. Will investigate that here #23

@MichaelClifford
Copy link
Collaborator

LGTM

@MichaelClifford MichaelClifford merged commit 1c5774a into redhat-et:main Nov 21, 2022
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.

Optimize API calls made per PR collection
2 participants