Bump huggingface-hub lower version to 0.21.2
State: closed

This should fix the version compatibility issue when using `huggingface_hub` < 0.21.2 and latest fsspec (>=2023.12.0).

See my comment: https://github.com/huggingface/datasets/pull/6687#issuecomment-1976493336
>> EDIT: the fix has been released in `huggingface_hub` 0.21.2 - I removed my commits that were using `huggingface_hub@main`
>
>Please note that people using `huggingface_hub` < 0.21.2 and latest `fsspec` will have issues when using `datasets`:
>- https://github.com/huggingface/lighteval/actions/runs/8139147047/job/22241658122?pr=86
>- https://github.com/huggingface/lighteval/pull/84

CC: @clefourrier 


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

@lhoestq if you agree, I could make a patch release tomorrow morning.

sure :)

<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.005086 / 0.011353 (-0.006267) | 0.003695 / 0.011008 (-0.007313) | 0.063430 / 0.038508 (0.024922) | 0.026798 / 0.023109 (0.003689) | 0.253761 / 0.275898 (-0.022138) | 0.301301 / 0.323480 (-0.022179) | 0.004160 / 0.007986 (-0.003825) | 0.002783 / 0.004328 (-0.001545) | 0.050698 / 0.004250 (0.046448) | 0.040899 / 0.037052 (0.003846) | 0.269024 / 0.258489 (0.010535) | 0.323467 / 0.293841 (0.029626) | 0.027756 / 0.128546 (-0.100791) | 0.010684 / 0.075646 (-0.064963) | 0.207128 / 0.419271 (-0.212144) | 0.035874 / 0.043533 (-0.007659) | 0.251620 / 0.255139 (-0.003519) | 0.268668 / 0.283200 (-0.014532) | 0.017387 / 0.141683 (-0.124296) | 1.139230 / 1.452155 (-0.312925) | 1.183613 / 1.492716 (-0.309103) |

### 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.096337 / 0.018006 (0.078331) | 0.305014 / 0.000490 (0.304524) | 0.000219 / 0.000200 (0.000019) | 0.000050 / 0.000054 (-0.000005) |

### Benchmark: benchmark_indices_mapping.json

| metric | select | shard | shuffle | sort | train_test_split |
|--------|---|---|---|---|---|
| new / old (diff) | 0.018086 / 0.037411 (-0.019325) | 0.061626 / 0.014526 (0.047100) | 0.072598 / 0.176557 (-0.103959) | 0.119944 / 0.737135 (-0.617192) | 0.074549 / 0.296338 (-0.221789) |

### 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.282661 / 0.215209 (0.067452) | 2.804473 / 2.077655 (0.726818) | 1.444602 / 1.504120 (-0.059517) | 1.313977 / 1.541195 (-0.227217) | 1.319426 / 1.468490 (-0.149064) | 0.570176 / 4.584777 (-4.014601) | 2.397895 / 3.745712 (-1.347818) | 2.760208 / 5.269862 (-2.509654) | 1.732457 / 4.565676 (-2.833220) | 0.062743 / 0.424275 (-0.361533) | 0.004950 / 0.007607 (-0.002657) | 0.338500 / 0.226044 (0.112456) | 3.287249 / 2.268929 (1.018320) | 1.777495 / 55.444624 (-53.667130) | 1.521255 / 6.876477 (-5.355222) | 1.517317 / 2.142072 (-0.624756) | 0.642202 / 4.805227 (-4.163025) | 0.116501 / 6.500664 (-6.384163) | 0.042418 / 0.075469 (-0.033052) |

### 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.968966 / 1.841788 (-0.872822) | 11.490531 / 8.074308 (3.416223) | 9.507803 / 10.191392 (-0.683589) | 0.141570 / 0.680424 (-0.538854) | 0.014000 / 0.534201 (-0.520201) | 0.284237 / 0.579283 (-0.295046) | 0.269341 / 0.434364 (-0.165022) | 0.321654 / 0.540337 (-0.218683) | 0.446914 / 1.386936 (-0.940022) |

</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.005280 / 0.011353 (-0.006072) | 0.003794 / 0.011008 (-0.007214) | 0.050328 / 0.038508 (0.011820) | 0.029756 / 0.023109 (0.006647) | 0.273403 / 0.275898 (-0.002495) | 0.297346 / 0.323480 (-0.026133) | 0.004310 / 0.007986 (-0.003676) | 0.002858 / 0.004328 (-0.001470) | 0.048833 / 0.004250 (0.044583) | 0.045696 / 0.037052 (0.008644) | 0.291034 / 0.258489 (0.032545) | 0.318899 / 0.293841 (0.025058) | 0.029809 / 0.128546 (-0.098737) | 0.010710 / 0.075646 (-0.064936) | 0.058183 / 0.419271 (-0.361089) | 0.051761 / 0.043533 (0.008228) | 0.275022 / 0.255139 (0.019883) | 0.291614 / 0.283200 (0.008414) | 0.017975 / 0.141683 (-0.123708) | 1.148489 / 1.452155 (-0.303666) | 1.218111 / 1.492716 (-0.274605) |

### 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.091806 / 0.018006 (0.073799) | 0.299413 / 0.000490 (0.298923) | 0.000219 / 0.000200 (0.000019) | 0.000044 / 0.000054 (-0.000010) |

### Benchmark: benchmark_indices_mapping.json

| metric | select | shard | shuffle | sort | train_test_split |
|--------|---|---|---|---|---|
| new / old (diff) | 0.021506 / 0.037411 (-0.015905) | 0.075537 / 0.014526 (0.061011) | 0.087020 / 0.176557 (-0.089536) | 0.125270 / 0.737135 (-0.611865) | 0.088038 / 0.296338 (-0.208300) |

### 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.300401 / 0.215209 (0.085192) | 2.932571 / 2.077655 (0.854916) | 1.609502 / 1.504120 (0.105383) | 1.480078 / 1.541195 (-0.061117) | 1.514902 / 1.468490 (0.046412) | 0.575591 / 4.584777 (-4.009186) | 2.461873 / 3.745712 (-1.283839) | 2.728099 / 5.269862 (-2.541762) | 1.760054 / 4.565676 (-2.805622) | 0.064371 / 0.424275 (-0.359904) | 0.004990 / 0.007607 (-0.002617) | 0.350134 / 0.226044 (0.124090) | 3.453249 / 2.268929 (1.184321) | 1.979760 / 55.444624 (-53.464865) | 1.741128 / 6.876477 (-5.135348) | 1.825734 / 2.142072 (-0.316339) | 0.654902 / 4.805227 (-4.150325) | 0.116989 / 6.500664 (-6.383676) | 0.040800 / 0.075469 (-0.034669) |

### 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.033352 / 1.841788 (-0.808436) | 12.196711 / 8.074308 (4.122403) | 10.315114 / 10.191392 (0.123722) | 0.132541 / 0.680424 (-0.547882) | 0.016455 / 0.534201 (-0.517746) | 0.289025 / 0.579283 (-0.290258) | 0.281464 / 0.434364 (-0.152900) | 0.325302 / 0.540337 (-0.215036) | 0.428469 / 1.386936 (-0.958467) |

</details>
</details>

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