batchflow icon indicating copy to clipboard operation
batchflow copied to clipboard

Adding pipeline with `rebatch` fails

Open AlexeyKozhevin opened this issue 4 years ago • 0 comments

Resulting dataset will not have self.dataset.

Working example:

ppl = Dataset(10).p.load(src=np.arange(10), dst='comp').rebatch(2).print(B.comp)
ppl.run(3, bar=True)

Another one:

ppl = Pipeline().load(src=np.arange(10), dst='comp')
ppl += Pipeline().rebatch(2).print(B.comp)
(ppl << Dataset(10)).run(3, bar=True)

Fails:

ppl = Pipeline().load(src=np.arange(10), dst='comp') << Dataset(10)
ppl += Pipeline().rebatch(2).print(B.comp)
ppl.run(3, bar=True)

The problem is that from_pipeline doesn't copy dataset.

AlexeyKozhevin avatar Apr 12 '20 13:04 AlexeyKozhevin