Title: Ignore `dataset_info.json` in data files resolution
Author: mariosasko (COLLABORATOR)
State: closed
Created: 2023-09-07T14:43:51Z

`save_to_disk` creates this file, but also [`HugginFaceDatasetSever`](https://github.com/gradio-app/gradio/blob/26fef8c7f85a006c7e25cdbed1792df19c512d02/gradio/flagging.py#L214), so this is needed to avoid issues such as [this one](https://discord.com/channels/879548962464493619/1149295819938349107/1149295819938349107).

Comments:
_The documentation is not available anymore as the PR was closed or merged._

<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.009450 / 0.011353 (-0.001903) | 0.007339 / 0.011008 (-0.003669) | 0.110150 / 0.038508 (0.071641) | 0.087794 / 0.023109 (0.064685) | 0.472099 / 0.275898 (0.196201) | 0.476622 / 0.323480 (0.153142) | 0.005057 / 0.007986 (-0.002929) | 0.005262 / 0.004328 (0.000933) | 0.103059 / 0.004250 (0.098808) | 0.069815 / 0.037052 (0.032763) | 0.489377 / 0.258489 (0.230888) | 0.547087 / 0.293841 (0.253247) | 0.048883 / 0.128546 (-0.079663) | 0.019192 / 0.075646 (-0.056454) | 0.410865 / 0.419271 (-0.008407) | 0.076215 / 0.043533 (0.032682) | 0.484825 / 0.255139 (0.229686) | 0.519035 / 0.283200 (0.235835) | 0.042030 / 0.141683 (-0.099653) | 1.909630 / 1.452155 (0.457475) | 2.120869 / 1.492716 (0.628153) |

### 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.267600 / 0.018006 (0.249594) | 0.619135 / 0.000490 (0.618645) | 0.005897 / 0.000200 (0.005697) | 0.000142 / 0.000054 (0.000087) |

### Benchmark: benchmark_indices_mapping.json

| metric | select | shard | shuffle | sort | train_test_split |
|--------|---|---|---|---|---|
| new / old (diff) | 0.033265 / 0.037411 (-0.004146) | 0.104476 / 0.014526 (0.089950) | 0.129199 / 0.176557 (-0.047358) | 0.196898 / 0.737135 (-0.540238) | 0.118852 / 0.296338 (-0.177487) |

### 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.598908 / 0.215209 (0.383699) | 6.263096 / 2.077655 (4.185441) | 2.672134 / 1.504120 (1.168014) | 2.428706 / 1.541195 (0.887511) | 2.431651 / 1.468490 (0.963161) | 0.918465 / 4.584777 (-3.666312) | 5.667857 / 3.745712 (1.922145) | 5.113696 / 5.269862 (-0.156166) | 3.276805 / 4.565676 (-1.288872) | 0.101829 / 0.424275 (-0.322446) | 0.010224 / 0.007607 (0.002617) | 0.741547 / 0.226044 (0.515502) | 7.517002 / 2.268929 (5.248073) | 3.546353 / 55.444624 (-51.898272) | 2.845956 / 6.876477 (-4.030521) | 3.172777 / 2.142072 (1.030705) | 1.153485 / 4.805227 (-3.651742) | 0.225758 / 6.500664 (-6.274906) | 0.084333 / 0.075469 (0.008864) |

### 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.704645 / 1.841788 (-0.137143) | 27.044110 / 8.074308 (18.969801) | 24.653837 / 10.191392 (14.462445) | 0.235452 / 0.680424 (-0.444971) | 0.029285 / 0.534201 (-0.504916) | 0.576122 / 0.579283 (-0.003161) | 0.626263 / 0.434364 (0.191899) | 0.600201 / 0.540337 (0.059864) | 0.838406 / 1.386936 (-0.548530) |

</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.013754 / 0.011353 (0.002401) | 0.005954 / 0.011008 (-0.005054) | 0.089766 / 0.038508 (0.051258) | 0.096126 / 0.023109 (0.073017) | 0.556455 / 0.275898 (0.280557) | 0.579302 / 0.323480 (0.255822) | 0.009222 / 0.007986 (0.001236) | 0.006128 / 0.004328 (0.001800) | 0.099725 / 0.004250 (0.095475) | 0.075642 / 0.037052 (0.038589) | 0.556645 / 0.258489 (0.298156) | 0.615898 / 0.293841 (0.322057) | 0.057728 / 0.128546 (-0.070818) | 0.016746 / 0.075646 (-0.058900) | 0.098053 / 0.419271 (-0.321219) | 0.066676 / 0.043533 (0.023143) | 0.534156 / 0.255139 (0.279017) | 0.590020 / 0.283200 (0.306820) | 0.038782 / 0.141683 (-0.102901) | 1.952301 / 1.452155 (0.500146) | 2.104255 / 1.492716 (0.611539) |

### 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.305945 / 0.018006 (0.287939) | 0.643915 / 0.000490 (0.643426) | 0.006268 / 0.000200 (0.006068) | 0.000156 / 0.000054 (0.000102) |

### Benchmark: benchmark_indices_mapping.json

| metric | select | shard | shuffle | sort | train_test_split |
|--------|---|---|---|---|---|
| new / old (diff) | 0.039891 / 0.037411 (0.002479) | 0.117888 / 0.014526 (0.103363) | 0.134230 / 0.176557 (-0.042326) | 0.212544 / 0.737135 (-0.524591) | 0.128858 / 0.296338 (-0.167480) |

### 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.718165 / 0.215209 (0.502955) | 7.023867 / 2.077655 (4.946212) | 3.391344 / 1.504120 (1.887224) | 3.021248 / 1.541195 (1.480053) | 3.010217 / 1.468490 (1.541727) | 0.932608 / 4.584777 (-3.652169) | 5.787536 / 3.745712 (2.041824) | 5.221305 / 5.269862 (-0.048557) | 3.282552 / 4.565676 (-1.283125) | 0.105486 / 0.424275 (-0.318789) | 0.009800 / 0.007607 (0.002193) | 0.839358 / 0.226044 (0.613314) | 8.279712 / 2.268929 (6.010784) | 4.118466 / 55.444624 (-51.326158) | 3.407738 / 6.876477 (-3.468739) | 3.632538 / 2.142072 (1.490466) | 1.109673 / 4.805227 (-3.695555) | 0.216541 / 6.500664 (-6.284123) | 0.094031 / 0.075469 (0.018562) |

### 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.983979 / 1.841788 (0.142191) | 27.125882 / 8.074308 (19.051573) | 24.714002 / 10.191392 (14.522610) | 0.264417 / 0.680424 (-0.416007) | 0.034783 / 0.534201 (-0.499418) | 0.533304 / 0.579283 (-0.045979) | 0.647798 / 0.434364 (0.213434) | 0.588680 / 0.540337 (0.048343) | 0.854250 / 1.386936 (-0.532686) |

</details>
</details>

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


<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.006664 / 0.011353 (-0.004689) | 0.004164 / 0.011008 (-0.006844) | 0.085192 / 0.038508 (0.046684) | 0.073578 / 0.023109 (0.050469) | 0.356379 / 0.275898 (0.080481) | 0.389381 / 0.323480 (0.065902) | 0.005527 / 0.007986 (-0.002459) | 0.003488 / 0.004328 (-0.000840) | 0.065640 / 0.004250 (0.061390) | 0.055013 / 0.037052 (0.017960) | 0.358002 / 0.258489 (0.099513) | 0.400663 / 0.293841 (0.106822) | 0.030937 / 0.128546 (-0.097609) | 0.008838 / 0.075646 (-0.066808) | 0.287488 / 0.419271 (-0.131784) | 0.051503 / 0.043533 (0.007971) | 0.353945 / 0.255139 (0.098806) | 0.388778 / 0.283200 (0.105579) | 0.023346 / 0.141683 (-0.118337) | 1.479621 / 1.452155 (0.027466) | 1.559164 / 1.492716 (0.066448) |

### 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.245160 / 0.018006 (0.227154) | 0.561890 / 0.000490 (0.561400) | 0.004339 / 0.000200 (0.004139) | 0.000083 / 0.000054 (0.000028) |

### Benchmark: benchmark_indices_mapping.json

| metric | select | shard | shuffle | sort | train_test_split |
|--------|---|---|---|---|---|
| new / old (diff) | 0.028460 / 0.037411 (-0.008952) | 0.082046 / 0.014526 (0.067520) | 0.098005 / 0.176557 (-0.078552) | 0.154171 / 0.737135 (-0.582965) | 0.097632 / 0.296338 (-0.198707) |

### 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.389993 / 0.215209 (0.174784) | 3.893287 / 2.077655 (1.815632) | 1.885668 / 1.504120 (0.381549) | 1.715055 / 1.541195 (0.173860) | 1.778008 / 1.468490 (0.309518) | 0.482818 / 4.584777 (-4.101959) | 3.572153 / 3.745712 (-0.173559) | 3.267666 / 5.269862 (-2.002196) | 2.088394 / 4.565676 (-2.477282) | 0.056961 / 0.424275 (-0.367314) | 0.007784 / 0.007607 (0.000177) | 0.466586 / 0.226044 (0.240542) | 4.652505 / 2.268929 (2.383576) | 2.491392 / 55.444624 (-52.953233) | 2.127600 / 6.876477 (-4.748877) | 2.296778 / 2.142072 (0.154705) | 0.582332 / 4.805227 (-4.222895) | 0.134372 / 6.500664 (-6.366292) | 0.061737 / 0.075469 (-0.013732) |

### 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.253647 / 1.841788 (-0.588140) | 19.802353 / 8.074308 (11.728045) | 14.262815 / 10.191392 (4.071423) | 0.169489 / 0.680424 (-0.510935) | 0.018108 / 0.534201 (-0.516093) | 0.391711 / 0.579283 (-0.187572) | 0.406169 / 0.434364 (-0.028195) | 0.456728 / 0.540337 (-0.083609) | 0.633538 / 1.386936 (-0.753398) |

</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.006661 / 0.011353 (-0.004692) | 0.004181 / 0.011008 (-0.006827) | 0.064945 / 0.038508 (0.026437) | 0.073965 / 0.023109 (0.050856) | 0.406549 / 0.275898 (0.130651) | 0.441568 / 0.323480 (0.118089) | 0.005579 / 0.007986 (-0.002407) | 0.003523 / 0.004328 (-0.000805) | 0.065270 / 0.004250 (0.061019) | 0.055596 / 0.037052 (0.018544) | 0.407701 / 0.258489 (0.149212) | 0.444609 / 0.293841 (0.150768) | 0.031749 / 0.128546 (-0.096797) | 0.008680 / 0.075646 (-0.066966) | 0.071154 / 0.419271 (-0.348117) | 0.047376 / 0.043533 (0.003843) | 0.406409 / 0.255139 (0.151270) | 0.420477 / 0.283200 (0.137278) | 0.023707 / 0.141683 (-0.117976) | 1.484516 / 1.452155 (0.032361) | 1.568493 / 1.492716 (0.075777) |

### 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.266534 / 0.018006 (0.248528) | 0.573806 / 0.000490 (0.573316) | 0.006247 / 0.000200 (0.006048) | 0.000165 / 0.000054 (0.000110) |

### Benchmark: benchmark_indices_mapping.json

| metric | select | shard | shuffle | sort | train_test_split |
|--------|---|---|---|---|---|
| new / old (diff) | 0.033436 / 0.037411 (-0.003976) | 0.091947 / 0.014526 (0.077421) | 0.105556 / 0.176557 (-0.071000) | 0.162094 / 0.737135 (-0.575041) | 0.107879 / 0.296338 (-0.188459) |

### 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.429126 / 0.215209 (0.213917) | 4.281329 / 2.077655 (2.203675) | 2.295406 / 1.504120 (0.791286) | 2.123336 / 1.541195 (0.582141) | 2.190804 / 1.468490 (0.722314) | 0.492972 / 4.584777 (-4.091805) | 3.638485 / 3.745712 (-0.107227) | 3.304576 / 5.269862 (-1.965285) | 2.063694 / 4.565676 (-2.501983) | 0.058549 / 0.424275 (-0.365726) | 0.007591 / 0.007607 (-0.000016) | 0.504268 / 0.226044 (0.278223) | 5.031990 / 2.268929 (2.763061) | 2.773173 / 55.444624 (-52.671451) | 2.430789 / 6.876477 (-4.445688) | 2.699900 / 2.142072 (0.557828) | 0.593220 / 4.805227 (-4.212007) | 0.133710 / 6.500664 (-6.366954) | 0.059840 / 0.075469 (-0.015629) |

### 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.351158 / 1.841788 (-0.490629) | 20.176310 / 8.074308 (12.102002) | 14.933202 / 10.191392 (4.741810) | 0.169920 / 0.680424 (-0.510503) | 0.020156 / 0.534201 (-0.514045) | 0.397440 / 0.579283 (-0.181843) | 0.409395 / 0.434364 (-0.024969) | 0.471066 / 0.540337 (-0.069271) | 0.642670 / 1.386936 (-0.744266) |

</details>
</details>

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