Skip to content

Commit

Permalink
fix require_beam
Browse files Browse the repository at this point in the history
  • Loading branch information
lhoestq committed Nov 7, 2022
1 parent f117919 commit d7c9422
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ def parse_flag_from_env(key, default=False):
)

# Beam
require_beam = pytest.mark.skipif(not config.BEAM_AVAILABLE, reason="test requires apache-beam")
require_beam = pytest.mark.skipif(
not config.BEAM_AVAILABLE or config.DILL_VERSION.release >= version.parse("0.3.6"),
reason="test requires apache-beam and a compatible dill version",
)


def require_faiss(test_case):
Expand Down

3 comments on commit d7c9422

@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==6.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.009647 / 0.011353 (-0.001706) 0.005503 / 0.011008 (-0.005506) 0.097355 / 0.038508 (0.058847) 0.037980 / 0.023109 (0.014871) 0.304613 / 0.275898 (0.028715) 0.367242 / 0.323480 (0.043763) 0.008316 / 0.007986 (0.000330) 0.005492 / 0.004328 (0.001164) 0.074238 / 0.004250 (0.069987) 0.047837 / 0.037052 (0.010784) 0.310259 / 0.258489 (0.051770) 0.345829 / 0.293841 (0.051988) 0.043660 / 0.128546 (-0.084886) 0.015301 / 0.075646 (-0.060345) 0.335504 / 0.419271 (-0.083768) 0.051433 / 0.043533 (0.007900) 0.301478 / 0.255139 (0.046339) 0.318972 / 0.283200 (0.035773) 0.110955 / 0.141683 (-0.030728) 1.426701 / 1.452155 (-0.025454) 1.530238 / 1.492716 (0.037522)

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.227970 / 0.018006 (0.209964) 0.571858 / 0.000490 (0.571368) 0.002239 / 0.000200 (0.002039) 0.000087 / 0.000054 (0.000032)

Benchmark: benchmark_indices_mapping.json

metric select shard shuffle sort train_test_split
new / old (diff) 0.027794 / 0.037411 (-0.009617) 0.107057 / 0.014526 (0.092531) 0.121022 / 0.176557 (-0.055535) 0.165146 / 0.737135 (-0.571989) 0.123620 / 0.296338 (-0.172719)

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.399864 / 0.215209 (0.184655) 3.997091 / 2.077655 (1.919436) 1.799711 / 1.504120 (0.295591) 1.599687 / 1.541195 (0.058493) 1.755402 / 1.468490 (0.286912) 0.707199 / 4.584777 (-3.877578) 3.867940 / 3.745712 (0.122228) 3.349196 / 5.269862 (-1.920666) 1.802642 / 4.565676 (-2.763034) 0.085769 / 0.424275 (-0.338506) 0.011894 / 0.007607 (0.004287) 0.523058 / 0.226044 (0.297014) 5.110970 / 2.268929 (2.842041) 2.269266 / 55.444624 (-53.175358) 1.938488 / 6.876477 (-4.937988) 2.146747 / 2.142072 (0.004675) 0.857409 / 4.805227 (-3.947818) 0.166893 / 6.500664 (-6.333771) 0.061784 / 0.075469 (-0.013685)

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.446179 / 1.841788 (-0.395609) 13.944260 / 8.074308 (5.869952) 25.304283 / 10.191392 (15.112891) 0.841132 / 0.680424 (0.160708) 0.535379 / 0.534201 (0.001178) 0.436373 / 0.579283 (-0.142910) 0.432487 / 0.434364 (-0.001877) 0.272659 / 0.540337 (-0.267679) 0.275752 / 1.386936 (-1.111184)
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.007657 / 0.011353 (-0.003695) 0.005186 / 0.011008 (-0.005822) 0.096073 / 0.038508 (0.057565) 0.033947 / 0.023109 (0.010838) 0.347909 / 0.275898 (0.072011) 0.423581 / 0.323480 (0.100101) 0.006719 / 0.007986 (-0.001267) 0.005409 / 0.004328 (0.001081) 0.071950 / 0.004250 (0.067700) 0.043884 / 0.037052 (0.006832) 0.374792 / 0.258489 (0.116303) 0.388256 / 0.293841 (0.094415) 0.036716 / 0.128546 (-0.091831) 0.012233 / 0.075646 (-0.063413) 0.327825 / 0.419271 (-0.091446) 0.047377 / 0.043533 (0.003844) 0.345046 / 0.255139 (0.089907) 0.373706 / 0.283200 (0.090507) 0.107645 / 0.141683 (-0.034038) 1.493467 / 1.452155 (0.041312) 1.490588 / 1.492716 (-0.002128)

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.243395 / 0.018006 (0.225389) 0.566319 / 0.000490 (0.565830) 0.001044 / 0.000200 (0.000844) 0.000080 / 0.000054 (0.000026)

Benchmark: benchmark_indices_mapping.json

metric select shard shuffle sort train_test_split
new / old (diff) 0.030542 / 0.037411 (-0.006869) 0.113181 / 0.014526 (0.098655) 0.124279 / 0.176557 (-0.052278) 0.165715 / 0.737135 (-0.571421) 0.129306 / 0.296338 (-0.167032)

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.418966 / 0.215209 (0.203757) 4.168266 / 2.077655 (2.090611) 1.968046 / 1.504120 (0.463926) 1.775459 / 1.541195 (0.234264) 1.849667 / 1.468490 (0.381177) 0.713575 / 4.584777 (-3.871202) 3.834871 / 3.745712 (0.089159) 2.112491 / 5.269862 (-3.157370) 1.338990 / 4.565676 (-3.226686) 0.085057 / 0.424275 (-0.339218) 0.012212 / 0.007607 (0.004605) 0.522027 / 0.226044 (0.295982) 5.194883 / 2.268929 (2.925955) 2.501690 / 55.444624 (-52.942934) 2.207996 / 6.876477 (-4.668481) 2.334250 / 2.142072 (0.192177) 0.846743 / 4.805227 (-3.958484) 0.171668 / 6.500664 (-6.328996) 0.066194 / 0.075469 (-0.009275)

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.515022 / 1.841788 (-0.326766) 14.438882 / 8.074308 (6.364574) 12.503820 / 10.191392 (2.312428) 0.900983 / 0.680424 (0.220559) 0.582129 / 0.534201 (0.047928) 0.416839 / 0.579283 (-0.162444) 0.418684 / 0.434364 (-0.015680) 0.251793 / 0.540337 (-0.288544) 0.262957 / 1.386936 (-1.123979)

@albertvillanova
Copy link
Member

Choose a reason for hiding this comment

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

@lhoestq, maybe we should implement some security mechanism to prevent us from inadvertently pushing directly to the main branch?

Anyway, the maximum compatible dill version with apache-beam is <0.3.2 (not <0.3.6).

See my PR to fix this:

@lhoestq
Copy link
Member Author

@lhoestq lhoestq commented on d7c9422 Nov 8, 2022

Choose a reason for hiding this comment

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

Maybe we can protect the main branch indeed. And unprotect temporarily for releases or something like that

Please sign in to comment.