Skip to content

Commit

Permalink
fix openslr
Browse files Browse the repository at this point in the history
  • Loading branch information
lhoestq committed Nov 17, 2021
1 parent de4d5f9 commit 25f1806
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datasets/openslr/openslr.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ def _generate_examples(self, path_to_indexs, path_to_datas, archive_files):
for path, f in files:
if path.startswith(path_to_data):
counter += 1
audio = {"path": path, "data": f.read()}
audio = {"path": path, "bytes": f.read()}
yield counter, {"path": path, "audio": audio, "sentence": sentences[path]}
else:
for i, path_to_index in enumerate(path_to_indexs):
Expand Down

1 comment on commit 25f1806

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Show benchmarks

PyArrow==3.0.0

Show updated benchmarks!

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.070111 / 0.011353 (0.058758) 0.003861 / 0.011008 (-0.007148) 0.030979 / 0.038508 (-0.007529) 0.034956 / 0.023109 (0.011847) 0.334840 / 0.275898 (0.058942) 0.359187 / 0.323480 (0.035707) 0.081028 / 0.007986 (0.073042) 0.004133 / 0.004328 (-0.000195) 0.008864 / 0.004250 (0.004613) 0.041445 / 0.037052 (0.004393) 0.337270 / 0.258489 (0.078781) 0.362058 / 0.293841 (0.068217) 0.084735 / 0.128546 (-0.043811) 0.008700 / 0.075646 (-0.066947) 0.251466 / 0.419271 (-0.167805) 0.055670 / 0.043533 (0.012137) 0.338736 / 0.255139 (0.083597) 0.354038 / 0.283200 (0.070838) 0.084888 / 0.141683 (-0.056795) 1.740472 / 1.452155 (0.288317) 1.768606 / 1.492716 (0.275890)

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.229033 / 0.018006 (0.211027) 0.462846 / 0.000490 (0.462357) 0.002001 / 0.000200 (0.001802) 0.000112 / 0.000054 (0.000058)

Benchmark: benchmark_indices_mapping.json

metric select shard shuffle sort train_test_split
new / old (diff) 0.036243 / 0.037411 (-0.001168) 0.021980 / 0.014526 (0.007454) 0.025637 / 0.176557 (-0.150920) 0.192749 / 0.737135 (-0.544386) 0.026707 / 0.296338 (-0.269631)

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.426528 / 0.215209 (0.211318) 4.224602 / 2.077655 (2.146948) 1.810681 / 1.504120 (0.306561) 1.587115 / 1.541195 (0.045920) 1.650703 / 1.468490 (0.182213) 0.412298 / 4.584777 (-4.172479) 4.773119 / 3.745712 (1.027407) 3.385930 / 5.269862 (-1.883931) 0.867987 / 4.565676 (-3.697689) 0.049942 / 0.424275 (-0.374333) 0.011080 / 0.007607 (0.003473) 0.528794 / 0.226044 (0.302750) 5.282732 / 2.268929 (3.013804) 2.338691 / 55.444624 (-53.105933) 1.907813 / 6.876477 (-4.968663) 2.002623 / 2.142072 (-0.139450) 0.530227 / 4.805227 (-4.275000) 0.114645 / 6.500664 (-6.386019) 0.057918 / 0.075469 (-0.017551)

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.533389 / 1.841788 (-0.308399) 11.484079 / 8.074308 (3.409771) 26.580449 / 10.191392 (16.389057) 0.780581 / 0.680424 (0.100158) 0.513295 / 0.534201 (-0.020906) 0.363768 / 0.579283 (-0.215515) 0.516603 / 0.434364 (0.082239) 0.255274 / 0.540337 (-0.285063) 0.260057 / 1.386936 (-1.126879)
PyArrow==latest
Show updated benchmarks!

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.068402 / 0.011353 (0.057049) 0.003696 / 0.011008 (-0.007312) 0.029181 / 0.038508 (-0.009327) 0.032491 / 0.023109 (0.009382) 0.286820 / 0.275898 (0.010922) 0.320825 / 0.323480 (-0.002655) 0.080611 / 0.007986 (0.072625) 0.004036 / 0.004328 (-0.000292) 0.007061 / 0.004250 (0.002811) 0.035099 / 0.037052 (-0.001954) 0.286165 / 0.258489 (0.027676) 0.325147 / 0.293841 (0.031306) 0.084187 / 0.128546 (-0.044359) 0.008568 / 0.075646 (-0.067078) 0.249529 / 0.419271 (-0.169743) 0.044742 / 0.043533 (0.001209) 0.293281 / 0.255139 (0.038142) 0.315146 / 0.283200 (0.031946) 0.076423 / 0.141683 (-0.065260) 1.695400 / 1.452155 (0.243246) 1.737010 / 1.492716 (0.244293)

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.278143 / 0.018006 (0.260137) 0.420902 / 0.000490 (0.420413) 0.015269 / 0.000200 (0.015069) 0.000327 / 0.000054 (0.000272)

Benchmark: benchmark_indices_mapping.json

metric select shard shuffle sort train_test_split
new / old (diff) 0.030045 / 0.037411 (-0.007366) 0.018408 / 0.014526 (0.003882) 0.023119 / 0.176557 (-0.153437) 0.173634 / 0.737135 (-0.563501) 0.023868 / 0.296338 (-0.272471)

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.425093 / 0.215209 (0.209884) 4.280587 / 2.077655 (2.202933) 1.837726 / 1.504120 (0.333606) 1.623353 / 1.541195 (0.082158) 1.703697 / 1.468490 (0.235207) 0.424150 / 4.584777 (-4.160626) 4.775120 / 3.745712 (1.029408) 3.378349 / 5.269862 (-1.891513) 0.856922 / 4.565676 (-3.708754) 0.050495 / 0.424275 (-0.373780) 0.011231 / 0.007607 (0.003624) 0.535246 / 0.226044 (0.309202) 5.355664 / 2.268929 (3.086736) 2.285102 / 55.444624 (-53.159522) 2.300264 / 6.876477 (-4.576213) 2.001886 / 2.142072 (-0.140187) 0.548103 / 4.805227 (-4.257124) 0.115935 / 6.500664 (-6.384729) 0.055865 / 0.075469 (-0.019605)

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.537199 / 1.841788 (-0.304589) 11.587788 / 8.074308 (3.513480) 26.756543 / 10.191392 (16.565151) 0.624833 / 0.680424 (-0.055591) 0.511126 / 0.534201 (-0.023075) 0.328826 / 0.579283 (-0.250457) 0.465944 / 0.434364 (0.031580) 0.234232 / 0.540337 (-0.306105) 0.232585 / 1.386936 (-1.154351)

CML watermark

Please sign in to comment.