Title: Fix legacy_dataset_infos
Author: lhoestq (MEMBER)
State: closed
Created: 2023-07-17T09:56:21Z

was causing transformers CI to fail

https://circleci.com/gh/huggingface/transformers/855105

Comments:
_The documentation is not available anymore as the PR was closed or merged._

<details>
<summary>Show benchmarks</summary>

PyArrow==8.0.0

<details>
<summary>Show updated benchmarks!</summary>

### Benchmark: benchmark_array_xd.json

| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |
|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| new / old (diff) | 0.006087 / 0.011353 (-0.005265) | 0.003567 / 0.011008 (-0.007442) | 0.079668 / 0.038508 (0.041160) | 0.063647 / 0.023109 (0.040538) | 0.323082 / 0.275898 (0.047184) | 0.348679 / 0.323480 (0.025199) | 0.004726 / 0.007986 (-0.003259) | 0.002955 / 0.004328 (-0.001373) | 0.062724 / 0.004250 (0.058473) | 0.050194 / 0.037052 (0.013142) | 0.321407 / 0.258489 (0.062918) | 0.355053 / 0.293841 (0.061212) | 0.026992 / 0.128546 (-0.101554) | 0.007994 / 0.075646 (-0.067653) | 0.260562 / 0.419271 (-0.158710) | 0.050933 / 0.043533 (0.007400) | 0.316644 / 0.255139 (0.061505) | 0.336759 / 0.283200 (0.053560) | 0.022581 / 0.141683 (-0.119101) | 1.481259 / 1.452155 (0.029104) | 1.535191 / 1.492716 (0.042475) |

### Benchmark: benchmark_getitem\_100B.json

| metric | get_batch_of\_1024\_random_rows | get_batch_of\_1024\_rows | get_first_row | get_last_row |
|--------|---|---|---|---|
| new / old (diff) | 0.194111 / 0.018006 (0.176104) | 0.448146 / 0.000490 (0.447656) | 0.000321 / 0.000200 (0.000121) | 0.000056 / 0.000054 (0.000001) |

### Benchmark: benchmark_indices_mapping.json

| metric | select | shard | shuffle | sort | train_test_split |
|--------|---|---|---|---|---|
| new / old (diff) | 0.023908 / 0.037411 (-0.013503) | 0.073316 / 0.014526 (0.058790) | 0.085588 / 0.176557 (-0.090968) | 0.145377 / 0.737135 (-0.591759) | 0.084788 / 0.296338 (-0.211550) |

### Benchmark: benchmark_iterating.json

| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |
|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| new / old (diff) | 0.439327 / 0.215209 (0.224118) | 4.384833 / 2.077655 (2.307179) | 2.322943 / 1.504120 (0.818823) | 2.147737 / 1.541195 (0.606542) | 2.226725 / 1.468490 (0.758235) | 0.502957 / 4.584777 (-4.081820) | 3.098106 / 3.745712 (-0.647606) | 4.194642 / 5.269862 (-1.075220) | 2.598820 / 4.565676 (-1.966856) | 0.057942 / 0.424275 (-0.366333) | 0.006857 / 0.007607 (-0.000750) | 0.511517 / 0.226044 (0.285472) | 5.121797 / 2.268929 (2.852868) | 2.756506 / 55.444624 (-52.688118) | 2.424602 / 6.876477 (-4.451875) | 2.608342 / 2.142072 (0.466270) | 0.589498 / 4.805227 (-4.215729) | 0.126065 / 6.500664 (-6.374600) | 0.061456 / 0.075469 (-0.014013) |

### Benchmark: benchmark_map_filter.json

| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |
|--------|---|---|---|---|---|---|---|---|---|
| new / old (diff) | 1.239928 / 1.841788 (-0.601860) | 18.423532 / 8.074308 (10.349224) | 13.935148 / 10.191392 (3.743756) | 0.129913 / 0.680424 (-0.550511) | 0.016744 / 0.534201 (-0.517457) | 0.333468 / 0.579283 (-0.245815) | 0.359615 / 0.434364 (-0.074749) | 0.383678 / 0.540337 (-0.156659) | 0.533007 / 1.386936 (-0.853929) |

</details>
PyArrow==latest

<details>
<summary>Show updated benchmarks!</summary>

### Benchmark: benchmark_array_xd.json

| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |
|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| new / old (diff) | 0.005980 / 0.011353 (-0.005373) | 0.003640 / 0.011008 (-0.007368) | 0.062500 / 0.038508 (0.023992) | 0.059843 / 0.023109 (0.036733) | 0.360993 / 0.275898 (0.085095) | 0.401981 / 0.323480 (0.078501) | 0.005495 / 0.007986 (-0.002490) | 0.002862 / 0.004328 (-0.001467) | 0.062491 / 0.004250 (0.058240) | 0.050778 / 0.037052 (0.013726) | 0.371007 / 0.258489 (0.112518) | 0.405154 / 0.293841 (0.111313) | 0.027390 / 0.128546 (-0.101156) | 0.008042 / 0.075646 (-0.067604) | 0.067590 / 0.419271 (-0.351681) | 0.042485 / 0.043533 (-0.001048) | 0.361305 / 0.255139 (0.106166) | 0.388669 / 0.283200 (0.105469) | 0.024143 / 0.141683 (-0.117540) | 1.451508 / 1.452155 (-0.000647) | 1.490431 / 1.492716 (-0.002285) |

### Benchmark: benchmark_getitem\_100B.json

| metric | get_batch_of\_1024\_random_rows | get_batch_of\_1024\_rows | get_first_row | get_last_row |
|--------|---|---|---|---|
| new / old (diff) | 0.175976 / 0.018006 (0.157970) | 0.428923 / 0.000490 (0.428434) | 0.002099 / 0.000200 (0.001899) | 0.000068 / 0.000054 (0.000014) |

### Benchmark: benchmark_indices_mapping.json

| metric | select | shard | shuffle | sort | train_test_split |
|--------|---|---|---|---|---|
| new / old (diff) | 0.026346 / 0.037411 (-0.011065) | 0.078084 / 0.014526 (0.063558) | 0.087287 / 0.176557 (-0.089269) | 0.144179 / 0.737135 (-0.592957) | 0.088286 / 0.296338 (-0.208053) |

### Benchmark: benchmark_iterating.json

| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |
|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| new / old (diff) | 0.450436 / 0.215209 (0.235227) | 4.488801 / 2.077655 (2.411146) | 2.479303 / 1.504120 (0.975184) | 2.305396 / 1.541195 (0.764201) | 2.370370 / 1.468490 (0.901879) | 0.502355 / 4.584777 (-4.082422) | 3.094733 / 3.745712 (-0.650979) | 4.062367 / 5.269862 (-1.207495) | 2.587506 / 4.565676 (-1.978170) | 0.058245 / 0.424275 (-0.366030) | 0.006487 / 0.007607 (-0.001120) | 0.524147 / 0.226044 (0.298102) | 5.236876 / 2.268929 (2.967947) | 2.897134 / 55.444624 (-52.547490) | 2.574631 / 6.876477 (-4.301846) | 2.620307 / 2.142072 (0.478235) | 0.586963 / 4.805227 (-4.218265) | 0.125761 / 6.500664 (-6.374903) | 0.062264 / 0.075469 (-0.013205) |

### Benchmark: benchmark_map_filter.json

| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |
|--------|---|---|---|---|---|---|---|---|---|
| new / old (diff) | 1.299668 / 1.841788 (-0.542120) | 19.004441 / 8.074308 (10.930133) | 13.841867 / 10.191392 (3.650475) | 0.159674 / 0.680424 (-0.520750) | 0.016699 / 0.534201 (-0.517502) | 0.331868 / 0.579283 (-0.247415) | 0.344604 / 0.434364 (-0.089760) | 0.379391 / 0.540337 (-0.160947) | 0.514790 / 1.386936 (-0.872146) |

</details>
</details>

