Closed liuxuan99 closed 2 years ago
Hi @liuxuan99, thanks for using our model. The error you are seeing is due to the limitations we impose on the API calls from a single key. Please, try waiting at least 500ms between requests and limit your requests to 3-4 per minutes. You should not see the error and since the retro predictions are anyway taking on average 2 minutes performance will not be impacted.
Hi @liuxuan99, thanks for using our model. The error you are seeing is due to the limitations we impose on the API calls from a single key. Please, try waiting at least 500ms between requests and limit your requests to 3-4 per minutes. You should not see the error and since the retro predictions are anyway taking on average 2 minutes performance will not be impacted.
Hi @drugilsberg, thank you so much for your help! This issue is solved after I split all of the code belowed response = ...
to a new cell. In Colab, results = ...
was executed right after response = ...
, which caused the issue Too Many Requests
. For people who use Colab or Jupyter, the modified code below should work.
response = rxn4chemistry_wrapper.predict_automatic_retrosynthesis(
'NC(=O)C[C@@H](N)C(=O)O', ai_model='enzymatic-2021-04-16'
)
while True:
time.sleep(5)
results = rxn4chemistry_wrapper.get_predict_automatic_retrosynthesis_results(
response['prediction_id']
)
if results['status'] == 'SUCCESS':
break
print(results['retrosynthetic_paths'][0])
Hello, when I tried to predict a retrosynthesis pathway, I got an error
'status': 429, 'error': 'Too Many Requests'
.get_predict_reaction_results
andparagraph_to_actions
are able to get correct results under the same API. I tried to generate a new API, but the error persist.Here are my code and return.
Return