Title: Support standalone yaml
Author: lhoestq (MEMBER)
State: closed
Created: 2024-01-03T16:47:35Z

see (internal) https://huggingface.slack.com/archives/C02V51Q3800/p1703885853581679

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

@lhoestq 
hello
I think it should be defined in config.py
DATASET_ README_ FILENAME="README. md"
This can replace all "README. md"


Thanks for the feedback :) merging now

<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.004890 / 0.011353 (-0.006463) | 0.003535 / 0.011008 (-0.007473) | 0.062894 / 0.038508 (0.024386) | 0.029133 / 0.023109 (0.006024) | 0.242387 / 0.275898 (-0.033511) | 0.262720 / 0.323480 (-0.060760) | 0.002880 / 0.007986 (-0.005106) | 0.002674 / 0.004328 (-0.001655) | 0.048932 / 0.004250 (0.044682) | 0.041669 / 0.037052 (0.004617) | 0.255922 / 0.258489 (-0.002567) | 0.282106 / 0.293841 (-0.011734) | 0.028137 / 0.128546 (-0.100409) | 0.010620 / 0.075646 (-0.065026) | 0.207799 / 0.419271 (-0.211473) | 0.035499 / 0.043533 (-0.008034) | 0.246158 / 0.255139 (-0.008981) | 0.262671 / 0.283200 (-0.020528) | 0.017297 / 0.141683 (-0.124386) | 1.118681 / 1.452155 (-0.333474) | 1.156732 / 1.492716 (-0.335985) |

### 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.091670 / 0.018006 (0.073664) | 0.300327 / 0.000490 (0.299837) | 0.000212 / 0.000200 (0.000012) | 0.000042 / 0.000054 (-0.000012) |

### Benchmark: benchmark_indices_mapping.json

| metric | select | shard | shuffle | sort | train_test_split |
|--------|---|---|---|---|---|
| new / old (diff) | 0.018080 / 0.037411 (-0.019332) | 0.060357 / 0.014526 (0.045831) | 0.072221 / 0.176557 (-0.104336) | 0.119281 / 0.737135 (-0.617855) | 0.073861 / 0.296338 (-0.222477) |

### 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.289848 / 0.215209 (0.074639) | 2.845203 / 2.077655 (0.767549) | 1.531271 / 1.504120 (0.027152) | 1.366110 / 1.541195 (-0.175085) | 1.395041 / 1.468490 (-0.073449) | 0.563353 / 4.584777 (-4.021424) | 2.389074 / 3.745712 (-1.356638) | 2.752960 / 5.269862 (-2.516901) | 1.715508 / 4.565676 (-2.850168) | 0.063063 / 0.424275 (-0.361212) | 0.004967 / 0.007607 (-0.002640) | 0.340757 / 0.226044 (0.114713) | 3.387667 / 2.268929 (1.118739) | 1.845182 / 55.444624 (-53.599442) | 1.569616 / 6.876477 (-5.306861) | 1.571393 / 2.142072 (-0.570679) | 0.643455 / 4.805227 (-4.161772) | 0.116919 / 6.500664 (-6.383745) | 0.042551 / 0.075469 (-0.032918) |

### 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.943761 / 1.841788 (-0.898027) | 11.481068 / 8.074308 (3.406760) | 10.422180 / 10.191392 (0.230788) | 0.132015 / 0.680424 (-0.548408) | 0.013932 / 0.534201 (-0.520268) | 0.288340 / 0.579283 (-0.290943) | 0.263695 / 0.434364 (-0.170669) | 0.324459 / 0.540337 (-0.215878) | 0.415204 / 1.386936 (-0.971732) |

</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.005042 / 0.011353 (-0.006310) | 0.003465 / 0.011008 (-0.007543) | 0.050107 / 0.038508 (0.011599) | 0.029542 / 0.023109 (0.006433) | 0.273645 / 0.275898 (-0.002253) | 0.293661 / 0.323480 (-0.029818) | 0.004099 / 0.007986 (-0.003887) | 0.002667 / 0.004328 (-0.001661) | 0.048281 / 0.004250 (0.044030) | 0.044406 / 0.037052 (0.007353) | 0.284245 / 0.258489 (0.025756) | 0.312303 / 0.293841 (0.018462) | 0.030057 / 0.128546 (-0.098489) | 0.010675 / 0.075646 (-0.064971) | 0.058404 / 0.419271 (-0.360868) | 0.051874 / 0.043533 (0.008342) | 0.273308 / 0.255139 (0.018169) | 0.289356 / 0.283200 (0.006157) | 0.018628 / 0.141683 (-0.123055) | 1.148764 / 1.452155 (-0.303391) | 1.194181 / 1.492716 (-0.298535) |

### 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.091383 / 0.018006 (0.073376) | 0.300221 / 0.000490 (0.299731) | 0.000232 / 0.000200 (0.000032) | 0.000044 / 0.000054 (-0.000011) |

### Benchmark: benchmark_indices_mapping.json

| metric | select | shard | shuffle | sort | train_test_split |
|--------|---|---|---|---|---|
| new / old (diff) | 0.021814 / 0.037411 (-0.015597) | 0.076420 / 0.014526 (0.061894) | 0.087404 / 0.176557 (-0.089152) | 0.126184 / 0.737135 (-0.610951) | 0.089738 / 0.296338 (-0.206600) |

### 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.299839 / 0.215209 (0.084630) | 2.929260 / 2.077655 (0.851605) | 1.608327 / 1.504120 (0.104207) | 1.479757 / 1.541195 (-0.061437) | 1.494768 / 1.468490 (0.026278) | 0.563873 / 4.584777 (-4.020904) | 2.434442 / 3.745712 (-1.311270) | 2.641384 / 5.269862 (-2.628478) | 1.724222 / 4.565676 (-2.841454) | 0.062125 / 0.424275 (-0.362150) | 0.004994 / 0.007607 (-0.002613) | 0.350895 / 0.226044 (0.124851) | 3.448550 / 2.268929 (1.179621) | 1.928910 / 55.444624 (-53.515714) | 1.669887 / 6.876477 (-5.206590) | 1.781304 / 2.142072 (-0.360768) | 0.649301 / 4.805227 (-4.155926) | 0.116255 / 6.500664 (-6.384409) | 0.040947 / 0.075469 (-0.034522) |

### 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.977537 / 1.841788 (-0.864251) | 12.119913 / 8.074308 (4.045605) | 10.874078 / 10.191392 (0.682686) | 0.130174 / 0.680424 (-0.550250) | 0.016176 / 0.534201 (-0.518025) | 0.287967 / 0.579283 (-0.291316) | 0.280591 / 0.434364 (-0.153773) | 0.324332 / 0.540337 (-0.216005) | 0.419479 / 1.386936 (-0.967457) |

</details>
</details>

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