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

Add anomaly agent #133

Merged
merged 8 commits into from
Feb 14, 2025
Merged

Add anomaly agent #133

merged 8 commits into from
Feb 14, 2025

Conversation

andrewm4894
Copy link
Owner

@andrewm4894 andrewm4894 commented Feb 14, 2025

This pull request includes significant changes to the anomaly detection system, specifically transitioning from using individual LLM providers like OpenAI and Anthropic to a unified anomaly-agent approach. Additionally, there are updates to the environment variables and documentation to reflect these changes.

Updates to anomaly detection:

  • Replaced imports and logic for detecting anomalies from openai and anthropic with anomaly-agent in anomstack/jobs/llmalert.py and created a new anomstack/llm/agent.py file to handle anomaly detection with anomaly-agent. [1] [2] [3]
  • Removed obsolete files related to OpenAI and Anthropic anomaly detection, including anomstack/llm/anthropic.py, anomstack/llm/detect.py, anomstack/llm/models.py, and anomstack/llm/openai.py. [1] [2] [3] [4]

Environment variables:

  • Added new environment variables for LANGSMITH and OPENAI_API_KEY in .example.env file to support the new anomaly-agent setup.

Documentation updates:

  • Updated references in README.md to reflect the new LLM Agent Alerts terminology and provided links to the anomaly-agent repository. [1] [2] [3]

Dependency changes:

  • Updated requirements.compile to remove anthropic and openai dependencies and add anomaly-agent. [1] [2]

…flow

- Update .example.env with Langsmith-related environment variables
- Simplify requirements.txt to a more concise list of dependencies
- Refactor anomaly detection in llmalert.py and llm/agent.py to use AnomalyAgent
- Modify anomaly detection to return a DataFrame with consistent column names
Copy link

github-actions bot commented Feb 14, 2025

Your pull request is automatically being deployed to Dagster Cloud.

Location Status Link Updated
anomstack View in Cloud Feb 14, 2025 at 10:07 PM (UTC)

- Remove separate LLM provider modules (anthropic.py, openai.py, detect.py)
- Simplify agent.py by renaming detect_anomalies_agent to detect_anomalies
- Update import in llmalert.py to reflect function name change
- Remove models.py with Pydantic schemas
- Rename `df_anomalies_long` to `df_anomalies` in agent.py
- Remove debug logging of detected anomalies in llmalert.py
- Remove OpenAI and Anthropic packages from requirements.txt and requirements.compile
- Align with previous refactoring of LLM anomaly detection module
@andrewm4894 andrewm4894 marked this pull request as ready for review February 14, 2025 21:52
- Refactor LLM Alerts section to focus on anomaly-agent approach
- Update description to highlight new agent-based anomaly detection
- Remove references to OpenAI and Anthropic direct integrations
- Add note about future Ollama support
- Adjust formatting and terminology
@andrewm4894 andrewm4894 merged commit 3e63789 into main Feb 14, 2025
4 checks passed
@andrewm4894 andrewm4894 deleted the add-anomaly-agent branch February 14, 2025 22:09
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.

1 participant