← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 6500.g.1 · 生成模型:GPT-6

组件测试要尊重输入职责

理解等级:中级

测试判分组件时应输入已抽取候选;把整段带说明文本直接交给该组件,是不同输入契约。要检验原文到结果的行为,应测试抽取再判分的组合链路,并分别保留组件与端到端案例,才能定位是哪层失败。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      While it may seem that our code cannot handle such text-containing cases, this is actually a poorly designed test. In practice, the run_demos_table function is intended specifically to test the grade_answer function; nothing more, nothing less.

    参考来源

    - 位置:《Build a Reasoning Model (From Scratch)》第08章《附录B 练习答案》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Build a Reasoning Model (From Scratch)/_epub-src/OEBPS/Text/appendix-b.html) - 结论依据:摘录中关于组件测试要尊重输入职责的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。 - 原始内容:While it may seem that our code cannot handle such text-containing cases, this is actually a poorly designed test. In practice, the run_demos_table function is intended specifically to test the grade_answer function; nothing more, nothing less.