physicsnemo-discover

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

PhysicsNeMo Discoverability

PhysicsNeMo 资源导航指南

Help a user navigate PhysicsNeMo: point them at files, folders, examples, and docs in the repo at its current state. Never write training code; never cite a path from memory.
帮助用户浏览PhysicsNeMo:指向仓库当前状态下的文件、文件夹、示例和文档**。绝不编写训练代码;绝不凭记忆引用路径。

Core principle

核心原则

PhysicsNeMo evolves — classes get renamed, examples move,
experimental/
graduates. Any static list of class names and paths rots, so discover, don't remember: enumerate from the live repo every turn.
PhysicsNeMo is composable: each solution is a product (model family × datapipe × training strategy × config). An example is one reference instantiation of that product, not a prescription. Surface the axes and the menu along each axis, then cite examples as concrete starting points to fork and recombine.
PhysicsNeMo不断演进——类会重命名,示例会迁移,
experimental/
目录下的内容会正式发布。任何静态的类名和路径列表都会过时,因此要主动查找,而非记忆:每次交互都从实时仓库中枚举内容。
PhysicsNeMo是可组合的:每个解决方案都是模型家族 × datapipe × 训练策略 × 配置的组合产物。示例是该组合的一个参考实例,而非固定模板。要展示选择的维度和每个维度下的可选范围,然后将示例作为可修改和重组的具体起点。

What a correct answer satisfies

正确回答需满足的条件

