Skip to content

Commit bd60284

Browse files
authored
FEAT-#2553: add ability to run microbenchmarks for old Modin version (#2554)
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
1 parent ee39d17 commit bd60284

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

asv_bench/benchmarks/benchmarks.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,20 @@
2121
import numpy as np
2222
import pandas
2323

24-
from modin.config import TestDatasetSize, AsvImplementation
2524
from .utils import generate_dataframe, RAND_LOW, RAND_HIGH, random_string
2625

27-
ASV_USE_IMPL = AsvImplementation.get()
26+
try:
27+
from modin.config import TestDatasetSize, AsvImplementation
2828

29-
if TestDatasetSize.get() == "Big":
29+
ASV_USE_IMPL = AsvImplementation.get()
30+
ASV_DATASET_SIZE = TestDatasetSize.get()
31+
except ImportError:
32+
# The same benchmarking code can be run for different versions of Modin, so in
33+
# case of an error importing important variables, we'll just use predefined values
34+
ASV_USE_IMPL = "modin"
35+
ASV_DATASET_SIZE = "Big" if pd.DEFAULT_NPARTITIONS >= 32 else "Small"
36+
37+
if ASV_DATASET_SIZE == "Big":
3038
BINARY_OP_DATA_SIZE = [
3139
(5000, 5000, 5000, 5000),
3240
# the case extremely inefficient

0 commit comments

Comments
 (0)