Using auxiliary models in experience pipeline & OpenAI API supports stream mode#513
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
Pull request overview
This PR wires auxiliary (judge) models into the experience processing pipeline by making operators async-capable and providing them access to auxiliary model OpenAI clients, while also refactoring ModelWrapper to infer engine type from the underlying model actor.
Changes:
- Add an async operator interface (
ExperienceOperatorV1) and updateExperiencePipelineto prepare operators asynchronously andawaitoperator processing/cleanup. - Add auxiliary model wrapper discovery (
get_auxiliary_model_wrappers) and pass auxiliary model OpenAI clients into experience operators. - Make
ModelWrapperfetch engine type from the model actor (get_engine_type) and remove config-passedengine_type.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| trinity/explorer/workflow_runner.py | Stop passing engine_type into ModelWrapper; rely on model-reported engine type. |
| trinity/explorer/explorer.py | Reorder preparation so models are prepared before the experience pipeline; add node-affinity comment for the pipeline actor. |
| trinity/common/models/vllm_model.py | Implement get_engine_type() for vLLM-backed inference models. |
| trinity/common/models/tinker_model.py | Implement get_engine_type() for Tinker-backed inference models. |
| trinity/common/models/model.py | Add InferenceModel.get_engine_type() abstractmethod and fetch it in ModelWrapper.prepare(). |
| trinity/common/models/init.py | Rename auxiliary actor names to optionally include config name; add get_auxiliary_model_wrappers() helper. |
| trinity/common/config.py | Make DataProcessorConfig.experience_pipeline non-optional with a default factory. |
| trinity/buffer/pipelines/experience_pipeline.py | Defer operator creation to prepare(), inject auxiliary model clients, and make operator execution/close async. |
| trinity/buffer/operators/experience_operator.py | Introduce ExperienceOperatorV1 async interface + wrapper for legacy operators; add create_operators() helper. |
| trinity/buffer/operators/init.py | Export the new operator interface and factory. |
| tests/explorer/workflow_test.py | Update ModelWrapper construction after removing engine_type parameter. |
| tests/explorer/scheduler_test.py | Update dummy inference models to implement get_engine_type(). |
| tests/explorer/explorer_test.py | Add a test operator that uses auxiliary models via OpenAI async clients; configure an auxiliary model name. |
| tests/common/vllm_test.py | Update ModelWrapper construction after removing engine_type parameter. |
| tests/buffer/reward_shaping_mapper_test.py | Switch to async test and use create_operators() with await op.process(...). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
/unittest-diff |
Summary
Skipped
Tests
Github Test Reporter by CTRF 💚 |
|
/unittest-module-trainer |
Summary
Skipped
Tests
Github Test Reporter by CTRF 💚 |
|
/gemini review |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
/unittest-module-trainer |
|
/unittest-module-trainer |
Summary
Skipped
Tests
Github Test Reporter by CTRF 💚 |
|
/unittest-module-common |
Summary
Skipped
Tests
Github Test Reporter by CTRF 💚 |
Description
As the title says
Checklist
Please check the following items before code is ready to be reviewed.