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

Response Status Code: 429 - Too many requests #133

Open
roovy54 opened this issue Sep 26, 2024 · 3 comments
Open

Response Status Code: 429 - Too many requests #133

roovy54 opened this issue Sep 26, 2024 · 3 comments

Comments

@roovy54
Copy link

roovy54 commented Sep 26, 2024

I was running this code snippet

python launch_scientist.py --model "gpt-4o-2024-05-13" --experiment nanoGPT_lite --num-ideas 1

and I get this error

Using OpenAI API with model gpt-4o-2024-05-13.

Generating idea 1/1
Iteration 1/3
{'Name': 'dynamic_dropout', 'Title': 'Dynamic Dropout: Adaptive Regularization for Efficient Training of Language Models', 'Experiment': 'Implement a mechanism to adjust the dropout rate dynamically based on the training iteration. Modify the `CausalSelfAttention`, `MLP`, and other relevant classes to accept a dynamic dropout rate. Use a simple schedule for dropout rate adjustment, such as linear decay or cosine annealing. Track the training progress and adjust the dropout rate accordingly. Compare the training dynamics, convergence speed, and final performance with the baseline model.', 'Interestingness': 7, 'Feasibility': 6, 'Novelty': 5}
Iteration 2/3
{'Name': 'dynamic_dropout', 'Title': 'Dynamic Dropout: Adaptive Regularization for Efficient Training of Language Models', 'Experiment': 'Implement a mechanism to adjust the dropout rate dynamically based on the training iteration. Modify the `CausalSelfAttention`, `MLP`, and other relevant classes to accept a dynamic dropout rate. Use a simple schedule for dropout rate adjustment, such as linear decay or cosine annealing. Track the training progress and adjust the dropout rate accordingly. Compare the training dynamics, convergence speed, and final performance with the baseline model.', 'Interestingness': 7, 'Feasibility': 6, 'Novelty': 5}
Idea generation converged after 2 iterations.

Checking novelty of idea 0: adaptive_block_size
Response Status Code: 429
Response Content: {"message": "Too Many Requests. Please wait and try again or apply for a key for higher rate limits. https://www.semanticscholar.org/product/api#api-key-form", "code": "429"}
Backing off 0.7 seconds after 1 tries calling function search_for_papers at 04:47:24
Response Status Code: 429
Response Content: {"message": "Too Many Requests. Please wait and try again or apply for a key for higher rate limits. https://www.semanticscholar.org/product/api#api-key-form", "code": "429"}
Backing off 0.2 seconds after 2 tries calling function search_for_papers at 04:47:25
Response Status Code: 429
Response Content: {"message": "Too Many Requests. Please wait and try again or apply for a key for higher rate limits. https://www.semanticscholar.org/product/api#api-key-form", "code": "429"}
Backing off 1.3 seconds after 3 tries calling function search_for_papers at 04:47:26
Response Status Code: 429
Response Content: {"message": "Too Many Requests. Please wait and try again or apply for a key for higher rate limits. https://www.semanticscholar.org/product/api#api-key-form", "code": "429"}
Backing off 5.6 seconds after 4 tries calling function search_for_papers at 04:47:28
object address  : 0x7e15e6067340
object refcount : 2
object type     : 0x879400
object type name: KeyboardInterrupt
object repr     : KeyboardInterrupt()
lost sys.stderr
^C```
@arundasan91
Copy link

Check #84.

@xprabhudayal
Copy link

@roovy54 you can apply for an api key for the semantic scholar in their website https://www.semanticscholar.org/product/api#api-key

@OjashKush
Copy link

Hi @roovy54, @arundasan91, @corochann

I'd like to help resolve this issue by:
Adjusting API call frequency with rate limiting.
Adding a retry mechanism for handling 429 errors.
Could you provide any context or guidance on existing efforts, preferred approaches, or testing requirements before I proceed?

Thanks, and I’ll wait for your confirmation before starting the implementation!

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

No branches or pull requests

4 participants