Skip to content

Commit

Permalink
TEST-modin-project#2670: use CpuCount when Npartitions isn't defined
Browse files Browse the repository at this point in the history
Signed-off-by: Anatoly Myachev <[email protected]>
  • Loading branch information
anmyachev committed Feb 3, 2021
1 parent 76ca8c8 commit 20caca7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions asv_bench/benchmarks/benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,15 @@
random_columns,
random_booleans,
)
from modin.config import NPartitions

try:
from modin.config import NPartitions

NPARTITIONS = NPartitions.get()
except ImportError:
from modin.config import CpuCount

NPARTITIONS = CpuCount.get()

try:
from modin.config import TestDatasetSize, AsvImplementation
Expand All @@ -40,7 +48,7 @@
# The same benchmarking code can be run for different versions of Modin, so in
# case of an error importing important variables, we'll just use predefined values
ASV_USE_IMPL = "modin"
ASV_DATASET_SIZE = "Big" if NPartitions.get() >= 32 else "Small"
ASV_DATASET_SIZE = "Big" if NPARTITIONS >= 32 else "Small"

BINARY_OP_DATA_SIZE = {
"Big": [
Expand Down

0 comments on commit 20caca7

Please sign in to comment.