Skip to content

Commit

Permalink
Merge branch 'master' into add_item2
Browse files Browse the repository at this point in the history
  • Loading branch information
lhoestq committed Apr 27, 2021
2 parents f834767 + 909c58f commit d93bc76
Show file tree
Hide file tree
Showing 269 changed files with 2,928 additions and 445 deletions.
5 changes: 3 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- run: source venv/bin/activate
- run: pip install .[tests]
- run: pip install -r additional-tests-requirements.txt --no-deps
- run: pip install pyarrow --upgrade
- run: pip install pyarrow==3.0.0
- run: HF_SCRIPTS_VERSION=master python -m pytest -sv ./tests/

run_dataset_script_tests_pyarrow_1:
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
- run: "& venv/Scripts/activate.ps1"
- run: pip install .[tests]
- run: pip install -r additional-tests-requirements.txt --no-deps
- run: pip install pyarrow --upgrade
- run: pip install pyarrow==3.0.0
- run: $env:HF_SCRIPTS_VERSION="master"
- run: python -m pytest -sv ./tests/

Expand Down Expand Up @@ -81,6 +81,7 @@ jobs:
- run: black --check --line-length 119 --target-version py36 tests src benchmarks datasets metrics
- run: isort --check-only tests src benchmarks datasets metrics
- run: flake8 tests src benchmarks datasets metrics
- run: ./scripts/datasets_metadata_validator.py

build_doc:
working_directory: ~/datasets
Expand Down
1 change: 1 addition & 0 deletions .circleci/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ deploy_doc "master" master

# Example of how to deploy a doc on a certain commit (the commit doesn't have to be on the master branch).
# The following commit would live on huggingface.co/docs/datasets/v1.0.0
deploy_doc "e8fc41f" v1.6.1
deploy_doc "40bb9e6" v1.6.0
deploy_doc "f256b77" v1.5.0
deploy_doc "ca41320" v1.4.1
Expand Down
2 changes: 1 addition & 1 deletion datasets/afrikaans_ner_corpus/afrikaans_ner_corpus.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def __init__(self, **kwargs):


class AfrikaansNerCorpus(datasets.GeneratorBasedBuilder):
""" Afrikaans Ner dataset"""
"""Afrikaans Ner dataset"""

BUILDER_CONFIGS = [
AfrikaansNerCorpusConfig(
Expand Down
2 changes: 1 addition & 1 deletion datasets/air_dialogue/air_dialogue.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def _split_generators(self, dl_manager):
]

def _generate_examples(self, filepath, split):
""" Yields examples. """
"""Yields examples."""
# TODO: This method will receive as arguments the `gen_kwargs` defined in the previous `_split_generators` method.
# It is in charge of opening the given file and yielding (key, example) tuples from the dataset
# The key is not important, it's more here for legacy reason (legacy from tfds)
Expand Down
2 changes: 1 addition & 1 deletion datasets/allegro_reviews/allegro_reviews.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def _split_generators(self, dl_manager):
]

def _generate_examples(self, filepath, split):
""" Yields examples. """
"""Yields examples."""
with open(filepath, encoding="utf-8") as f:
reader = csv.DictReader(f, delimiter="\t", quoting=csv.QUOTE_NONE)
for id_, row in enumerate(reader):
Expand Down
2 changes: 1 addition & 1 deletion datasets/amazon_polarity/amazon_polarity.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def _split_generators(self, dl_manager):
]

def _generate_examples(self, filepath, split):
""" Yields examples. """
"""Yields examples."""

with open(filepath, encoding="utf-8") as f:
data = csv.reader(f, delimiter=",", quoting=csv.QUOTE_ALL)
Expand Down
2 changes: 1 addition & 1 deletion datasets/aqua_rat/aqua_rat.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def _split_generators(self, dl_manager):
]

def _generate_examples(self, filepath, split):
""" Yields examples. """
"""Yields examples."""
with open(filepath, encoding="utf-8") as f:
for id_, row in enumerate(f):
data = json.loads(row)
Expand Down
2 changes: 1 addition & 1 deletion datasets/aquamuse/aquamuse.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def _split_generators(self, dl_manager):
]

def _generate_examples(self, filepath, split):
""" Yields examples. """
"""Yields examples."""
filepath = [join(filepath, f) for f in listdir(filepath) if isfile(join(filepath, f))]
filepath = sorted(filepath)
raw_dataset = tf.data.TFRecordDataset(filepath)
Expand Down
2 changes: 1 addition & 1 deletion datasets/ar_cov19/ar_cov19.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def _split_generators(self, dl_manager):
return [datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"data_dir": data_dir})]

