You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're encountering challenges when attempting to run more complex ML/DL algorithms on the Titanic dataset using an Azure Assistant Agent. It's unclear whether this is due to code interpreter limitations or our implementation.
Current Behavior:
Basic analyses and initial ML model training work successfully.
We encounter a rate limit error when attempting to improve model accuracy beyond 85%.
Error Message:
semantic_kernel.exceptions.agent_exceptions.AgentInvokeException: Run failed with status: `failed` for agent `data-scientist` and thread `thread_xxxxxxxxxx` with error: Rate limit is exceeded. Try again in 22 seconds.
Is this a limitation of the code interpreter, or could it be related to our implementation?
Are there best practices for optimizing code execution within the Azure Assistant Agent to avoid rate limits?
How can we implement a wait mechanism to respect the rate limit (e.g., waiting 22 seconds before retrying)?
Are there any built-in retry mechanisms or rate limit handling features in the Azure Assistant Agent that we should be using?
Should more complex ML tasks be broken down into smaller, sequential requests to the agent?
Desired Outcome:
We aim to understand the source of this limitation and find ways to handle rate limits effectively, allowing us to perform more complex ML tasks without errors. Additionally, we seek guidance on best practices for working with the Azure Assistant Agent for computationally intensive tasks.
Any insights, suggestions, or examples of addressing these issues would be greatly appreciated.
The text was updated successfully, but these errors were encountered:
fromsemantic_kernel.agents.open_ai.run_polling_optionsimportRunPollingOptionsfromdatetimeimporttimedeltapolling_options=RunPollingOptions(run_polling_interval=timedelta(seconds=5)) # or something based on your RPM# Create the agent configurationagent=awaitAzureAssistantAgent.create(
kernel=kernel,
service_id=service_id,
name=AGENT_NAME,
instructions=AGENT_INSTRUCTIONS,
...,
polling_options=polling_options,
)
The attributes you'll want to pay attention to are:
run_polling_backoff, run_polling_interval and run_polling_backoff_threshold
We use these based on:
defget_polling_interval(self, iteration_count: int) ->timedelta:
"""Get the polling interval for the given iteration count."""return (
self.run_polling_backoffifiteration_count>self.run_polling_backoff_thresholdelseself.run_polling_interval
)
Additionally, in your AI Foundry Portal, you can adjust your RPM/TPM for your model deployment. Could you have a look at if you can increase your RPM?
I should add: yes, we can do better at handling rate limits for the caller -- a feature we should explore in the future. But hopefully my suggestion above can help mitigate your current 429s.
We're encountering challenges when attempting to run more complex ML/DL algorithms on the Titanic dataset using an Azure Assistant Agent. It's unclear whether this is due to code interpreter limitations or our implementation.
Current Behavior:
Error Message:
Relevant Code Snippet:
Questions:
Desired Outcome:
We aim to understand the source of this limitation and find ways to handle rate limits effectively, allowing us to perform more complex ML tasks without errors. Additionally, we seek guidance on best practices for working with the Azure Assistant Agent for computationally intensive tasks.
Any insights, suggestions, or examples of addressing these issues would be greatly appreciated.
The text was updated successfully, but these errors were encountered: