[Tinker API Stage 3] Generator integration with use_tinker_sampling_api feature flag #930
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
Stage 3 of Tinker Sampling API implementation: Generator integration with opt-in feature flag.
Key changes:
use_tinker_sampling_api: falseconfig option in generator configInferenceEngineClient.sample()instead ofgenerate()in the agent loopBug fixes (from code review):
current_sampling_paramsinstead of empty dict@pytest.mark.vllmmarker to generator testTests:
test_tinker_api_integration.py- Tests type conversion and sample() integrationtest_tinker_api_e2e.py- End-to-end tests simulating full API flowtest_skyrl_gym_generator.py::test_generator_with_tinker_sampling_api- Generator integration testAll 6 GPU tests pass locally.
Dependencies
Test plan
pytest tests/gpu/gpu_ci/test_tinker_api_integration.py -m "vllm" -vpytest tests/gpu/gpu_ci/test_tinker_api_e2e.py -m "vllm" -vpytest tests/gpu/gpu_ci/test_skyrl_gym_generator.py::test_generator_with_tinker_sampling_api -m "vllm" -vNext steps (Stage 4)
sample()(currently routes to engines[0] only)inference_engine_client.py:175-178🤖 Generated with Claude Code