def _generate_examples(self, data_dir):
""" Yields examples. """
"""Yields examples."""
# TODO: This method will receive as arguments the `gen_kwargs` defined in the previous `_split_generators` method.
# It is in charge of opening the given file and yielding (key, example) tuples from the dataset
# The key is not important, it's more here for legacy reason (legacy from tfds)
Expand Down
2 changes: 1 addition & 1 deletion datasets/arabic_billion_words/arabic_billion_words.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def _clean_text(self, text):
return text.replace("?", "")

def _generate_examples(self, filepath):
""" Yields examples. """
"""Yields examples."""
current_multi_line = ""
_idx = 0
data_tag = self.config.name
Expand Down
4 changes: 2 additions & 2 deletions datasets/arabic_pos_dialect/arabic_pos_dialect.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@


class ArabicPosDialectConfig(datasets.BuilderConfig):
""" BuilderConfig for ArabicPosDialect"""
"""BuilderConfig for ArabicPosDialect"""

def __init__(self, dialect=None, **kwargs):
"""
Expand Down Expand Up @@ -112,7 +112,7 @@ def _split_generators(self, dl_manager):
]

def _generate_examples(self, filepath):
""" Yields examples in the raw (text) form. """
"""Yields examples in the raw (text) form."""
with open(filepath, encoding="utf-8") as csv_file:
reader = csv.DictReader(csv_file, delimiter="\t", quoting=csv.QUOTE_NONE)
fold = -1
Expand Down
2 changes: 1 addition & 1 deletion datasets/arsentd_lev/arsentd_lev.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@


class ArsentdLev(datasets.GeneratorBasedBuilder):
""""ArSenTD-Lev Dataset"""
""" "ArSenTD-Lev Dataset"""

VERSION = datasets.Version("1.1.0")

Expand Down
2 changes: 1 addition & 1 deletion datasets/arxiv_dataset/arxiv_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def _split_generators(self, dl_manager):
return [datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"path": path_to_manual_file})]

def _generate_examples(self, path=None, title_set=None):
""" Yields examples. """
"""Yields examples."""
with open(path, encoding="utf8") as f:
for i, entry in enumerate(f):
data = dict(json.loads(entry))
Expand Down
2 changes: 1 addition & 1 deletion datasets/aslg_pc12/aslg_pc12.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def _split_generators(self, dl_manager):
]

def _generate_examples(self, gloss_path, text_path):
""" Yields examples. """
"""Yields examples."""

gloss_f = open(gloss_path, "r", encoding="utf-8")
text_f = open(text_path, "r", encoding="utf-8")
Expand Down
2 changes: 1 addition & 1 deletion datasets/asset/asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def _split_generators(self, dl_manager):
]

def _generate_examples(self, filepaths, split):
""" Yields examples. """
"""Yields examples."""
if self.config.name == "simplification":
files = [open(filepaths[f"asset.{split}.orig"], encoding="utf-8")] + [
open(filepaths[f"asset.{split}.simp.{i}"], encoding="utf-8") for i in range(10)
Expand Down
2 changes: 1 addition & 1 deletion datasets/assin/assin.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def _split_generators(self, dl_manager):
]

def _generate_examples(self, filepaths, split):
""" Yields examples. """
"""Yields examples."""

id_ = 0

Expand Down
2 changes: 1 addition & 1 deletion datasets/assin2/assin2.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def _split_generators(self, dl_manager):
]

def _generate_examples(self, filepath, split):
""" Yields examples. """
"""Yields examples."""

id_ = 0

Expand Down
2 changes: 1 addition & 1 deletion datasets/atomic/atomic.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def _split_generators(self, dl_manager):
]

def _generate_examples(self, filepath, split):
""" Yields examples from the Atomic dataset. """
"""Yields examples from the Atomic dataset."""

with open(filepath, encoding="utf-8") as f:
for id_, row in enumerate(f):
Expand Down
4 changes: 2 additions & 2 deletions datasets/autshumato/autshumato.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@


class AutshumatoConfig(datasets.BuilderConfig):
""" BuilderConfig for NewDataset"""
"""BuilderConfig for NewDataset"""

