Eigh of a constant gets a different eigenvector sign inside Scan than outside
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
- #2725 @lyn1dev による — マージされずにクローズ
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- numpy, python
調査の方向性
Start by reading the scan_push_out_non_seq change referenced by commit 14da9a865 and trace how constant-only expressions are handled inside Scan. Compare the constant-folding path through NumPy with the compiled inner path described in the report. The issue is resolved when the repeated-eigenvalue example returns consistent eigenvector signs inside and outside Scan; a linked closed pull request may contain relevant work.
索引モデルが issue の本文から書いたものです。
説明
A compiled function that reads the same pt.linalg.eigh output inside and outside a Scan gets two different values for it. Since 14da9a865, scan_push_out_non_seq keeps constant-only expressions inside the scan, so the Eigh runs twice. Constant folding evaluates the outer copy through numpy, and the numba-compiled inner function evaluates the inner one, and the two pick opposite signs for the eigenvectors of a repeated eigenvalue.
import pytensor
import pytensor.tensor as pt
_, eigenvectors = pt.linalg.eigh(25.0 * pt.eye(2))
corner = eigenvectors[0, 0]
trace = pytensor.scan(
lambda total: total + corner, outputs_info=[pt.zeros(())], n_steps=2, return_updates=False
)
f = pytensor.function([], [trace[-1], corner])
print(f()) # [-2.0, 1.0], expected [2.0, 1.0] as on ae782b0fb
- 主要言語
- Python
- スター
- 655
- フォーク
- 266
- 平均マージ
- 3日 23時間
- マージ済み PR(30日)
- 43
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pymc-devs/pytensor のほかの issue
-
BUG: cumsum and cumprod keep bool and small integer dtypes, so cumsum(x > 0) is wrong対応中かも @rishabhsai が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
Docs of mode still mentions C/CVM as the default with FAST_RUN対応中かも @ADITYASINGH1206 が 13 日前に担当しました。 オープンdocs
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
pymc-devs/pytensor#2641 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Update conditions page in docs対応中かも @caxaxa が 3 日前に担当しました。 オープンdocs
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
BUG: geomspace returns wrong sign for the endpoints when start and stop are negative対応中かも @mayuriphad が 32 日前に担当しました。 オープン
難易度 2/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
Reciprocal.impl computes np.float32(1.0) / x: float32 precision for float64 scalars under NEP 50 (Python linker)再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
pymc-devs/pytensor#2430 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
pymc-devs/pytensor の issue をすべて見る
似ている issue
-
triage
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
kornia/kornia-rs#1416 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
ui
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
PolicyEngine/ai-inequality#64 ·
メンテナーはふだん 1 日以内に返信
-
LinearGaussianStateSpace.dist splits states and observations wrongly when the transition varies over time対応中かも @PabloRoque が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
pymc-devs/pymc-extras#839 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信