facebookresearch / facebookresearch/fairseq2

using pipeline_builder shared pointer multiple times lead to segfaults

Open
#369 2 comments 0 reactions 0 assignees View on GitHub
bug data pipeline
Dominant language
Python
Stars
1.1k
Forks
144
Avg merge
4d 1h
Merged PRs (30d)
1

Description

**Describe the bug:**
Segfault during the pipeline creation

**Describe how to reproduce:**
```python
from fairseq2.data import read_sequence
from fairseq2.data.data_pipeline import DataPipeline, DataPipelineBuilder

pipeline_build = read_sequence(list(range(100))) # this's shared for two shuffling operations

concat_pipe = DataPipeline.concat([pipeline_build.shuffle(10).and_return(),
pipeline_build.shuffle(10).and_return()]).and_return()
# this should have raised
next(iter(concat_pipe))
```

**Describe the expected behavior:**
This should raise an explicit RuntimeError

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.