transformers pipelines with generator or dataset inputs record events before inference runs
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
調査の方向性
Start by reading the transformers Pipeline.call patch and the model forward hooks, then trace how a returned PipelineIterator is consumed. Reproduce with a generator input and compare event count, timing, and outputs with an eager call. Done means lazy inference is tracked at the intended granularity and forward hooks do not add per-item events.
索引モデルが issue の本文から書いたものです。
説明
What happens
When a transformers pipeline is called with a generator, a dataset or another lazy input, Pipeline.__call__ returns a PipelineIterator, and inference runs only as that iterator is consumed. The integration's Pipeline.__call__ patch records its success event when __call__ returns, before any inference has run. Then each consumed item runs the model outside the tracked call, so the model's forward hooks record one event per item.
Checked with transformers 5.20.1 and the fix from #77:
| Call | Events |
|---|---|
clf("hello world") |
1 pipeline event (correct) |
out = clf(x for x in ["hello", "world"]) |
1 pipeline event right away: no input_meta, near-zero duration, before any inference |
list(out) |
2 more model events, one per item |
So two inputs produce three events, and the first one's duration and success don't describe any real inference.
Expected
For a lazy input, record one event per item as the iterator is consumed (with its duration and output), or one event when it's exhausted. No event should be recorded when __call__ returns the iterator. The model's forward hooks should stay quiet while the iterator is being consumed.
Notes
- This predates #77; #77 only stops eager calls from being counted twice.
Pipeline.__call__decides this based on input type (types.GeneratorType,Dataset,KeyDataset), so the patch can tell from the return value: aPipelineIteratoror another iterator instead of a list or dict.
🤖 Generated with Claude Code
- 主要言語
- Python
- スター
- 17
- フォーク
- 1
- 平均マージ
- 17時間 5分
- マージ済み PR(30日)
- 34
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
wild-edge/wildedge-python のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
wild-edge/wildedge-python#85 ·
メンテナーはふだん 1 日以内に返信
-
vLLM integration再び着手できるかも @piotrekno1 が 122 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
wild-edge/wildedge-python#38 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue help wanted
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
wild-edge/wildedge-python#25 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue help wanted
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
wild-edge/wildedge-python#22 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue help wanted
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
wild-edge/wildedge-python#20 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
wild-edge/wildedge-python の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
khuisman/mcp-gee-sweet#1166 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
lugassawan/swe-workbench#823 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
gramaziokohler/compas_timber#870 ·
-
security-scan-failure
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
semantica-agi/semantica#2089 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
autowarefoundation/autoware_carla_scenario#500 ·
メンテナーはふだん 1 日以内に返信