def __init__(self, langs, zip_file, **kwargs):
"""
Expand Down Expand Up @@ -206,7 +206,7 @@ def _split_generators_translation(self, dl_manager):
]

def _generate_examples(self, source_files, target_files, split):
""" Yields examples. """
"""Yields examples."""
if len(self.config.langs) == 2:
return self._generate_examples_translation(source_files, target_files, split)
elif len(self.config.langs) == 1:
Expand Down
2 changes: 1 addition & 1 deletion datasets/banking77/banking77.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def _split_generators(self, dl_manager):
]

def _generate_examples(self, filepath):
""" Yields examples as (key, example) tuples. """
"""Yields examples as (key, example) tuples."""
with open(filepath, encoding="utf-8") as f:
csv_reader = csv.reader(f, quotechar='"', delimiter=",", quoting=csv.QUOTE_ALL, skipinitialspace=True)
# call next to skip header
Expand Down
2 changes: 1 addition & 1 deletion datasets/bbc_hindi_nli/bbc_hindi_nli.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def _split_generators(self, dl_manager):
]

def _generate_examples(self, filepath):
""" Yields examples. """
"""Yields examples."""

with open(filepath, encoding="utf-8") as tsv_file:
tsv_reader = csv.reader(tsv_file, delimiter="\t")
Expand Down
2 changes: 1 addition & 1 deletion datasets/bprec/bprec.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def _split_generators(self, dl_manager):
]

def _generate_examples(self, filedirs, split="tele"):
""" Yields examples. """
"""Yields examples."""
# TODO: This method will receive as arguments the `gen_kwargs` defined in the previous `_split_generators` method.
# It is in charge of opening the given file and yielding (key, example) tuples from the dataset
# The key is not important, it's more here for legacy reason (legacy from tfds)
Expand Down
2 changes: 1 addition & 1 deletion datasets/brwac/brwac.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def _split_generators(self, dl_manager):
]

def _generate_examples(self, filepath, split):
""" Yields examples. """
"""Yields examples."""

with open(filepath, encoding="utf-8") as f:

Expand Down
4 changes: 2 additions & 2 deletions datasets/bsd_ja_en/bsd_ja_en.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@


class BsdJaEn(datasets.GeneratorBasedBuilder):
"""Japanese-English Business Scene Dialogue (BSD) dataset. """
"""Japanese-English Business Scene Dialogue (BSD) dataset."""

VERSION = datasets.Version("1.0.0")

Expand Down Expand Up @@ -131,7 +131,7 @@ def _split_generators(self, dl_manager):
]

def _generate_examples(self, filepath, split):
""" Yields examples. """
"""Yields examples."""

with open(filepath, encoding="utf-8") as f:
data = json.load(f)
Expand Down
4 changes: 2 additions & 2 deletions datasets/c3/c3.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@


class C3Config(datasets.BuilderConfig):
""" BuilderConfig for NewDataset"""
"""BuilderConfig for NewDataset"""

def __init__(self, type_, **kwargs):
"""
Expand Down Expand Up @@ -138,7 +138,7 @@ def _split_generators(self, dl_manager):
]

def _generate_examples(self, filename, split):
""" Yields examples. """
"""Yields examples."""
with open(filename, "r", encoding="utf-8") as sf:
data = json.load(sf)
for id_, (documents, questions, document_id) in enumerate(data):
Expand Down
2 changes: 1 addition & 1 deletion datasets/caner/caner.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def _split_generators(self, dl_manager):
]

def _generate_examples(self, filepath, split):
""" Yields examples. """
"""Yields examples."""

with open(filepath, encoding="utf-8") as csv_file:
reader = csv.reader(csv_file, delimiter=",")
Expand Down
2 changes: 1 addition & 1 deletion datasets/cbt/cbt.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def _split_generators(self, dl_manager):
def _generate_examples(
self, filepath # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
):
""" Yields examples as (key, example) tuples. """
"""Yields examples as (key, example) tuples."""
# This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
# The `key` is here for legacy reason (tfds) and is not important in itself.

Expand Down
2 changes: 1 addition & 1 deletion datasets/ccaligned_multilingual/ccaligned_multilingual.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def _split_generators(self, dl_manager):
]

def _generate_examples(self, filepath, from_english=False):
""" Yields examples. """
"""Yields examples."""
lc = self.config.language_code
reverse = lc in reverse_mapped_sentences
with open(filepath, encoding="utf-8") as f:
Expand Down
2 changes: 1 addition & 1 deletion datasets/cdsc/cdsc.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def _split_generators(self, dl_manager):
]

def _generate_examples(self, filepath, split):
""" Yields examples. """
"""Yields examples."""
with open(filepath, encoding="utf-8") as f:
reader = csv.DictReader(f, delimiter="\t", quoting=csv.QUOTE_NONE)
for id_, row in enumerate(reader):
Expand Down
2 changes: 1 addition & 1 deletion datasets/cdt/cdt.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def _split_generators(self, dl_manager):
]

