feat(array): a bare vmap gives its new axis a positional dim, pa.tag names it, and "batch" stops being special
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 38/100
調査の方向性
Start with pipekit_array/named/_carrier.py, focusing on vmapped_dims, core_dims, and _batch_names; then inspect the dim functions and to_xarray named in the implementation steps. Run the referenced q4b_batch_clash.py prototype and relevant tests. Done means vmap preserves item dims, leaves its added axis positional until pa.tag, and lint, type checks, and tests pass; the issue also calls for checking listed downstream consumers.
索引モデルが issue の本文から書いたものです。
説明
Problem / Request
After a bare jax.vmap, give the new axis a positional dim (None) instead of "batch". Dim functions refuse a positional dim with an error naming pa.tag. Add pa.tag(x, *names) and pa.untag(x, *dims). vmapped_dims and core_dims stop treating names starting with "batch" as added axes.
Motivation
The prototype built a ("batch", "x") carrier of shape (3, 4) for each of 2 items under vmap. The result's sizes were {batch: 2, batch_1: 3, x: 4}: the item's own dim was renamed batch_1 and its name went to the mapped axis, with no error. With ("member", "x") the result was {batch: 2, member: 3, x: 4}. coordax leaves such axes positional until tag names them (CP-D5).
Proposed API
# Shapes: (patch, y, x) = (2, 3, 4)
# today (pipekit-array)
# ("batch", x) per item → (batch, batch_1, x)
out = jax.vmap(build)(patches)
# proposed (CP-D5)
# ("batch", x) per item → (None, batch, x)
out = jax.vmap(build)(patches)
# proposed (CP-D5)
# (None, batch, x) → (patch, batch, x)
out = pa.tag(out, "patch")
Reuse
pipekit_array/named/_carrier.py:vmapped_dims,core_dims,_batch_names.
References & Existing Code
- Design:
docs/design/coordax_carriers.mdin jejjohnson/geostack (merged in jejjohnson/geostack#368), pattern 4 and question CP-O2. - Prototype:
q4b_batch_clash.py.
Implementation Steps
-
vmapped_dimsprependsNone;core_dimsdrops leadingNones only. - Every dim function and
to_xarrayrefuses aNonedim, namingpa.tag. -
pa.tag,pa.untag. - Grep every consumer (geotoolz, gridax, sesmax, plumax, radtrax, diagnostix, vardax) for code that relies on a dim called
"batch"appearing aftervmap, and list them in the PR.
Definition of Done
- Q4b: a
("batch", "x")item undervmapkeeps its name; the mapped axis isNone. -
pa.tagaftervmapgives the same carrier as building it with the name. - Lint, type check and tests green.
Relationships
- Parent: jejjohnson/geostack#369
- Blocked by: jejjohnson/gridax#627, jejjohnson/geotoolz#849, #407
- Blocks: jejjohnson/geotoolz#851, jejjohnson/gridax#629
- 主要言語
- Python
- スター
- 0
- フォーク
- 0
- 平均マージ
- 3時間 50分
- マージ済み PR(30日)
- 143
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
jejjohnson/pipekit のほかの issue
-
area:code layer:0-primitives priority:p2 type:feature
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
jejjohnson/pipekit#296 ·
メンテナーはふだん 1 日以内に返信
-
area:code type:feature
難易度 3/5 1〜2日 初心者へのやさしさ 57/100
jejjohnson/pipekit#411 ·
メンテナーはふだん 1 日以内に返信
-
area:code type:feature
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
jejjohnson/pipekit#410 ·
メンテナーはふだん 1 日以内に返信
-
area:code type:feature
難易度 3/5 1〜2日 初心者へのやさしさ 75/100
jejjohnson/pipekit#408 ·
メンテナーはふだん 1 日以内に返信
-
area:code type:feature
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
jejjohnson/pipekit#407 ·
メンテナーはふだん 1 日以内に返信
jejjohnson/pipekit の issue をすべて見る
似ている issue
-
A JSON chat answer blocks the backend event loop for the whole RAG run対応中かも @NopeCharon が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
The-OpenROAD-Project/ORAssistant#656 ·
メンテナーはふだん 1 日以内に返信
-
bug(operator): VolterraOperator built inside jax.jit with a concrete decay raises TracerBoolConversionError対応中かも @jejjohnson が今日担当しました。 オープンtype:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
jejjohnson/integrix#144 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
finos/ai-governance-framework#459 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
autowarefoundation/autoware_carla_scenario#2963 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信