Spaces:
Sleeping
Sleeping
fix: remove dead code (EXECUTOR, MySQL, bleach), fix PlannerAgent receiver
Browse files- Remove AgentRole.EXECUTOR (no ExecutorAgent exists)
- Fix PlannerAgent to send to REASONER instead of EXECUTOR
- Remove MySQL service from docker-compose.yml (database.py never wired in)
- Remove sqlalchemy/pymysql/cryptography/bleach from pyproject.toml deps
- Update test_models.py to remove EXECUTOR assertion
- Increase docker-compose healthcheck start_period to 120s
- docker-compose.yml +1 -20
- pyproject.toml +0 -4
- rag_master/agents.py +1 -1
- rag_master/models.py +0 -1
- tests/test_models.py +0 -1
docker-compose.yml
CHANGED
|
@@ -16,7 +16,7 @@ services:
|
|
| 16 |
test: ["CMD", "curl", "-f", "http://localhost:7860/health"]
|
| 17 |
interval: 30s
|
| 18 |
timeout: 10s
|
| 19 |
-
start_period:
|
| 20 |
retries: 3
|
| 21 |
restart: unless-stopped
|
| 22 |
deploy:
|
|
@@ -25,24 +25,5 @@ services:
|
|
| 25 |
cpus: "2"
|
| 26 |
memory: 8G
|
| 27 |
|
| 28 |
-
mysql:
|
| 29 |
-
image: mysql:8.0
|
| 30 |
-
ports:
|
| 31 |
-
- "3306:3306"
|
| 32 |
-
environment:
|
| 33 |
-
MYSQL_ROOT_PASSWORD: ${MYSQL_PASSWORD:-changeme_secure_password}
|
| 34 |
-
MYSQL_DATABASE: ${MYSQL_DATABASE:-agentic_rag_gym}
|
| 35 |
-
MYSQL_USER: ${MYSQL_USER:-raguser}
|
| 36 |
-
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-changeme_secure_password}
|
| 37 |
-
volumes:
|
| 38 |
-
- mysql_data:/var/lib/mysql
|
| 39 |
-
healthcheck:
|
| 40 |
-
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
|
| 41 |
-
interval: 30s
|
| 42 |
-
timeout: 10s
|
| 43 |
-
retries: 5
|
| 44 |
-
restart: unless-stopped
|
| 45 |
-
|
| 46 |
volumes:
|
| 47 |
faiss_data:
|
| 48 |
-
mysql_data:
|
|
|
|
| 16 |
test: ["CMD", "curl", "-f", "http://localhost:7860/health"]
|
| 17 |
interval: 30s
|
| 18 |
timeout: 10s
|
| 19 |
+
start_period: 120s
|
| 20 |
retries: 3
|
| 21 |
restart: unless-stopped
|
| 22 |
deploy:
|
|
|
|
| 25 |
cpus: "2"
|
| 26 |
memory: 8G
|
| 27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
volumes:
|
| 29 |
faiss_data:
|
|
|
pyproject.toml
CHANGED
|
@@ -19,15 +19,11 @@ dependencies = [
|
|
| 19 |
"gradio>=5.0.0",
|
| 20 |
"faiss-cpu>=1.8.0",
|
| 21 |
"sentence-transformers>=3.0.0",
|
| 22 |
-
"sqlalchemy>=2.0.0",
|
| 23 |
-
"pymysql>=1.1.0",
|
| 24 |
-
"cryptography>=43.0.0",
|
| 25 |
"numpy>=1.26.0",
|
| 26 |
"httpx>=0.27.0",
|
| 27 |
"structlog>=24.0.0",
|
| 28 |
"pyyaml>=6.0.0",
|
| 29 |
"tenacity>=9.0.0",
|
| 30 |
-
"bleach>=6.1.0",
|
| 31 |
"tiktoken>=0.7.0",
|
| 32 |
]
|
| 33 |
|
|
|
|
| 19 |
"gradio>=5.0.0",
|
| 20 |
"faiss-cpu>=1.8.0",
|
| 21 |
"sentence-transformers>=3.0.0",
|
|
|
|
|
|
|
|
|
|
| 22 |
"numpy>=1.26.0",
|
| 23 |
"httpx>=0.27.0",
|
| 24 |
"structlog>=24.0.0",
|
| 25 |
"pyyaml>=6.0.0",
|
| 26 |
"tenacity>=9.0.0",
|
|
|
|
| 27 |
"tiktoken>=0.7.0",
|
| 28 |
]
|
| 29 |
|
rag_master/agents.py
CHANGED
|
@@ -197,7 +197,7 @@ class PlannerAgent(BaseAgent):
|
|
| 197 |
outgoing = [
|
| 198 |
AgentMessage(
|
| 199 |
sender=self.role,
|
| 200 |
-
receiver=AgentRole.
|
| 201 |
content=plan,
|
| 202 |
message_type="execution_plan",
|
| 203 |
)
|
|
|
|
| 197 |
outgoing = [
|
| 198 |
AgentMessage(
|
| 199 |
sender=self.role,
|
| 200 |
+
receiver=AgentRole.REASONER,
|
| 201 |
content=plan,
|
| 202 |
message_type="execution_plan",
|
| 203 |
)
|
rag_master/models.py
CHANGED
|
@@ -17,7 +17,6 @@ class AgentRole(str, Enum):
|
|
| 17 |
REASONER = "reasoner"
|
| 18 |
CRITIC = "critic"
|
| 19 |
PLANNER = "planner"
|
| 20 |
-
EXECUTOR = "executor"
|
| 21 |
VERIFIER = "verifier"
|
| 22 |
|
| 23 |
|
|
|
|
| 17 |
REASONER = "reasoner"
|
| 18 |
CRITIC = "critic"
|
| 19 |
PLANNER = "planner"
|
|
|
|
| 20 |
VERIFIER = "verifier"
|
| 21 |
|
| 22 |
|
tests/test_models.py
CHANGED
|
@@ -173,5 +173,4 @@ class TestAgentRole:
|
|
| 173 |
assert AgentRole.REASONER == "reasoner"
|
| 174 |
assert AgentRole.CRITIC == "critic"
|
| 175 |
assert AgentRole.PLANNER == "planner"
|
| 176 |
-
assert AgentRole.EXECUTOR == "executor"
|
| 177 |
assert AgentRole.VERIFIER == "verifier"
|
|
|
|
| 173 |
assert AgentRole.REASONER == "reasoner"
|
| 174 |
assert AgentRole.CRITIC == "critic"
|
| 175 |
assert AgentRole.PLANNER == "planner"
|
|
|
|
| 176 |
assert AgentRole.VERIFIER == "verifier"
|