![](https://cml.dev/watermark.png#47a006a90e9711b33db70b0ef2d2cefaadfa2179 "CML watermark")


<details>
<summary>Show benchmarks</summary>

PyArrow==8.0.0

<details>
<summary>Show updated benchmarks!</summary>

### Benchmark: benchmark_array_xd.json

| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |
|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| new / old (diff) | 0.005792 / 0.011353 (-0.005561) | 0.003519 / 0.011008 (-0.007489) | 0.079133 / 0.038508 (0.040625) | 0.057858 / 0.023109 (0.034749) | 0.314206 / 0.275898 (0.038308) | 0.346939 / 0.323480 (0.023459) | 0.004583 / 0.007986 (-0.003403) | 0.002824 / 0.004328 (-0.001504) | 0.061652 / 0.004250 (0.057402) | 0.048520 / 0.037052 (0.011467) | 0.318018 / 0.258489 (0.059529) | 0.350350 / 0.293841 (0.056509) | 0.026284 / 0.128546 (-0.102262) | 0.007827 / 0.075646 (-0.067819) | 0.259624 / 0.419271 (-0.159647) | 0.052318 / 0.043533 (0.008786) | 0.317400 / 0.255139 (0.062261) | 0.340530 / 0.283200 (0.057331) | 0.025181 / 0.141683 (-0.116501) | 1.459208 / 1.452155 (0.007053) | 1.529158 / 1.492716 (0.036442) |

### Benchmark: benchmark_getitem\_100B.json

| metric | get_batch_of\_1024\_random_rows | get_batch_of\_1024\_rows | get_first_row | get_last_row |
|--------|---|---|---|---|
| new / old (diff) | 0.169692 / 0.018006 (0.151686) | 0.432638 / 0.000490 (0.432148) | 0.003675 / 0.000200 (0.003475) | 0.000071 / 0.000054 (0.000017) |

### Benchmark: benchmark_indices_mapping.json

| metric | select | shard | shuffle | sort | train_test_split |
|--------|---|---|---|---|---|
| new / old (diff) | 0.022956 / 0.037411 (-0.014456) | 0.071860 / 0.014526 (0.057334) | 0.082159 / 0.176557 (-0.094398) | 0.142560 / 0.737135 (-0.594576) | 0.082333 / 0.296338 (-0.214006) |

### Benchmark: benchmark_iterating.json

| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |
|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| new / old (diff) | 0.397923 / 0.215209 (0.182714) | 3.958757 / 2.077655 (1.881102) | 1.925837 / 1.504120 (0.421717) | 1.758114 / 1.541195 (0.216919) | 1.808845 / 1.468490 (0.340354) | 0.501116 / 4.584777 (-4.083661) | 3.007739 / 3.745712 (-0.737973) | 3.295755 / 5.269862 (-1.974106) | 2.123843 / 4.565676 (-2.441833) | 0.057174 / 0.424275 (-0.367101) | 0.006426 / 0.007607 (-0.001182) | 0.468196 / 0.226044 (0.242152) | 4.677392 / 2.268929 (2.408464) | 2.334179 / 55.444624 (-53.110446) | 1.989283 / 6.876477 (-4.887194) | 2.140091 / 2.142072 (-0.001981) | 0.590700 / 4.805227 (-4.214527) | 0.124066 / 6.500664 (-6.376598) | 0.059931 / 0.075469 (-0.015538) |

### Benchmark: benchmark_map_filter.json

| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |
|--------|---|---|---|---|---|---|---|---|---|
| new / old (diff) | 1.224547 / 1.841788 (-0.617240) | 17.866979 / 8.074308 (9.792671) | 13.142009 / 10.191392 (2.950617) | 0.147081 / 0.680424 (-0.533343) | 0.016777 / 0.534201 (-0.517424) | 0.327766 / 0.579283 (-0.251517) | 0.343988 / 0.434364 (-0.090376) | 0.383268 / 0.540337 (-0.157070) | 0.528109 / 1.386936 (-0.858827) |

</details>
PyArrow==latest

<details>
<summary>Show updated benchmarks!</summary>

### Benchmark: benchmark_array_xd.json

| metric | read_batch_formatted_as_numpy after write_array2d | read_batch_formatted_as_numpy after write_flattened_sequence | read_batch_formatted_as_numpy after write_nested_sequence | read_batch_unformated after write_array2d | read_batch_unformated after write_flattened_sequence | read_batch_unformated after write_nested_sequence | read_col_formatted_as_numpy after write_array2d | read_col_formatted_as_numpy after write_flattened_sequence | read_col_formatted_as_numpy after write_nested_sequence | read_col_unformated after write_array2d | read_col_unformated after write_flattened_sequence | read_col_unformated after write_nested_sequence | read_formatted_as_numpy after write_array2d | read_formatted_as_numpy after write_flattened_sequence | read_formatted_as_numpy after write_nested_sequence | read_unformated after write_array2d | read_unformated after write_flattened_sequence | read_unformated after write_nested_sequence | write_array2d | write_flattened_sequence | write_nested_sequence |
|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| new / old (diff) | 0.006145 / 0.011353 (-0.005208) | 0.003634 / 0.011008 (-0.007374) | 0.062887 / 0.038508 (0.024379) | 0.062659 / 0.023109 (0.039550) | 0.362962 / 0.275898 (0.087064) | 0.405149 / 0.323480 (0.081669) | 0.004821 / 0.007986 (-0.003164) | 0.002888 / 0.004328 (-0.001441) | 0.062982 / 0.004250 (0.058732) | 0.051929 / 0.037052 (0.014877) | 0.366825 / 0.258489 (0.108336) | 0.409830 / 0.293841 (0.115989) | 0.027263 / 0.128546 (-0.101283) | 0.007972 / 0.075646 (-0.067674) | 0.067413 / 0.419271 (-0.351858) | 0.044233 / 0.043533 (0.000700) | 0.365087 / 0.255139 (0.109948) | 0.393845 / 0.283200 (0.110646) | 0.027740 / 0.141683 (-0.113943) | 1.497896 / 1.452155 (0.045741) | 1.549419 / 1.492716 (0.056703) |

### Benchmark: benchmark_getitem\_100B.json

| metric | get_batch_of\_1024\_random_rows | get_batch_of\_1024\_rows | get_first_row | get_last_row |
|--------|---|---|---|---|
| new / old (diff) | 0.225510 / 0.018006 (0.207503) | 0.417054 / 0.000490 (0.416564) | 0.002184 / 0.000200 (0.001984) | 0.000075 / 0.000054 (0.000020) |

### Benchmark: benchmark_indices_mapping.json

| metric | select | shard | shuffle | sort | train_test_split |
|--------|---|---|---|---|---|
| new / old (diff) | 0.025503 / 0.037411 (-0.011908) | 0.076164 / 0.014526 (0.061638) | 0.086110 / 0.176557 (-0.090446) | 0.140387 / 0.737135 (-0.596748) | 0.086956 / 0.296338 (-0.209382) |

### Benchmark: benchmark_iterating.json

| metric | read 5000 | read 50000 | read_batch 50000 10 | read_batch 50000 100 | read_batch 50000 1000 | read_formatted numpy 5000 | read_formatted pandas 5000 | read_formatted tensorflow 5000 | read_formatted torch 5000 | read_formatted_batch numpy 5000 10 | read_formatted_batch numpy 5000 1000 | shuffled read 5000 | shuffled read 50000 | shuffled read_batch 50000 10 | shuffled read_batch 50000 100 | shuffled read_batch 50000 1000 | shuffled read_formatted numpy 5000 | shuffled read_formatted_batch numpy 5000 10 | shuffled read_formatted_batch numpy 5000 1000 |
|--------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| new / old (diff) | 0.469667 / 0.215209 (0.254458) | 4.689915 / 2.077655 (2.612261) | 2.685000 / 1.504120 (1.180880) | 2.516160 / 1.541195 (0.974965) | 2.531733 / 1.468490 (1.063243) | 0.501675 / 4.584777 (-4.083102) | 3.000579 / 3.745712 (-0.745133) | 2.853376 / 5.269862 (-2.416486) | 1.810677 / 4.565676 (-2.754999) | 0.057632 / 0.424275 (-0.366643) | 0.006390 / 0.007607 (-0.001217) | 0.543986 / 0.226044 (0.317941) | 5.432837 / 2.268929 (3.163908) | 3.138797 / 55.444624 (-52.305827) | 2.813141 / 6.876477 (-4.063336) | 2.803681 / 2.142072 (0.661609) | 0.588736 / 4.805227 (-4.216491) | 0.125696 / 6.500664 (-6.374968) | 0.062492 / 0.075469 (-0.012977) |

### Benchmark: benchmark_map_filter.json

| metric | filter | map fast-tokenizer batched | map identity | map identity batched | map no-op batched | map no-op batched numpy | map no-op batched pandas | map no-op batched pytorch | map no-op batched tensorflow |
|--------|---|---|---|---|---|---|---|---|---|
| new / old (diff) | 1.337163 / 1.841788 (-0.504624) | 18.611715 / 8.074308 (10.537407) | 13.953016 / 10.191392 (3.761624) | 0.154670 / 0.680424 (-0.525754) | 0.016523 / 0.534201 (-0.517678) | 0.333898 / 0.579283 (-0.245385) | 0.336520 / 0.434364 (-0.097844) | 0.389032 / 0.540337 (-0.151305) | 0.529202 / 1.386936 (-0.857734) |

</details>
</details>

![](https://cml.dev/watermark.png#01d4b3330f2cc243a3f3b0cd61ec5558466c40fd "CML watermark")