执行摘要
修复 EAGLE3 测试中缺失 trust_remote_code 属性错误
测试 test_eagle3_acceptance_length 因 trust_remote_code 属性缺失而失败,影响 ROCm CI 流程。PR body 明确描述了问题:get_samples 读取 args.trust_remote_code 时抛出 AttributeError。
建议合并,修复简单直接,经过 approve。
无人工评论,机器人自动审核通过。
测试 test_eagle3_acceptance_length 因 trust_remote_code 属性缺失而失败,影响 ROCm CI 流程。PR body 明确描述了问题:get_samples 读取 args.trust_remote_code 时抛出 AttributeError。
建议合并,修复简单直接,经过 approve。
无人工评论,机器人自动审核通过。
tests/v1/spec_decode/test_acceptance_length.py 的 get_mt_bench_prompts 函数中,向 SimpleNamespace 添加 trust_remote_code=False 属性。@pytest.mark.skipif 中的 is_cuda() 改为 is_cuda_alike(),使测试能在 ROCm 等 CUDA 兼容平台上运行。| 文件 | 模块 | 状态 | 重要度 |
|---|---|---|---|
tests/v1/spec_decode/test_acceptance_length.py |
测试 | modified | 4.06 |
tests/v1/spec_decode/test_acceptance_length.py
test-coverage
修复测试中 SimpleNamespace 缺少 trust_remote_code 属性导致 AttributeError,并放宽平台检查条件。
# 修改前:SimpleNamespace 缺少 trust_remote_code 属性,导致 get_samples 中访问 args.trust_remote_code 时出现 AttributeError。
args = SimpleNamespace(
dataset_name="hf",
dataset_path="philschmid/mt-bench",
num_prompts=num_prompts,
seed=42,
no_oversample=False,
endpoint_type="openai-chat",
input_len=None,
output_len=DEFAULT_OUTPUT_LEN,
sharegpt_output_len=DEFAULT_OUTPUT_LEN,
hf_name=None,
hf_split="train",
hf_subset=None,
hf_output_len=DEFAULT_OUTPUT_LEN,
no_stream=True,
disable_shuffle=False,
skip_chat_template=False,
trust_remote_code=False, # 新增:显式禁用远端代码执行,避免 AttributeError
)
# 修改前:@pytest.mark.skipif(not current_platform.is_cuda(), ...) # 仅限 CUDA
# 修改后:放宽为 CUDA 兼容平台(如 ROCm)
@pytest.mark.skipif(
not current_platform.is_cuda_alike(),
reason="This test is only supported on CUDA-alike platforms.",
)
当前评论区没有形成足够清晰的争议点或结论,后续有更多讨论时会体现在这里。
风险极低。仅修改测试文件,添加一个配置项并放宽平台条件,不影响生产代码。
影响范围仅限于测试 test_eagle3_acceptance_length。修复后该测试可在 ROCm 及 CUDA 平台正确运行,提升了 CI 对 AMD GPU 的覆盖。
当前没有检测到明确关联的 Issue 链接,后续同步到相关引用后会出现在这里。
参与讨论