Skip to content

Extract per-skill sampler learning into SamplerLearningMixin#45

Merged
yichao-liang merged 1 commit into
masterfrom
sampler-learning-mixin
Jul 4, 2026
Merged

Extract per-skill sampler learning into SamplerLearningMixin#45
yichao-liang merged 1 commit into
masterfrom
sampler-learning-mixin

Conversation

@yichao-liang

Copy link
Copy Markdown
Collaborator

Summary

agent_sim_learning_approach.py had grown past 2100 lines. This moves the sampler-learning block into a dedicated mixin at predicators/approaches/sampler_learning_mixin.py, verbatim:

  • mode resolution and sandbox paths
  • synthesis tool / snapshot / message builders
  • LEARNED_SAMPLERS loading
  • the standalone synthesis session

Notes

  • The host-class contract (session methods, tool context, fitted params) is declared under TYPE_CHECKING only, so the declarations type-check the mixin without shadowing the real AgentSessionMixin implementations in the MRO.
  • Call sites in _synthesize_with_agent and _learn_simulator are unchanged; sampler state is initialized via _init_sampler_learning_state() from the host __init__.
  • Pure refactor: code moved verbatim, no behavior change.

🤖 Generated with Claude Code

agent_sim_learning_approach.py had grown past 2100 lines. Move the
sampler-learning block (mode resolution, sandbox paths, synthesis
tool/snapshot/message builders, LEARNED_SAMPLERS loading, and the
standalone synthesis session) into a dedicated mixin at
predicators/approaches/sampler_learning_mixin.py, verbatim.

The host-class contract (session methods, tool context, fitted params)
is declared under TYPE_CHECKING only, so the declarations type-check
the mixin without shadowing the real AgentSessionMixin implementations
in the MRO. Call sites in _synthesize_with_agent and _learn_simulator
are unchanged; sampler state is initialized via
_init_sampler_learning_state() from the host __init__.
@yichao-liang yichao-liang enabled auto-merge (squash) July 4, 2026 19:42
@yichao-liang yichao-liang merged commit 9c37cdb into master Jul 4, 2026
14 checks passed
@yichao-liang yichao-liang deleted the sampler-learning-mixin branch July 4, 2026 20:22
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