You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
目标
把 #2434 API 命名规范化过程中验证过的做法,提炼成一组不依赖本次迁移背景的通用规则,供后续新 API 设计、跨模块协议、owner YAML/文档同步和 PR 评审复用。
这不是要重新讨论 #2434 的逐项裁决;那条 roadmap 已完成并关闭。这里希望沉淀的是:当一个 API 需要命名时,我们应该如何判断名字是否表达语义、边界和生命周期。
核心规则
_tensor,不要引入_torch、_device_tensor、cpu_、device_等平行写法。legacy、old、new、v2、tmp等名字表达的是仓库历史,不是调用者可依赖的语义。build_*,绑定回调或 adapter 用bind_*,解析路径/配置用resolve_*;重置钩子优先统一到reset(mask)一族,仅在阶段语义确实不同时刻意保留不同名字。snake_case,类 term 使用CamelCase;同一注册表中不混排。评审清单
合理例外
建议的落地方式
欢迎补充你们遇到的反例,尤其是:双实现何时值得命名区分、protected protocol 的文档边界、以及跨仓/外部稳定契约下是否需要放宽“不留别名”的要求。
All reactions