Fix CI test_convert_to_parquet
Opened by albertvillanova (closed)

Fix `test_convert_to_parquet` by patching `HfApi.preupload_lfs_files` and revert temporary fix:
- #7074

Comments:
The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_7078). 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.005262 / 0.011353 (-0.006090) | 0.003733 / 0.011008 (-0.007275) | 0.062619 / 0.038508 (0.024111) | 0.029491 / 0.023109 (0.006382) | 0.248947 / 0.275898 (-0.026951) | 0.278741 / 0.323480 (-0.044739) | 0.003173 / 0.007986 (-0.004813) | 0.002777 / 0.004328 (-0.001551) | 0.049344 / 0.004250 (0.045094) | 0.043103 / 0.037052 (0.006051) | 0.252402 / 0.258489 (-0.006087) | 0.288030 / 0.293841 (-0.005811) | 0.029425 / 0.128546 (-0.099121) | 0.012058 / 0.075646 (-0.063589) | 0.204509 / 0.419271 (-0.214762) | 0.035721 / 0.043533 (-0.007812) | 0.249121 / 0.255139 (-0.006018) | 0.272171 / 0.283200 (-0.011029) | 0.019515 / 0.141683 (-0.122168) | 1.130088 / 1.452155 (-0.322067) | 1.148856 / 1.492716 (-0.343860) |

### 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.093613 / 0.018006 (0.075607) | 0.300830 / 0.000490 (0.300340) | 0.000219 / 0.000200 (0.000019) | 0.000043 / 0.000054 (-0.000011) |

### Benchmark: benchmark_indices_mapping.json

| metric | select | shard | shuffle | sort | train_test_split |
|--------|---|---|---|---|---|
| new / old (diff) | 0.018381 / 0.037411 (-0.019030) | 0.061515 / 0.014526 (0.046989) | 0.074370 / 0.176557 (-0.102186) | 0.120751 / 0.737135 (-0.616384) | 0.074971 / 0.296338 (-0.221367) |

### 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.280499 / 0.215209 (0.065290) | 2.763114 / 2.077655 (0.685459) | 1.458696 / 1.504120 (-0.045424) | 1.331214 / 1.541195 (-0.209981) | 1.343157 / 1.468490 (-0.125333) | 0.732775 / 4.584777 (-3.852002) | 2.381485 / 3.745712 (-1.364227) | 2.930117 / 5.269862 (-2.339745) | 1.887617 / 4.565676 (-2.678059) | 0.080543 / 0.424275 (-0.343732) | 0.005136 / 0.007607 (-0.002471) | 0.336924 / 0.226044 (0.110879) | 3.343071 / 2.268929 (1.074142) | 1.823677 / 55.444624 (-53.620948) | 1.572300 / 6.876477 (-5.304176) | 1.564040 / 2.142072 (-0.578032) | 0.802369 / 4.805227 (-4.002858) | 0.135198 / 6.500664 (-6.365466) | 0.041499 / 0.075469 (-0.033970) |

### 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.961202 / 1.841788 (-0.880585) | 11.275695 / 8.074308 (3.201387) | 9.508052 / 10.191392 (-0.683340) | 0.136921 / 0.680424 (-0.543503) | 0.014055 / 0.534201 (-0.520146) | 0.300076 / 0.579283 (-0.279208) | 0.263403 / 0.434364 (-0.170961) | 0.340871 / 0.540337 (-0.199466) | 0.433452 / 1.386936 (-0.953484) |

</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.003596 / 0.011008 (-0.007412) | 0.049913 / 0.038508 (0.011405) | 0.033275 / 0.023109 (0.010166) | 0.266011 / 0.275898 (-0.009887) | 0.295182 / 0.323480 (-0.028298) | 0.004336 / 0.007986 (-0.003649) | 0.002787 / 0.004328 (-0.001541) | 0.049035 / 0.004250 (0.044784) | 0.039833 / 0.037052 (0.002781) | 0.283520 / 0.258489 (0.025031) | 0.317437 / 0.293841 (0.023596) | 0.032578 / 0.128546 (-0.095968) | 0.011744 / 0.075646 (-0.063902) | 0.060174 / 0.419271 (-0.359097) | 0.034182 / 0.043533 (-0.009351) | 0.271821 / 0.255139 (0.016682) | 0.292189 / 0.283200 (0.008989) | 0.017045 / 0.141683 (-0.124638) | 1.127742 / 1.452155 (-0.324413) | 1.180621 / 1.492716 (-0.312095) |

### 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.093798 / 0.018006 (0.075792) | 0.310715 / 0.000490 (0.310226) | 0.000213 / 0.000200 (0.000013) | 0.000046 / 0.000054 (-0.000009) |

### Benchmark: benchmark_indices_mapping.json

| metric | select | shard | shuffle | sort | train_test_split |
|--------|---|---|---|---|---|
| new / old (diff) | 0.022379 / 0.037411 (-0.015032) | 0.076823 / 0.014526 (0.062298) | 0.088086 / 0.176557 (-0.088471) | 0.128926 / 0.737135 (-0.608210) | 0.089187 / 0.296338 (-0.207151) |

### 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.293982 / 0.215209 (0.078773) | 2.930932 / 2.077655 (0.853277) | 1.576425 / 1.504120 (0.072305) | 1.445163 / 1.541195 (-0.096031) | 1.462118 / 1.468490 (-0.006372) | 0.725816 / 4.584777 (-3.858961) | 0.949767 / 3.745712 (-2.795945) | 2.832821 / 5.269862 (-2.437041) | 1.897064 / 4.565676 (-2.668612) | 0.079853 / 0.424275 (-0.344423) | 0.005352 / 0.007607 (-0.002255) | 0.344551 / 0.226044 (0.118507) | 3.442506 / 2.268929 (1.173578) | 1.938700 / 55.444624 (-53.505925) | 1.662205 / 6.876477 (-5.214272) | 1.769061 / 2.142072 (-0.373011) | 0.818089 / 4.805227 (-3.987139) | 0.134612 / 6.500664 (-6.366052) | 0.040419 / 0.075469 (-0.035050) |

### 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.032267 / 1.841788 (-0.809521) | 11.902598 / 8.074308 (3.828290) | 10.342229 / 10.191392 (0.150837) | 0.140509 / 0.680424 (-0.539915) | 0.015593 / 0.534201 (-0.518608) | 0.303326 / 0.579283 (-0.275957) | 0.127391 / 0.434364 (-0.306973) | 0.342095 / 0.540337 (-0.198243) | 0.438978 / 1.386936 (-0.947958) |

</details>
</details>

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