Expand no-code dataset info with datasets-server info
Opened by mariosasko (closed)

E.g., to have info about a dataset's number of examples for more informative TQDM bars.

Comments:
The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_6714). 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.005237 / 0.011353 (-0.006116) | 0.003614 / 0.011008 (-0.007394) | 0.063349 / 0.038508 (0.024841) | 0.027297 / 0.023109 (0.004187) | 0.236203 / 0.275898 (-0.039695) | 0.260029 / 0.323480 (-0.063451) | 0.003096 / 0.007986 (-0.004889) | 0.003342 / 0.004328 (-0.000987) | 0.048703 / 0.004250 (0.044453) | 0.043121 / 0.037052 (0.006069) | 0.257491 / 0.258489 (-0.000998) | 0.282861 / 0.293841 (-0.010980) | 0.027701 / 0.128546 (-0.100845) | 0.010634 / 0.075646 (-0.065012) | 0.207369 / 0.419271 (-0.211903) | 0.035799 / 0.043533 (-0.007734) | 0.240445 / 0.255139 (-0.014694) | 0.261977 / 0.283200 (-0.021223) | 0.018175 / 0.141683 (-0.123508) | 1.143964 / 1.452155 (-0.308191) | 1.230057 / 1.492716 (-0.262659) |

### 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.096656 / 0.018006 (0.078650) | 0.303434 / 0.000490 (0.302944) | 0.000225 / 0.000200 (0.000025) | 0.000051 / 0.000054 (-0.000004) |

### Benchmark: benchmark_indices_mapping.json

| metric | select | shard | shuffle | sort | train_test_split |
|--------|---|---|---|---|---|
| new / old (diff) | 0.018454 / 0.037411 (-0.018957) | 0.061792 / 0.014526 (0.047266) | 0.073384 / 0.176557 (-0.103172) | 0.120148 / 0.737135 (-0.616988) | 0.074221 / 0.296338 (-0.222118) |

### 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.290291 / 0.215209 (0.075082) | 2.822908 / 2.077655 (0.745254) | 1.483139 / 1.504120 (-0.020981) | 1.349619 / 1.541195 (-0.191576) | 1.356588 / 1.468490 (-0.111902) | 0.571723 / 4.584777 (-4.013054) | 2.402696 / 3.745712 (-1.343016) | 2.832215 / 5.269862 (-2.437647) | 1.794962 / 4.565676 (-2.770714) | 0.062707 / 0.424275 (-0.361568) | 0.004997 / 0.007607 (-0.002610) | 0.343093 / 0.226044 (0.117049) | 3.383028 / 2.268929 (1.114100) | 1.818624 / 55.444624 (-53.626000) | 1.549859 / 6.876477 (-5.326618) | 1.667838 / 2.142072 (-0.474235) | 0.648574 / 4.805227 (-4.156653) | 0.119181 / 6.500664 (-6.381484) | 0.042074 / 0.075469 (-0.033395) |

### 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.982039 / 1.841788 (-0.859748) | 11.411759 / 8.074308 (3.337451) | 9.783405 / 10.191392 (-0.407987) | 0.129577 / 0.680424 (-0.550847) | 0.014091 / 0.534201 (-0.520110) | 0.297925 / 0.579283 (-0.281358) | 0.263884 / 0.434364 (-0.170480) | 0.346032 / 0.540337 (-0.194305) | 0.444806 / 1.386936 (-0.942130) |

</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.005527 / 0.011353 (-0.005826) | 0.003677 / 0.011008 (-0.007332) | 0.050245 / 0.038508 (0.011737) | 0.030070 / 0.023109 (0.006961) | 0.272640 / 0.275898 (-0.003258) | 0.296555 / 0.323480 (-0.026925) | 0.004247 / 0.007986 (-0.003738) | 0.003833 / 0.004328 (-0.000495) | 0.049341 / 0.004250 (0.045091) | 0.046604 / 0.037052 (0.009552) | 0.282765 / 0.258489 (0.024276) | 0.314924 / 0.293841 (0.021084) | 0.029749 / 0.128546 (-0.098797) | 0.010524 / 0.075646 (-0.065122) | 0.057859 / 0.419271 (-0.361412) | 0.053172 / 0.043533 (0.009640) | 0.274906 / 0.255139 (0.019767) | 0.290566 / 0.283200 (0.007366) | 0.019299 / 0.141683 (-0.122384) | 1.164092 / 1.452155 (-0.288062) | 1.205074 / 1.492716 (-0.287642) |

### 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.093943 / 0.018006 (0.075936) | 0.298746 / 0.000490 (0.298256) | 0.000232 / 0.000200 (0.000032) | 0.000054 / 0.000054 (-0.000000) |

### Benchmark: benchmark_indices_mapping.json

| metric | select | shard | shuffle | sort | train_test_split |
|--------|---|---|---|---|---|
| new / old (diff) | 0.022098 / 0.037411 (-0.015313) | 0.075523 / 0.014526 (0.060997) | 0.086784 / 0.176557 (-0.089773) | 0.124610 / 0.737135 (-0.612525) | 0.087743 / 0.296338 (-0.208595) |

### 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.298555 / 0.215209 (0.083346) | 2.951493 / 2.077655 (0.873838) | 1.611448 / 1.504120 (0.107328) | 1.481503 / 1.541195 (-0.059692) | 1.497937 / 1.468490 (0.029447) | 0.580402 / 4.584777 (-4.004375) | 2.433308 / 3.745712 (-1.312404) | 2.712717 / 5.269862 (-2.557145) | 1.766286 / 4.565676 (-2.799391) | 0.063973 / 0.424275 (-0.360303) | 0.005006 / 0.007607 (-0.002601) | 0.354541 / 0.226044 (0.128497) | 3.486448 / 2.268929 (1.217519) | 1.972779 / 55.444624 (-53.471846) | 1.709018 / 6.876477 (-5.167458) | 1.864242 / 2.142072 (-0.277831) | 0.678213 / 4.805227 (-4.127014) | 0.119525 / 6.500664 (-6.381140) | 0.041387 / 0.075469 (-0.034082) |

### 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.021337 / 1.841788 (-0.820451) | 12.049563 / 8.074308 (3.975255) | 10.424701 / 10.191392 (0.233309) | 0.131444 / 0.680424 (-0.548980) | 0.015644 / 0.534201 (-0.518557) | 0.293712 / 0.579283 (-0.285571) | 0.279160 / 0.434364 (-0.155204) | 0.327991 / 0.540337 (-0.212346) | 0.435455 / 1.386936 (-0.951481) |

</details>
</details>

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