Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

pt_expt change-bias does not preserve the lower-input ABI of .pt2 models

オープン
#5,959 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 4 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
python, pytorch

調査の方向性

deepmd/pt_expt/entrypoints/main.py の .pte/.pt2 出力パスから開始して deserialize_to_file を追跡し、次に metadata.json が lower_input_kind と do_atomic_virial をどのように提供しているかを調べます。NeighborGraph と native-spin の入力に対する回帰テストを追加し、出力メタデータが lower-input contract を保持すること、またはサポートされていないバリアントが安全に拒否されることを確認します。

索引モデルが issue の本文から書いたものです。

説明

bug

Problem

dp --pt-expt change-bias accepts a frozen .pt2 input and writes another .pt2, but the round trip discards the input artifact's lower-input metadata.

In deepmd/pt_expt/entrypoints/main.py, the .pte/.pt2 output path calls deserialize_to_file without passing lower_kind or do_atomic_virial. deserialize_to_file therefore uses its default lower_kind=nlist instead of preserving the input archive's metadata.json lower_input_kind.

Consequences

  • A NeighborGraph .pt2 is silently re-exported with the dense nlist ABI.
  • The graph artifact's graph semantics, mandatory atomic virial, and with-comm artifact/multi-rank capability are lost.
  • A native-spin .pt2 fails outright because deserialize_to_file rejects a native-spin model when lower_kind is not graph.
  • A .pt2 produced by the PT DPA4/SeZM edge_vec route is likewise not round-tripped with its original ABI.

This makes the advertised .pt2 change-bias workflow either behavior-changing or unusable depending on the model.

Expected behavior

change-bias should preserve the input .pt2 lower-input contract and the corresponding export properties, or explicitly reject .pt2 variants that cannot be reproduced safely. A regression test should compare input/output metadata and cover at least a NeighborGraph model and native spin.

Discovered while reviewing #5929.

主要言語
Python
スター
2.1k
フォーク
654
平均マージ
3日 10時間
マージ済み PR(30日)
13

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

deepmodeling/deepmd-kit のほかの issue

deepmodeling/deepmd-kit の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。