Consider not constant folding ifelse false branch

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

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
20/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python

調査の方向性

Start by reading this issue alongside follow-up #2606 to understand the constant-folding behavior for ifelse and the invalid false-branch example. The issue identifies lazy ifelse transformation or stack VM constant folding as possible directions, but leaves the design open. Done means defining and implementing behavior that avoids folding an invalid unselected branch, with tests demonstrating the case.

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

説明

Description

ifelse constant folds regularly, maybe it needs a specific rewrite. Follow up to #2606

Namely I can think if an ifelse is guarding around an operation that would be invalid (like incompatible shapes in the false branch). This is tricky, because it would require some sort of early lazy ifelse transformation or use the stack vm to constant fold, either way turning inside out what is now a sequential operation (inputs are constant folded before outputs).

This is not a beginner friendly issue

主要言語
Python
スター
654
フォーク
258
平均マージ
3日 41分
マージ済み PR(30日)
42

環境構築

はじめの一歩

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

pymc-devs/pytensor のほかの issue

pymc-devs/pytensor の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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