-
Notifications
You must be signed in to change notification settings - Fork 89
[WIP] LangGraph-based functional Kaggle solver #315
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
base: main
Are you sure you want to change the base?
Conversation
Implement a refactored Kaggle workflow using LangGraph's functional API, providing a modular design for easier readability and maintenance. Each task is encapsulated as a callable node, streamlining collaboration and functionality swapping. This change improves flexibility and scalability for managing Kaggle competitions while maintaining seamless orchestration.
…nd error handling - Fix bug: working dir not found for plan and advisor agents
…task management and debugging
Remove redundant agent initialization and workflow cache logic. Simplify the Kaggle solver pipeline by consolidating agent calls and reducing state dependencies.
57c8782
to
de61773
Compare
Looks good |
|
…kflow Introduce `AdviseAgent`, `PlanAgent`, and `CodeAgent` for simplify tasks prompts and LLM calls in the Kaggle competition pipeline. Enhance utility functions and setup procedures, such as virtual environment creation, dataset structure visualization, and compatibility checks.
Previous prompt flows were too complex for integration with vLLM, particularly when involving tool calling. So I copy and simplified previous agent workflows to exp folder; add some env collection steps for better enforcement with 8B Qwen model (seems like this is the most suitable model for balancing perf and speed with one 4090) More simplification can be achieved with language graph message passing. 2-3 more days needed for refinement |
I feel chances. |
Refactored `AdviseAgent` and `CodeAgent` to implement agent subgraph calls. This change improves modularity, simplifies object instantiation, and enhances maintainability by consolidating logic into reusable components.
- Add utilize `safe_fileio` for secure file I/O within tool handling, and introduced a dependency retrieval method (`deps`) to manage runtime requirements. Improves code modularity for better aligns with agent processing flows for code generation and execution.
- Refactor `PlanAgent` to decouple environment, simplify initialization, and streamline method logic. - Add `graph` entrypoint to standardize state-based task processing. - Improve prompts and golden rules compliance in task execution flows. Enhances maintainability, enforces single-task focus, and aligns planning logic to agent design. Removes redundant platform details for cleaner environment state.
Introduce `method_task` and `method_entrypoint` decorators to simplify converting instance methods into reusable langgraph tasks and entrypoints. This modularizes instance-based task and entrypoint transformation, providing better code reuse and cleaner abstractions for agents
@HuaizhengZhang A workable example using Qwen3-4B, the coding procedure seems neat and minimal. The debugger agent needs to be added to ensure the code is executable without error and produces submission.csv. Do not review |
- Introduce `verify_code` method to dynamically check and install missing Python dependencies in a virtual environment and execute specified commands. - Update `execute_command` function to support additional options for working directory and raw output formatting.
Refactored instance methods to utilize `method_task` and `method_entrypoint` decorators for enhanced readability and encapsulation.
Refactor `method_task` and `method_entrypoint` to streamline their behavior with instance-specific caching and proper binding. Added overloads for cleaner typing and updated implementation for runtime descriptor management.
Implement a refactored Kaggle workflow using LangGraph's functional API, providing a modular design for easier readability and maintenance. Each task is encapsulated as a callable node, streamlining collaboration and functionality swapping.
This change improves flexibility and scalability for managing Kaggle competitions while maintaining seamless orchestration.
Closes #314
Demo
Demo logs with vllm+qwen3-4B-AWQ model backend:
Step1 Setup env, collect basic metadata:
Step2 Advisory Summary:
Step3 Planer:
Step4 Code for each planned tasks sequentially
TODO
Before submitting this PR, please make sure you have:
the credit file.