Streaming operator modules need similar `begin` hook

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

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

@bjester がすでに取り組んでいます。

2026年10月14日 から。

評価

この issue はまだ評価されていません。

説明

DEV: backend TAG: tech update / debt

❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Observed

During implementing streaming deserialization, it was noticed that a Transform like AppModelValidate could use a hook to reset state, similar to a Source's method begin.

💡 Tactical Suggestion (Optional): The docstring says this transform "Must be instantiated per pipeline run". StoreModelSource.begin() already resets fk_cache, so the transform's own state could reset at the same point. Then reusing the instance can't leak IDs from an earlier run:

def __call__(self, items):
    self.accepted_ids = set()
    self.failed_ids = set()
    self.deleted_ids = {}
    return super().__call__(items)

If you prefer, a begin()-style hook on Transform would do the same thing.

Originally posted by @bjester in https://github.com/learningequality/morango/pull/390#discussion_r4274334507

主要言語
Python
スター
15
フォーク
27
平均マージ
6日 44分
マージ済み PR(30日)
13

環境構築

はじめの一歩

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

learningequality/morango のほかの issue

learningequality/morango の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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