earth2studio-create-prognostic

작성자: nvidia

Earth2Studio 예보(시간 적분 예측) 모델 래퍼를 생성합니다. 진단 모델, 데이터 소스 또는 설치에는 사용하지 마십시오.

npx skills add https://github.com/nvidia/earth2studio --skill earth2studio-create-prognostic

Create a Prognostic Model

Scope

Default to a protocol-compatible wrapper in the user's separate Python project. Unless intent is already explicit, ask: "Are you planning to contribute this to NVIDIA Earth2Studio?" Only an affirmative answer or explicit contribution intent enables contributor steps. For local wrappers, use the project's layout, dependencies, style and test conventions; no Earth2Studio repository changes or full repository test suite are required. Use earth2studio-install for dependency setup, including NATTEN and FlashAttention. Repository paths below are source references or contributor destinations, not local output paths. If unavailable locally, consult matching-version sources on GitHub or the documentation site. Preserve existing licenses in copied code, including reference skeleton SPDX headers. These samples do not impose NVIDIA copyright on newly authored local code.

Implement the PrognosticModel protocol. Read E2S-06: Model Contract before coding, including its prognostic rules and conformance sections. The selected version's spec is authoritative; use its requirements directly rather than maintaining a separate skill contract. Use PrognosticMixin optionally: it supplies no public execution methods; explicit wrapper methods can delegate to its private helpers.

Workflow

  1. Understand the reference. Use the supplied script, repository, paper or specification; ask for missing details only when needed. Record inputs, history windows, output chunks, grids, statistics, forcing, statics, latent state, randomness, core shapes and checkpoints. Configure domains and variables before querying signatures. Unless already specified, ask: “Do you want checkpoint/restart integration? I recommend no for the initial implementation because it adds storage, restore and testing complexity.” Add it only if requested; see explicit state. Explicit initialize/step state remains required either way.
  2. Propose dependencies. Use the local project's dependency conventions and earth2studio-install for setup. For contributions only, every packaged prognostic gets a named optional extra, even if empty. Confirm changes to the repository's pyproject.toml; add extras alphabetically and include them in all.
  3. Implement in the user's project, or for contributions in earth2studio/models/px/<name>.py, using the single-frame skeleton and history methods. torch.nn.Module supplies device movement; AutoModelMixin is for packaged weights. Protocol compliance, not triple inheritance, is required.
  4. Declare slots and sources following the spec's model interface and coordinate requirements. Use the templates as implementation examples.
  5. Implement explicit execution methods following the spec's state and continuation requirements, iteration and hooks sections. Check the selected version's PrognosticMixin before using its private helpers.
  6. Handle weights and RNG. Resolve immutable Package assets, load on CPU, call eval(), register buffers and guard optional backend dependencies. Override to for non-Torch state. Follow the spec's stochasticity requirements and domain selection when applicable.
  7. Validate locally with a small numerical smoke case and check_prognostic_contract(model) using mock weights; check replay and relevant forcing/RNG behavior and report skipped checks. Follow the project's test layout. For contributions, use test/models/px/test_<name>.py and the full testing patterns. Cover numerical values, initialization/step/iterator equivalence, replay, hooks, ownership, metadata, invalid coordinates and forcing, slots and seeding. Include the sample test_model_conformance using check_prognostic_contract(model) for the new forecasts-only, explicit-state contract. Retain direct numerical tests and assert the exact expected skips. Mock tests require no downloads; real-weight tests use @pytest.mark.package.
  8. Contributor only: integrate public models. Add alphabetical exports in earth2studio/models/px/__init__.py, API entries in docs/modules/models_px.md, and CHANGELOG.md. For extras, update docs/userguide/about/install_options.yml with install notes and api_refs.
  9. Verify local wrappers with the project's relevant smoke/contract checks. For contributions, run the new component's test suite, relevant regression tests and the repository checks below. Report exact failures and skipped coverage; do not claim unrun checks passed.
uv run pytest test/models/px/test_<name>.py -m "not package" -v
# When real-weight validation is requested and dependencies are available:
uv run pytest test/models/px/test_<name>.py -m package --package -v
make format && make lint && make license