def _generate_examples(self, filepath, split):
""" Yields examples. """
"""Yields examples."""
with open(filepath, encoding="utf-8") as f:
reader = csv.DictReader(f, delimiter="\t", quoting=csv.QUOTE_NONE)
for id_, row in enumerate(reader):
Expand Down
2 changes: 1 addition & 1 deletion datasets/clickbait_news_bg/clickbait_news_bg.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def _split_generators(self, dl_manager):
]

def _generate_examples(self, filepath, split):
""" Yields examples. """
"""Yields examples."""
keys = [
"fake_news_score",
"click_bait_score",
Expand Down
2 changes: 1 addition & 1 deletion datasets/climate_fever/climate_fever.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def _split_generators(self, dl_manager):
]

def _generate_examples(self, filepath, split):
""" Yields examples. """
"""Yields examples."""
with open(filepath, encoding="utf-8") as f:
for id_, row in enumerate(f):
doc = json.loads(row)
Expand Down
2 changes: 1 addition & 1 deletion datasets/coached_conv_pref/coached_conv_pref.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def _split_generators(self, dl_manager):
]

def _generate_examples(self, filepath, split):
""" Yields examples. """
"""Yields examples."""

# Empty Segment list with annotations dictionary
# First prompt of a conversation does not contain the segment dictionary
Expand Down
2 changes: 1 addition & 1 deletion datasets/code_search_net/code_search_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@


class CodeSearchNet(datasets.GeneratorBasedBuilder):
""""CodeSearchNet corpus: proxy dataset for semantic code search."""
""" "CodeSearchNet corpus: proxy dataset for semantic code search."""

VERSION = datasets.Version("1.0.0", "Add CodeSearchNet corpus dataset")
BUILDER_CONFIGS = [
Expand Down
2 changes: 1 addition & 1 deletion datasets/common_voice/common_voice.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ def _split_generators(self, dl_manager):
]

def _generate_examples(self, filepath, path_to_clips):
""" Yields examples. """
"""Yields examples."""
data_fields = list(self._info().features.keys())
path_idx = data_fields.index("path")

Expand Down
2 changes: 1 addition & 1 deletion datasets/compguesswhat/compguesswhat.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


class CompguesswhatConfig(datasets.BuilderConfig):
""" BuilderConfig for CompGuessWhat?!"""
"""BuilderConfig for CompGuessWhat?!"""

