Open
Conversation
Merge from main, with maxKernel changes
…, and float32 softmax
- Replace monolithic convert_multimodal.py with 3 separate scripts: step1_clone_repo.py, step2_populate_rag.py, step3_convert.py - Add config.py for shared paths and setup - Update README with setup and demo instructions
- step3_merge.py: scans repo for nn.Module files using AST, merges into one - step4_convert.py: converts the merged file (renamed from step3_convert.py) - No hardcoded file lists — model files discovered automatically - Updated README and Quick Start with 4-step flow
step1 now takes an optional URL argument so the demo pipeline can convert any PyTorch repo, not just the hardcoded Multimodal-Transformer. config.py derives REPO_URL/REPO_DIR from the MAXCODE_REPO_URL env var, falling back to the original default.
Get updates from main
…ercomputer/accelerator-agents into improve-migration-quality # Conflicts: # MaxCode/agents/migration/primary_agent.py
Move merge and verification logic from demo scripts into reusable agents so PrimaryAgent.run(repo_dir) handles the full pipeline (merge -> convert -> verify) end-to-end. New files: - agents/migration/merge_agent.py: MergeAgent with file discovery, filtering, import graph analysis, and merging (pure logic, no LLM) - agents/migration/verification_agent.py: VerificationAgent with AST-based completeness + optional LLM-based correctness scoring - tools/verification_tool.py: standalone ADK tool for quality checks Modified: - primary_agent.py: directory path now uses MergeAgent instead of per-file processing; caches merge result for downstream use - migration_tool.py: handles model+utils output format, auto-runs verification scorecard after conversion - adk_agents.py: registers verify_conversion_tool on both agents - step3_merge.py: simplified to thin wrapper around MergeAgent - step5_verify.py: simplified to thin wrapper around VerificationAgent - ARCHITECTURE.md, README.md: updated pipeline documentation
Exclude generic and targeted RAG source files from the agent layer integration PR to keep the diff focused on code changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MergeAgent(agents/migration/merge_agent.py): Pure-logic agent thatencapsulates file discovery, infrastructure filtering, import-graph analysis,
topological sorting, and file merging. Previously this logic lived only in
examples/demo/step3_merge.py.VerificationAgent(agents/migration/verification_agent.py): Scoresconversion quality with AST-based completeness and optional LLM-based correctness
checks. Previously in
examples/demo/step5_verify.py.verification_tool.py(tools/verification_tool.py): Standalone ADK toolexposing verification for use by ADK agents.
PrimaryAgent.run(): Directory path now usesMergeAgenttomerge+filter before converting, instead of processing files independently.
Single-file path unchanged.
migration_tool.py: Handles the new model+utils output format andauto-runs verification scorecard after conversion.
adk_agents.py: Registersverify_conversion_toolon bothmigration_agentandevaluation_agent.step3_merge.py(~600→120 lines) andstep5_verify.py(~350→180 lines) are now thin wrappers around the agent layer.ARCHITECTURE.mdandREADME.mdreflect the full pipeline(Clone → Index → Merge → Convert → Verify).
RAG corpus files (generic and targeted) are excluded from this PR.
Test plan
MergeAgent.run()produces correct merged output on a sample repoVerificationAgent.verify()returns correct completeness scoresstep3_merge.pyend-to-end on a cloned demo repostep4_convert.py(uses updatedPrimaryAgentdirectory path)step5_verify.pyend-to-endconvert_codetool viaPrimaryAgenton both file and directory inputsBase: main | Compare: pr/agent-layer-integration