Use uv run or the project virtualenv for Python. For contributions, include SPDX headers in newly authored repository code, typed public methods and NumPy-style docstrings; use loguru.logger in library code. Use the complete docstrings in the templates. Adapt descriptions to the model's state, forcing windows and forecast chunk; avoid stale initial-condition-first or single-frame wording from older wrappers.

Contributor Checklist

Only for confirmed contributions, follow CONTRIBUTING.md and the developer guide:

  • Register approved extras, exports, API/catalog entries and changelog updates.
  • Apply repository style and SPDX requirements; preserve copied licenses.
  • Add and run component tests and relevant regressions, plus make format, make lint, make license; report unavailable dependencies and skipped coverage.
  • Use the PR references when submission is requested. Commit, push and open a PR only when explicitly requested.

Reference Map

ReferenceRead when
Model contractAlways, before implementation
SkeletonStarting a single-frame wrapper
Method examplesRetaining history in explicit state
Forcing and slotsForced or coupled execution
Regional viewsThe model supports sub-domains
Testing guideBuilding mock/contract tests
Validation guideComparing with upstream inference
PR body, validation commentA PR is requested

Common Mistakes

  • Copying *x/*y from the protocol into wrappers: declare fixed named slots.
  • Yielding the initial condition: first yield is the first forecast; drivers use initial_condition(x) separately when publishing the starting fields.
  • Keeping history/latents in a generator frame: save everything needed alongside y in serializable state so a checkpoint can resume with step.
  • Applying hooks inside __call__, initialize or step: hooks are iterator-only.
  • Copying hook inputs: both hooks receive y directly and their returned values feed recurrence; in-place front hooks can edit a previously yielded array.
  • Fetching conditioning internally: declare forcing and require caller-supplied data. Static forcing is supplied only at initialization.

For local work, use the user's project root. For contributor Harbor tasks only, output goes under /workspace/output/earth2studio/models/px/; a copied repo is at /workspace/repo. Never read evals/targets/ (grader-only material). Keep validation scripts, checkpoints, images and credentials out of contribution commits. If a template or implementation conflicts with the selected version's spec, report the discrepancy; do not redefine the contract in this skill.

nvidia의 다른 스킬

accelerated-computing-cudf
nvidia
공식 NVIDIA 작성 NVIDIA cuDF GPU 데이터프레임, pandas 가속, dask-cuDF, ETL, 조인, groupby, CSV/Parquet I/O, nullable 의미론 등에 대한 안내
accessibility
nvidia
정적 분석, 런타임 테스트, ARIA 패턴, 키보드 탐색, 색상 대비를 아우르는 통합 접근성 감사 워크플로입니다. 이 스킬을 사용하세요…
accessing-mlflow
nvidia
MLflow에 저장된 평가 결과를 조회하고 탐색합니다. 사용자가 호출 ID로 실행을 조회하거나, 모델 간 메트릭을 비교하거나, 아티팩트를 가져오려 할 때 사용하세요.
add-binding-feature
nvidia
핵심 런타임과 영향을 받는 모든 바인딩에서 공용 NeMo Relay API 표면을 추가하거나 변경합니다.
add-middleware
nvidia
NeMo Relay 미들웨어 파이프라인에 새로운 가드레일 또는 인터셉트 유형을 추가합니다.
aicr-analyzing-snapshots
nvidia
AICR 스냅샷 YAML 파일을 분석하거나, 클러스터 상태를 검토하거나, 공급자 특성을 비교하거나, GPU/네트워크 토폴로지 인사이트를 추출할 때 사용합니다...
aicr-auditing-docs
nvidia
AICR의 Markdown 문서를 검토할 때 중복, 표류, 비대, 공백을 확인하여 프로젝트가 발전함에 따라 문서의 가치를 높게 유지하기 위해 사용합니다. "감사…"로 시작하는 트리거에 반응합니다.
aicr-creating-guided-demos
nvidia
대화형 안내 데모 스크립트(demos/*.sh)를 라이브 또는 자기 주도 방식으로 Frame → Tell → Show → Close 패턴에 따라 구조화한다. "데모 스크립트", "안내…"와 같은 표현에 반응한다.