def __init__(self, data_url, splits, gameplay_scenario, **kwargs):
"""
Expand Down
2 changes: 1 addition & 1 deletion datasets/conceptnet5/conceptnet5.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def _split_generators(self, dl_manager):
]

def _generate_examples(self, filepath, split):
""" Yields examples from the conceptnet5 graph if the config is 'conceptnet5', otherwise yields the sentences for omcs. """
"""Yields examples from the conceptnet5 graph if the config is 'conceptnet5', otherwise yields the sentences for omcs."""

with open(filepath, "rb") as f:
for id_, row in enumerate(f):
Expand Down
2 changes: 1 addition & 1 deletion datasets/cord19/cord19.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def _split_generators(self, dl_manager):
]

def _generate_examples(self, filepath, split):
""" Yields examples. """
"""Yields examples."""

metadata_filepath = filepath["metadata"]

Expand Down
Loading

1 comment on commit d93bc76

@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==1.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.021622 / 0.011353 (0.010269) 0.015321 / 0.011008 (0.004313) 0.051922 / 0.038508 (0.013414) 0.040442 / 0.023109 (0.017332) 0.347329 / 0.275898 (0.071431) 0.364161 / 0.323480 (0.040681) 0.010763 / 0.007986 (0.002777) 0.004761 / 0.004328 (0.000432) 0.012775 / 0.004250 (0.008525) 0.051991 / 0.037052 (0.014939) 0.343607 / 0.258489 (0.085118) 0.376649 / 0.293841 (0.082808) 0.151284 / 0.128546 (0.022737) 0.116948 / 0.075646 (0.041302) 0.431733 / 0.419271 (0.012462) 0.390267 / 0.043533 (0.346734) 0.341459 / 0.255139 (0.086320) 0.347615 / 0.283200 (0.064415) 1.536845 / 0.141683 (1.395162) 1.828867 / 1.452155 (0.376712) 1.849931 / 1.492716 (0.357215)

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.005922 / 0.018006 (-0.012085) 0.000510 / 0.000490 (0.000021) 0.000185 / 0.000200 (-0.000015) 0.000048 / 0.000054 (-0.000007)

Benchmark: benchmark_indices_mapping.json

metric select shard shuffle sort train_test_split
new / old (diff) 0.046130 / 0.037411 (0.008719) 0.022746 / 0.014526 (0.008220) 0.030060 / 0.176557 (-0.146497) 0.053706 / 0.737135 (-0.683430) 0.030431 / 0.296338 (-0.265908)

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.389394 / 0.215209 (0.174185) 3.976949 / 2.077655 (1.899295) 2.161953 / 1.504120 (0.657833) 2.000292 / 1.541195 (0.459098) 2.019339 / 1.468490 (0.550849) 6.703728 / 4.584777 (2.118951) 5.983091 / 3.745712 (2.237379) 8.555531 / 5.269862 (3.285669) 7.419470 / 4.565676 (2.853794) 0.677247 / 0.424275 (0.252972) 0.011905 / 0.007607 (0.004298) 0.528703 / 0.226044 (0.302658) 5.379914 / 2.268929 (3.110985) 2.792306 / 55.444624 (-52.652319) 2.383555 / 6.876477 (-4.492922) 2.276879 / 2.142072 (0.134806) 6.845389 / 4.805227 (2.040161) 3.773110 / 6.500664 (-2.727554) 6.407706 / 0.075469 (6.332236)

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) 9.996840 / 1.841788 (8.155052) 13.133721 / 8.074308 (5.059413) 28.282241 / 10.191392 (18.090849) 0.835173 / 0.680424 (0.154750) 0.584922 / 0.534201 (0.050721) 0.751204 / 0.579283 (0.171921) 0.573799 / 0.434364 (0.139435) 0.665540 / 0.540337 (0.125203) 1.428110 / 1.386936 (0.041174)
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.022443 / 0.011353 (0.011090) 0.016252 / 0.011008 (0.005244) 0.058435 / 0.038508 (0.019927) 0.040611 / 0.023109 (0.017502) 0.336274 / 0.275898 (0.060376) 0.358299 / 0.323480 (0.034819) 0.012146 / 0.007986 (0.004161) 0.004700 / 0.004328 (0.000372) 0.015446 / 0.004250 (0.011196) 0.064327 / 0.037052 (0.027275) 0.341741 / 0.258489 (0.083252) 0.395650 / 0.293841 (0.101809) 0.154481 / 0.128546 (0.025935) 0.114876 / 0.075646 (0.039229) 0.444684 / 0.419271 (0.025412) 0.417719 / 0.043533 (0.374186) 0.370613 / 0.255139 (0.115474) 0.386113 / 0.283200 (0.102913) 1.579327 / 0.141683 (1.437644) 1.909627 / 1.452155 (0.457473) 1.951554 / 1.492716 (0.458837)

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.006282 / 0.018006 (-0.011725) 0.000386 / 0.000490 (-0.000103) 0.000168 / 0.000200 (-0.000032) 0.000040 / 0.000054 (-0.000015)

Benchmark: benchmark_indices_mapping.json

metric select shard shuffle sort train_test_split
new / old (diff) 0.040312 / 0.037411 (0.002900) 0.021213 / 0.014526 (0.006687) 0.030371 / 0.176557 (-0.146185) 0.052322 / 0.737135 (-0.684813) 0.028694 / 0.296338 (-0.267645)

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.447297 / 0.215209 (0.232088) 4.186948 / 2.077655 (2.109293) 1.988206 / 1.504120 (0.484086) 1.723884 / 1.541195 (0.182690) 1.821423 / 1.468490 (0.352933) 6.694562 / 4.584777 (2.109785) 6.056178 / 3.745712 (2.310466) 8.451270 / 5.269862 (3.181409) 7.194381 / 4.565676 (2.628705) 0.685583 / 0.424275 (0.261308) 0.010513 / 0.007607 (0.002906) 0.518007 / 0.226044 (0.291963) 5.264349 / 2.268929 (2.995420) 2.511626 / 55.444624 (-52.932999) 2.146985 / 6.876477 (-4.729491) 2.143325 / 2.142072 (0.001253) 6.697004 / 4.805227 (1.891777) 4.082467 / 6.500664 (-2.418197) 7.943819 / 0.075469 (7.868350)

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) 10.503748 / 1.841788 (8.661960) 13.371891 / 8.074308 (5.297583) 28.441390 / 10.191392 (18.249998) 0.913963 / 0.680424 (0.233540) 0.594829 / 0.534201 (0.060628) 0.755456 / 0.579283 (0.176173) 0.581949 / 0.434364 (0.147585) 0.690802 / 0.540337 (0.150465) 1.535115 / 1.386936 (0.148179)

CML watermark

Please sign in to comment.