Commit 2c45eab
Fix batch(by_column=...) crashing after shard/shuffle/split (#8259)
MappedExamplesIterable.shuffle_data_sources, shard_data_sources and
reshard_data_sources did not forward is_batch_accumulate_arrow_table_function,
so any re-created iterable (DataLoader workers, .shard(), .shuffle(),
split_dataset_by_node) stopped injecting the tables_accumulator/length kwargs
and the accumulate function crashed:
TypeError: _batch_accumulate_arrow_table_by_columns() missing 2 required
positional arguments: 'tables_accumulator' and 'length'
Forward the flag in all three methods and add a regression test covering
shard() and shuffle() on a by_column-batched stream.
Co-authored-by: Pepijn <pepijn1999kooijmans@gmail.com>1 parent 9afab5c commit 2c45eab
2 files changed
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1723 | 1723 | | |
1724 | 1724 | | |
1725 | 1725 | | |
| 1726 | + | |
1726 | 1727 | | |
1727 | 1728 | | |
1728 | 1729 | | |
| |||
1740 | 1741 | | |
1741 | 1742 | | |
1742 | 1743 | | |
| 1744 | + | |
1743 | 1745 | | |
1744 | 1746 | | |
1745 | 1747 | | |
| |||
1756 | 1758 | | |
1757 | 1759 | | |
1758 | 1760 | | |
| 1761 | + | |
1759 | 1762 | | |
1760 | 1763 | | |
1761 | 1764 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2897 | 2897 | | |
2898 | 2898 | | |
2899 | 2899 | | |
| 2900 | + | |
| 2901 | + | |
| 2902 | + | |
| 2903 | + | |
| 2904 | + | |
| 2905 | + | |
| 2906 | + | |
| 2907 | + | |
| 2908 | + | |
| 2909 | + | |
| 2910 | + | |
| 2911 | + | |
| 2912 | + | |
| 2913 | + | |
| 2914 | + | |
| 2915 | + | |
| 2916 | + | |
| 2917 | + | |
| 2918 | + | |
2900 | 2919 | | |
2901 | 2920 | | |
2902 | 2921 | | |
| |||
0 commit comments