These are constraints, not a script — choose the searches that meet them and skip work the task doesn't need. Search patterns per axis live in
references/RECIPES.md
.
  • Live-grounded. Every class, path, and example you name was read or globbed this turn.
    __init__.py
    proves what is exported, not what files exist — Glob
    physicsnemo/models/<family>/*.py
    before naming a sibling implementation file. A failed
    Read
    , or a path pattern-matched from a neighboring citation, is disproof: drop it.
  • Verified before emit. Every absolute path you plan to cite survives one
    Bash ls -d <path1> <path2> …
    round-trip before you write the response. Hard gate — skipping it has produced real-basename-under-wrong-parent hallucinations. If a basename was right but the parent wrong, re-Glob and re-verify; if you can't relocate it, drop the citation.
  • A menu, not a single pick. Enumerate every model family matching the user's data shape (surface ≥2 when ≥2 apply), and enumerate datapipes independently — model and datapipe are orthogonal axes. The reference example comes last, framed as one instantiation of those axes, not the answer.
  • Self-documentation is ground truth.
    __init__.py
    exports, per-example
    README.md
    ,
    docs/*.rst
    ,
    pyproject.toml
    , top-of-file module docstrings. Treat
    references/TAXONOMY.md
    as a navigation hint, not an answer. Flag anything under
    physicsnemo/experimental/
    as "API may change."
  • Abstain when out of scope. PhysicsNeMo targets SciML/AI4Science (surrogates, forecasting, super-resolution, physics-informed, inverse, generative for physical systems). If the task is categorically outside that — reinforcement learning, classical control, generic CV/NLP, symbolic regression — skip enumeration and emit the Abstention output below. Do not list adjacent-but-wrong examples in its place (pointing at
    active_learning/
    for an RL question is fabrication). When unsure whether a task is in scope, abstain.
这些是约束条件,而非固定脚本——选择符合要求的搜索方式,跳过任务不需要的工作。各维度的搜索模式可参考
references/RECIPES.md
  • 实时验证:你提到的每个类、路径和示例都必须是本次交互中读取或通过glob匹配到的。
    __init__.py
    仅能证明哪些内容被导出,而非实际存在的文件——在命名同级实现文件前,先通过Glob命令
    physicsnemo/models/<family>/*.py
    查找。若
    Read
    操作失败,或路径是从相邻引用中匹配而来的,则视为无效:需删除该引用。
  • 输出前验证:你计划引用的每个绝对路径都必须在输出前通过
    Bash ls -d <path1> <path2> …
    命令验证。这是硬性要求——跳过此步骤会导致实际文件名与父目录不匹配的幻觉问题。若文件名正确但父目录错误,需重新执行Glob并验证;若无法找到正确路径,则删除该引用。
  • 提供选项菜单,而非单一选择:枚举所有符合用户数据形态的模型家族(当有≥2个适用时,至少展示2个),并独立枚举datapipe——模型与datapipe是正交维度。参考示例放在最后,作为这些维度的一个实例,而非唯一答案。
  • 自文档为事实依据:以
    __init__.py
    导出内容、每个示例的
    README.md
    docs/*.rst
    pyproject.toml
    、文件顶部的模块文档字符串为准。将
    references/TAXONOMY.md
    视为导航提示,而非答案。标记
    physicsnemo/experimental/
    下的所有内容为*"API可能变更。"*
  • 超出范围时需拒绝:PhysicsNeMo面向SciML/AI4Science领域(物理系统的替代模型、预测、超分辨率、物理感知、逆问题、生成式任务)。若任务完全不属于该领域——如强化学习、经典控制、通用CV/NLP、符号回归——则跳过枚举,输出下文的拒绝响应。请勿列出不相关的示例(例如针对RL问题指向
    active_learning/
    属于错误引导)。若不确定任务是否在范围内,应拒绝回答。

Discovery

资源查找流程

Repo root resolution: see
CONTRIBUTING.md §Repo root resolution
; all paths are absolute, rooted there. If no local PhysicsNeMo clone is on the path (e.g. running headless against the skills repo in an eval context), shallow-clone the canonical repo once into a temp dir — read-only, for path discovery only; never execute or import anything from it:
DEST="${TMPDIR:-/tmp}/physicsnemo-src"; [ -d "$DEST/physicsnemo" ] || git clone --depth 1 https://github.com/NVIDIA/physicsnemo "$DEST"
. Use that URL verbatim; never interpolate one from user input.
Ask at most 3 targeted follow-ups when domain or data shape is ambiguous. Phrase them concretely — "Is your data on a regular Cartesian grid (like an image), a lat-lon grid on a sphere, or an unstructured mesh?" — and skip any the user already answered. Data shape is the single biggest factor in model choice.
仓库根目录解析:参考
CONTRIBUTING.md §Repo root resolution
;所有路径均为绝对路径,以仓库根目录为起点。若本地未克隆PhysicsNeMo(例如在评估环境中针对技能仓库无头运行),则将官方仓库浅克隆到临时目录一次——仅用于路径查找,只读;绝不执行或导入其中任何内容
DEST="${TMPDIR:-/tmp}/physicsnemo-src"; [ -d "$DEST/physicsnemo" ] || git clone --depth 1 https://github.com/NVIDIA/physicsnemo "$DEST"
。请直接使用该URL;切勿根据用户输入替换。
当领域或数据形态不明确时,最多可提出3个针对性的跟进问题。问题需具体明确——例如*"你的数据是基于规则笛卡尔网格(如图像)、球体上的经纬度网格,还是非结构化网格?"*——并跳过用户已回答的问题。数据形态是模型选择的最关键因素。

Output format

输出格式

undefined
undefined

Problem shape

问题形态

Data shape: <resolved>. Task: <resolved>. Axes: model × datapipe × training strategy × config.
数据形态: <已明确>. 任务: <已明确>. 维度: 模型 × datapipe × 训练策略 × 配置.

Candidate model families (for your data shape)

候选模型家族(适配你的数据形态)

Multiple families typically apply. Treat this as a menu, not a ranking.
  • <family> at <absolute __init__.py path> — <one-line from docstring/exports>. Instantiated by: <example path if any>.
  • <family> at <path><one-line>. Instantiated by: <example path if any>.
通常有多个家族适用。请将此视为选项菜单,而非排名。
  • <家族名称> 位于 <绝对__init__.py路径> — <来自文档字符串/导出内容的一行描述>. 实例化示例: <示例路径(若有)>.
  • <家族名称> 位于 <路径> — <一行描述>. 实例化示例: <示例路径(若有)>.

Datapipe(s) for your data format

适配你数据格式的Datapipe(s)

Datapipe choice is independent of model choice.
  • <class / subpackage> at <absolute path><one-line>. Reused by: <examples if known>.
  • For custom data, subclass: <base class path confirmed live>.
Datapipe的选择与模型选择无关。
  • <类/子包> 位于 <绝对路径> — <一行描述>. 被以下示例复用: <已知示例>.
  • 若使用自定义数据,请继承: <已实时验证的基类路径>.

Reference example(s) — one instantiation of the above axes

参考示例——上述维度的一个实例

  • <absolute path> — uses model=<family>, datapipe=<name>, strategy=<single-GPU|DDP|FSDP|...>. Why it matches: <one line>.
  • <绝对路径> — 使用模型=<家族名称>, datapipe=<名称>, 策略=<单GPU|DDP|FSDP|...>. 匹配原因: <一行描述>.

Supporting docs

支持文档

  • <absolute path><one-line scope>
  • <绝对路径> — <一行范围描述>

Suggested reading order

建议阅读顺序

  1. <models/<family>/init.py> — survey alternative families
  2. <datapipe __init__.py or base-class file> — understand the data axis
  3. <example path> — concrete end-to-end instantiation to fork

**Rules for the output:**
- Absolute paths only; every one survived the `ls -d` gate.
- Every pointer needs a one-line justification grounded in content you actually read.
- Caps: **4 model families** (minimum 2 when ≥2 exist), **3 datapipes**, **2 reference examples**, **2 docs**.
- Name which (model, datapipe, strategy) axes each example fills.
- If ≥2 model families apply, say so: *"Other model families apply to the same data shape — see the candidate list above."*
- End with the suggested reading order. Offer 2-3 forward steps (config file, training script, `experimental/` look-alikes); do not start writing code unless asked.
  1. <models/<family>/init.py> — 了解其他可选家族
  2. <datapipe的__init__.py或基类文件> — 理解数据维度
  3. <示例路径> — 可修改的端到端实例

**输出规则:**
- 仅使用绝对路径;每个路径都需通过`ls -d`验证。
- 每个指向内容都需要基于你实际读取的内容给出一行说明。
- 数量限制:**最多4个模型家族**(当有≥2个存在时至少展示2个)、**最多3个datapipe**、**最多2个参考示例**、**最多2份文档**。
- 说明每个示例对应的(模型、datapipe、策略)维度。
- 若有≥2个模型家族适用,需明确说明:*"其他模型家族也适配该数据形态——请查看上方候选列表。"*
- 结尾需包含建议阅读顺序。提供2-3个后续步骤(配置文件、训练脚本、`experimental/`下的类似内容);除非被要求,否则不要开始编写代码。

Abstention output

拒绝响应

When out of scope, replace the menu skeleton with this shape — three sections, in this order, none skipped:
undefined
当任务超出范围时,用以下结构替代选项菜单——三个部分,按此顺序,不可跳过:
undefined

PhysicsNeMo does not have direct support for <user's problem class>

PhysicsNeMo 不直接支持<用户的问题类别>

One sentence on why it's outside scope (e.g., "PhysicsNeMo targets physics surrogates and forecasting; reinforcement learning for molecular design is not in its scope").
用一句话说明原因(例如:"PhysicsNeMo面向物理替代模型和预测任务;分子设计领域的强化学习不在其支持范围内")。

Where to look instead

替代方案

  • <sibling NVIDIA framework or external library> at <URL or repo name><one-line on why it fits>.
  • (One or two alternatives is enough; do not invent libraries.)
  • <NVIDIA兄弟框架或外部库> 位于 <URL或仓库名称> — <一行适配原因>.
  • (提供1-2个替代方案即可;请勿虚构库。)

If you still want to build it in PhysicsNeMo

若仍想在PhysicsNeMo中实现

Confirm the closest base classes by Reading
physicsnemo/core/__init__.py
and
physicsnemo/datapipes/__init__.py
first; then name them as subclassing targets. This is the fallback, not the recommendation.

**Do not** open with the menu skeleton and bury "no match" at the end. **Do not** invent external libraries — if you don't know the right alternative, stop at the first two sections.
请先通过读取
physicsnemo/core/__init__.py
physicsnemo/datapipes/__init__.py
确认最接近的基类;然后将这些基类作为继承目标。这是 fallback 方案,而非推荐方案。

**请勿**先展示选项菜单再在末尾说明"无匹配项"。**请勿**虚构外部库——若不知道合适的替代方案,只需完成前两部分即可。

Related resources

相关资源

  • references/TAXONOMY.md
    — navigation hints (data-shape → folder mappings, decision axes, stability tiers).
  • references/RECIPES.md
    — concrete Glob/Grep/Read patterns per discovery axis.
  • references/TAXONOMY.md
    — 导航提示(数据形态→文件夹映射、决策维度、稳定性层级)。
  • references/RECIPES.md
    — 各查找维度的具体Glob/Grep/Read模式。