Add tinker backend. #1291
Triggered via issue
December 29, 2025 07:52
Status
Failure
Total duration
14m 38s
Artifacts
1
Annotations
4 errors
|
unittest
Process completed with exit code 1.
|
|
Failed Test: tests/common/vllm_test.py::TestLogprobs::test_logprobs_api
tests/common/vllm_test.py::TestLogprobs::test_logprobs_api: The test failed in the call phase due to an assertion error - self = <tests.common.vllm_test.TestLogprobs testMethod=test_logprobs_api>
async def test_logprobs_api(self):
await prepare_engines(self.engines, self.auxiliary_engines)
await self.model_wrapper.prepare()
messages = [
{"role": "system", "content": SYSTEM_PROMPT},
{"role": "user", "content": USER_PROMPT},
]
# Test openai api logprobs with different temperature
self.model_client = self.model_wrapper.get_openai_async_client()
_ = await self.model_client.chat.completions.create(
model=self.model_client.model_path,
messages=messages,
n=1,
temperature=1.0,
logprobs=True,
max_tokens=15,
)
response_1 = self.model_wrapper.extract_experience_from_history()[0]
_ = await self.model_client.chat.completions.create(
model=self.model_client.model_path,
messages=messages,
n=1,
temperature=0.8,
logprobs=True,
max_tokens=15,
)
response_2 = self.model_wrapper.extract_experience_from_history()[0]
self.assertTrue(response_1.logprobs is not None)
self.assertTrue(len(response_1.logprobs) > 0)
self.assertTrue(response_2.logprobs is not None)
self.assertTrue(len(response_2.logprobs) > 0)
logprobs_1 = self.model_wrapper.logprobs(response_1.tokens.tolist(), temperature=1.0)
logprobs_2 = self.model_wrapper.logprobs(response_1.tokens.tolist(), temperature=0.8)
logprobs_3 = self.model_wrapper.logprobs(response_2.tokens.tolist(), temperature=1.0)
logprobs_4 = self.model_wrapper.logprobs(response_2.tokens.tolist(), temperature=0.8)
self.assertEqual(logprobs_1.shape, logprobs_2.shape)
self.assertEqual(logprobs_3.shape, logprobs_4.shape)
self.assertFalse(torch.allclose(logprobs_1, logprobs_2, rtol=0.3, atol=1e-3))
self.assertFalse(torch.allclose(logprobs_3, logprobs_4, rtol=0.3, atol=1e-3))
logprobs_1_prompt = logprobs_1[: response_1.prompt_length - 1]
logprobs_2_prompt = logprobs_2[: response_1.prompt_length - 1]
logprobs_3_prompt = logprobs_3[: response_2.prompt_length - 1]
logprobs_4_prompt = logprobs_4[: response_2.prompt_length - 1]
self.assertEqual(logprobs_1_prompt.shape, logprobs_2_prompt.shape)
self.assertFalse(torch.allclose(logprobs_1_prompt, logprobs_2_prompt, rtol=0.3, atol=1e-3))
self.assertFalse(torch.allclose(logprobs_3_prompt, logprobs_4_prompt, rtol=0.3, atol=1e-3))
self.assertTrue(torch.allclose(logprobs_1_prompt, logprobs_3_prompt, rtol=0.3, atol=1e-3))
self.assertTrue(torch.allclose(logprobs_2_prompt, logprobs_4_prompt, rtol=0.3, atol=1e-3))
logprobs_1_response = logprobs_1[response_1.prompt_length - 1 :]
logprobs_2_response = logprobs_2[response_1.prompt_length - 1 :]
logprobs_3_response = logprobs_3[response_2.prompt_length - 1 :]
logprobs_4_response = logprobs_4[response_2.prompt_length - 1 :]
self.assertEqual(logprobs_1_response.shape, logprobs_2_response.shape)
self.assertEqual(logprobs_3_response.shape, logprobs_4_response.shape)
self.assertEqual(logprobs_1_response.shape, logprobs_2_response.shape)
self.assertEqual(response_1.logprobs.shape, logprobs_1_response.shape)
self.assertTrue(
torch.allclose(response_1.logprobs, logprobs_1_response, rtol=0.3, atol=1e-3)
)
self.assertFalse(
torch.allclose(response_1.logprobs, logprobs_2_response, rtol=0.3, atol=1e-3)
)
> self.assertTrue(
torch.allclose(response_2.logprobs, logprobs_4_response, rtol=0.3, atol=1e-3)
)
E AssertionError: False is not true
tests/common/vllm_test.py:565: AssertionError
|
|
Failed Test: tests/common/config_test.py::TestConfig::test_all_examples_are_valid
tests/common/config_test.py::TestConfig::test_all_examples_are_valid: The test failed in the call phase due to an exception - self = <tests.common.config_test.TestConfig testMethod=test_all_examples_are_valid>
def test_all_examples_are_valid(self):
example_dir = os.path.join(os.path.dirname(__file__), "..", "..", "examples")
for example_name in os.listdir(example_dir):
for filename in os.listdir(os.path.join(example_dir, example_name)):
if filename.endswith(".yaml") and not (
filename.startswith("train_")
or filename.startswith("verl_")
or filename.startswith("dj_")
):
print(f"Checking config: {filename}")
config_path = os.path.join(example_dir, example_name, filename)
try:
config = load_config(config_path)
config.checkpoint_root_dir = "./.cache/"
config.check_and_update()
except Exception as e:
print(f"Error loading config {config_path}: {e}")
> raise e
tests/common/config_test.py:57:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/common/config_test.py:54: in test_all_examples_are_valid
config.check_and_update()
trinity/common/config.py:1459: in check_and_update
self._check_model()
trinity/common/config.py:1168: in _check_model
self._check_tinker()
trinity/common/config.py:1195: in _check_tinker
service_client = tinker.ServiceClient()
^^^^^^^^^^^^^^^^^^^^^^
/opt/venv/lib/python3.12/site-packages/tinker/lib/public_interfaces/service_client.py:60: in __init__
self.holder = InternalClientHolder(
/opt/venv/lib/python3.12/site-packages/tinker/lib/internal_client_holder.py:140: in __init__
).result()
^^^^^^^^
/opt/venv/lib/python3.12/site-packages/tinker/lib/public_interfaces/api_future.py:127: in result
return self._future.result(timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/root/.local/share/uv/python/cpython-3.12.12-linux-x86_64-gnu/lib/python3.12/concurrent/futures/_base.py:456: in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
/root/.local/share/uv/python/cpython-3.12.12-linux-x86_64-gnu/lib/python3.12/concurrent/futures/_base.py:401: in __get_result
raise self._exception
/opt/venv/lib/python3.12/site-packages/tinker/lib/internal_client_holder.py:231: in _create_session
with self.aclient(ClientConnectionPoolType.SESSION) as client:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/root/.local/share/uv/python/cpython-3.12.12-linux-x86_64-gnu/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
/opt/venv/lib/python3.12/site-packages/tinker/lib/internal_client_holder.py:57: in aclient
self._clients.append(AsyncTinker(**self._constructor_kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <tinker._client.AsyncTinker object at 0x7fbd73a318b0>
def __init__(
self,
*,
api_key: str | None = None,
base_url: str | httpx.URL | None = None,
timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN,
max_retries: int = DEFAULT_MAX_RETRIES,
default_headers: Mapping[str, str] | None = None,
default_query: Mapping[str, object] | None = None,
# Configure a custom httpx client.
# We provide a `DefaultAsyncHttpxClient` class that you can pass to retain the default values we use for `limits`, `timeout` & `follow_redirects`.
# See the [httpx documentation](https://www.python-httpx.org/api/#asyncclient) for more details.
http_client: httpx.AsyncClient | None = None,
# Enable or disable schema validation for data returned by the API.
# When enabled an error APIResponseValidationError is raised
# if the API respo
|
|
unittest
Process completed with exit code 1.
|
Artifacts
Produced during runtime
| Name | Size | Digest | |
|---|---|---|---|
|
pytest-results
|
4.48 KB |
sha256:f3d82d44b05001c54a7d95bdea0f639fb30e0a4bdd5f9e44560b8c33908c6754
|
|