allenai / allenai/tango

Is it possible to reuse a step's output for other two steps (avoid reruning the shared step)

オープン
#552 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
572
フォーク
55
PR マージ指標
30日以内にマージされた PR はありません

説明

For example,

```python
@Step.register("share")
class Share(Step):
CACHEABLE = False
def run(self):
...

@Step.register("a")
class StepA(Step):
def run(self, foo):
...

@Step.register("b")
class StepB(Step):
def run(self, foo):
...
```
And the config file
```jsonnet
steps: {
share: {type: "share"},
A: {type: "a", foo: {type:"ref", ref:"share"}},
B: {type: "b", foo: {type:"ref", ref:"share"}},
}
```

Currently, it seems that both `StepA` and `StepB` will run the step `Share`. i.e. the step `Share` will be executed twice, once for A and once for B. Currently is it possible to just run step `Share` once and use the result for both `StepA` and `StepB`? I don't want to make step `Share` cacheable.

コントリビューションガイド

コントリビューションガイドを開く

評価

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

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

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