[Refactor] Standardize data entry key names to {type}.{qualifier} format (#1829)
Signed-off-by: Divyansh Singhvi <divyanshsinghvi@gmail.com> Signed-off-by: dsinghvi <divyanshsinghvi@gmail.com> Signed-off-by: tzhouam <tzhouam@connect.ust.hk> Co-authored-by: Zhou Taichang <tzhouam@connect.ust.hk> Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
This commit is contained in:
41 files changed
+1192
-569
No files matched your search
@@ -891,9 +891,8 @@ class TestTPAsyncChunkFanout(unittest.TestCase):
|
||||
def test_rank0_only_polls_connector_for_tp_async_chunk(self):
|
||||
host = self._make_host(rank=0)
|
||||
payload = {
|
||||
"code_predictor_codes": [10, 11],
|
||||
"left_context_size": 0,
|
||||
"finished": torch.tensor(False),
|
||||
"codes": {"audio": [10, 11]},
|
||||
"meta": {"left_context_size": 0, "finished": torch.tensor(False)},
|
||||
}
|
||||
host._omni_connector.get.return_value = (payload, 123)
|
||||
tp_group = _FakeTPGroup(world_size=2, rank_in_group=0)
|
||||
@@ -1165,9 +1164,8 @@ class TestAsyncPayloadLifecycle(unittest.TestCase):
|
||||
|
||||
host._omni_connector.get.return_value = (
|
||||
{
|
||||
"code_predictor_codes": [20, 21, 22],
|
||||
"left_context_size": 0,
|
||||
"finished": torch.tensor(False),
|
||||
"codes": {"audio": [20, 21, 22]},
|
||||
"meta": {"left_context_size": 0, "finished": torch.tensor(False)},
|
||||
},
|
||||
1,
|
||||
)
|
||||
|
||||
@@ -119,7 +119,7 @@ def _make_runner(req_ids=("r1", "r2"), hidden_size=4):
|
||||
runner.text_step = DummyBuffer(torch.zeros((bsz, hidden_size), dtype=torch.float32))
|
||||
|
||||
runner.talker_mtp = DummyTalkerMTP()
|
||||
runner.model = SimpleNamespace(talker_mtp_output_key="code_predictor_codes")
|
||||
runner.model = SimpleNamespace(talker_mtp_output_key=("codes", "audio"))
|
||||
runner.vllm_config = SimpleNamespace(model_config=SimpleNamespace())
|
||||
|
||||
# Provide a minimal implementation that returns the expected 4-tuple.
|
||||
@@ -188,8 +188,8 @@ def test_talker_mtp_forward_cpu_updates_inputs_and_info(monkeypatch):
|
||||
# Validate per-request additional_information_cpu was updated
|
||||
info_r1 = runner.requests["r1"].additional_information_cpu
|
||||
info_r2 = runner.requests["r2"].additional_information_cpu
|
||||
assert int(info_r1["code_predictor_codes"][0, 0]) == 0
|
||||
assert int(info_r2["code_predictor_codes"][0, 0]) == 1
|
||||
assert int(info_r1["codes"]["audio"][0, 0]) == 0
|
||||
assert int(info_r2["codes"]["audio"][0, 0]) == 1
|
||||
|
||||
|
||||
def test_talker_mtp_forward_cpu_empty_batch_noop(monkeypatch):
|
||||
|
||||
Reference in new issue
Block a user