Title: fix tests
State: closed


Comments:
The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_6523). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

<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.005160 / 0.011353 (-0.006192) | 0.003962 / 0.011008 (-0.007046) | 0.064952 / 0.038508 (0.026444) | 0.053291 / 0.023109 (0.030182) | 0.237182 / 0.275898 (-0.038716) | 0.263855 / 0.323480 (-0.059625) | 0.004157 / 0.007986 (-0.003829) | 0.002901 / 0.004328 (-0.001428) | 0.050679 / 0.004250 (0.046428) | 0.044885 / 0.037052 (0.007832) | 0.243806 / 0.258489 (-0.014683) | 0.273828 / 0.293841 (-0.020013) | 0.028681 / 0.128546 (-0.099866) | 0.011086 / 0.075646 (-0.064560) | 0.211987 / 0.419271 (-0.207285) | 0.035881 / 0.043533 (-0.007652) | 0.249618 / 0.255139 (-0.005521) | 0.262880 / 0.283200 (-0.020319) | 0.017788 / 0.141683 (-0.123895) | 1.209060 / 1.452155 (-0.243094) | 1.272143 / 1.492716 (-0.220574) |

### 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.004594 / 0.018006 (-0.013412) | 0.305188 / 0.000490 (0.304698) | 0.000213 / 0.000200 (0.000013) | 0.000052 / 0.000054 (-0.000002) |

### Benchmark: benchmark_indices_mapping.json

| metric | select | shard | shuffle | sort | train_test_split |
|--------|---|---|---|---|---|
| new / old (diff) | 0.019526 / 0.037411 (-0.017886) | 0.062280 / 0.014526 (0.047754) | 0.074983 / 0.176557 (-0.101573) | 0.123466 / 0.737135 (-0.613670) | 0.076240 / 0.296338 (-0.220099) |

### 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.276001 / 0.215209 (0.060792) | 2.689614 / 2.077655 (0.611959) | 1.441092 / 1.504120 (-0.063028) | 1.319775 / 1.541195 (-0.221419) | 1.386904 / 1.468490 (-0.081587) | 0.561388 / 4.584777 (-4.023389) | 2.386718 / 3.745712 (-1.358994) | 2.813959 / 5.269862 (-2.455903) | 1.727447 / 4.565676 (-2.838230) | 0.061965 / 0.424275 (-0.362310) | 0.004977 / 0.007607 (-0.002630) | 0.335077 / 0.226044 (0.109032) | 3.313860 / 2.268929 (1.044932) | 1.814018 / 55.444624 (-53.630606) | 1.542840 / 6.876477 (-5.333637) | 1.586887 / 2.142072 (-0.555185) | 0.643225 / 4.805227 (-4.162002) | 0.117834 / 6.500664 (-6.382830) | 0.044024 / 0.075469 (-0.031445) |

### 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) | 0.952804 / 1.841788 (-0.888984) | 12.447378 / 8.074308 (4.373070) | 11.281734 / 10.191392 (1.090342) | 0.143407 / 0.680424 (-0.537017) | 0.014749 / 0.534201 (-0.519452) | 0.289298 / 0.579283 (-0.289985) | 0.268217 / 0.434364 (-0.166146) | 0.327995 / 0.540337 (-0.212343) | 0.430302 / 1.386936 (-0.956634) |

</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.005683 / 0.011353 (-0.005670) | 0.003813 / 0.011008 (-0.007195) | 0.048943 / 0.038508 (0.010435) | 0.060730 / 0.023109 (0.037621) | 0.266925 / 0.275898 (-0.008973) | 0.292553 / 0.323480 (-0.030927) | 0.004236 / 0.007986 (-0.003750) | 0.002790 / 0.004328 (-0.001538) | 0.048962 / 0.004250 (0.044711) | 0.040354 / 0.037052 (0.003302) | 0.266353 / 0.258489 (0.007864) | 0.298397 / 0.293841 (0.004556) | 0.029977 / 0.128546 (-0.098570) | 0.010788 / 0.075646 (-0.064858) | 0.057529 / 0.419271 (-0.361743) | 0.032896 / 0.043533 (-0.010636) | 0.266696 / 0.255139 (0.011557) | 0.283422 / 0.283200 (0.000223) | 0.020939 / 0.141683 (-0.120744) | 1.169867 / 1.452155 (-0.282287) | 1.213586 / 1.492716 (-0.279130) |

### 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.097035 / 0.018006 (0.079029) | 0.306968 / 0.000490 (0.306478) | 0.000234 / 0.000200 (0.000034) | 0.000046 / 0.000054 (-0.000008) |

### Benchmark: benchmark_indices_mapping.json

| metric | select | shard | shuffle | sort | train_test_split |
|--------|---|---|---|---|---|
| new / old (diff) | 0.023343 / 0.037411 (-0.014068) | 0.078238 / 0.014526 (0.063712) | 0.091083 / 0.176557 (-0.085474) | 0.131487 / 0.737135 (-0.605649) | 0.092614 / 0.296338 (-0.203724) |

### 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.294454 / 0.215209 (0.079245) | 2.881053 / 2.077655 (0.803398) | 1.623934 / 1.504120 (0.119814) | 1.509001 / 1.541195 (-0.032194) | 1.567541 / 1.468490 (0.099051) | 0.574326 / 4.584777 (-4.010451) | 2.476826 / 3.745712 (-1.268886) | 2.826183 / 5.269862 (-2.443678) | 1.771949 / 4.565676 (-2.793727) | 0.063663 / 0.424275 (-0.360613) | 0.005039 / 0.007607 (-0.002568) | 0.354861 / 0.226044 (0.128816) | 3.397655 / 2.268929 (1.128727) | 1.961958 / 55.444624 (-53.482666) | 1.694795 / 6.876477 (-5.181682) | 1.719459 / 2.142072 (-0.422614) | 0.654512 / 4.805227 (-4.150715) | 0.119285 / 6.500664 (-6.381379) | 0.042146 / 0.075469 (-0.033323) |

### 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) | 0.982187 / 1.841788 (-0.859601) | 12.944627 / 8.074308 (4.870319) | 11.370381 / 10.191392 (1.178989) | 0.142759 / 0.680424 (-0.537665) | 0.016319 / 0.534201 (-0.517882) | 0.291339 / 0.579283 (-0.287944) | 0.276842 / 0.434364 (-0.157522) | 0.324285 / 0.540337 (-0.216052) | 0.426234 / 1.386936 (-0.960702) |

</details>
</details>

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