How mspoulaei/multi-agent-hpo works
Multi-agent HPO runs repeated proposal, training, diagnosis, and research rounds for an image classifier. The CLI initializes the run and invokes the LangGraph workflow; that workflow coordinates two consultants, a supervisor, the executor, an analyzer, and a researcher. Training produces metrics and plots, while analysis and search inform the next proposal. The README documents several workflow capabilities not fully visible in the excerpts; edges for those are cited to it. Source excerpts do not expose every graph transition, so only documented or directly evidenced relationships are shown.
Main entry points: hpo_graph.py HPO Workflow · train.py Training Loop · models.py LLM Client · main.py Run CLI
Components 22
Run Entry
- Run CLI
main.py - Seed Setup
src/utils/seed.py
HPO Coordination
- HPO Workflow
src/graph/hpo_graph.py - Workflow State
src/graph/state.py - Agent Prompts
src/agents/prompts.py - Consultants A/B
src/graph/hpo_graph.py - Supervisor
src/graph/hpo_graph.py - LLM Client
src/agents/models.py
Model Training
- Trial Executor
src/graph/hpo_graph.py - Data Loaders
src/executor/data.py - Training Loop
src/executor/train.py - ResNet-9
src/executor/model/resnet9.py - Training Plots
src/utils/plotting.py - Artifact I/O
src/utils/io.py
Analysis Research
- Metrics Analysis
src/executor/metrics.py - LLM Diagnosis
src/graph/hpo_graph.py - Research Agent
src/graph/hpo_graph.py - Web Search
src/tools/google_search.py
Other components
- Operator
- Gemini Search
- Google CSE
- Gemini LLM
Connections 26
- Operator → Run CLI: starts run
README.md - Run CLI → Seed Setup: sets seed
main.py - Run CLI → HPO Workflow: builds and invokes
main.py - HPO Workflow → Workflow State: uses state
src/graph/hpo_graph.py - HPO Workflow → Agent Prompts: formats prompts
src/graph/hpo_graph.py - HPO Workflow → Consultants A/B: dispatches proposals
README.md - HPO Workflow → Supervisor: dispatches merge
README.md - HPO Workflow → Trial Executor: dispatches trial
README.md - HPO Workflow → LLM Diagnosis: runs diagnosis
README.md - HPO Workflow → Research Agent: dispatches research
README.md - Consultants A/B → LLM Client: requests completion
src/graph/hpo_graph.py - Supervisor → LLM Client: requests completion
src/graph/hpo_graph.py - LLM Diagnosis → LLM Client: requests analysis
src/graph/hpo_graph.py - Research Agent → LLM Client: requests suggestions
src/graph/hpo_graph.py - LLM Client → Gemini LLM: calls API
- Trial Executor → Training Loop: runs training
src/graph/hpo_graph.py - Training Loop → Data Loaders: loads batches
src/executor/train.py - Training Loop → ResNet-9: trains model
src/executor/train.py - Training Loop → Metrics Analysis: computes scores
src/executor/train.py - Training Loop → Training Plots: saves plots
src/executor/train.py - Training Loop → Artifact I/O: saves summary
src/executor/train.py - HPO Workflow → Metrics Analysis: analyzes trajectories
README.md - Research Agent → Web Search: queries web
src/graph/hpo_graph.py - Web Search → Gemini Search: uses grounded search
src/tools/google_search.py - Web Search → Google CSE: uses fallback search
src/tools/google_search.py - Research Agent → Consultants A/B: returns hints
README.md