Skip to content

Commit d1d2130

Browse files
authored
TEST-modin-project#7191: Fix ASV after changing default branch (modin-project#7190)
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
1 parent 6d64e08 commit d1d2130

File tree

6 files changed

+30
-22
lines changed

6 files changed

+30
-22
lines changed

.github/workflows/ci.yml

+9-14
Original file line numberDiff line numberDiff line change
@@ -228,41 +228,36 @@ jobs:
228228
miniforge-variant: Mambaforge
229229
miniforge-version: latest
230230
use-mamba: true
231-
- name: ASV installation
232-
run: pip install asv==0.5.1
233231
- name: Running benchmarks
234232
run: |
235233
git remote add upstream https://github.com/modin-project/modin.git
236234
git fetch upstream
237-
if git diff upstream/master --name-only | grep -q "^asv_bench/"; then
238-
# ASV correctly creates environments for testing only from the branch
239-
# with `master` name
240-
git checkout -b master
235+
if git diff upstream/main --name-only | grep -q "^asv_bench/"; then
241236
cd asv_bench
242-
asv check -v
237+
238+
mamba env create -f ../environment-dev.yml
239+
conda activate modin
240+
pip install ..
243241
244242
asv machine --yes
245243
246244
# check Modin on Ray
247-
asv run --quick --strict --show-stderr --launch-method=spawn \
245+
asv run --quick --dry-run --python=same --strict --show-stderr --launch-method=spawn \
248246
-b ^benchmarks -b ^io -b ^scalability | tee benchmarks.log
249247
250248
# check pure pandas
251-
MODIN_ASV_USE_IMPL=pandas asv run --quick --strict --show-stderr --launch-method=spawn \
249+
MODIN_ASV_USE_IMPL=pandas asv run --quick --dry-run --python=same --strict --show-stderr --launch-method=spawn \
252250
-b ^benchmarks -b ^io | tee benchmarks.log
253251
254-
# Otherwise, ASV considers that the environment has already been created, although ASV command is run for another config,
255-
# which requires the creation of a completely new environment. This step will be required after removing the manual environment setup step.
256-
rm -f -R .asv/env/
257-
258252
# TODO: Remove manual environment creation after fix https://github.com/airspeed-velocity/asv/issues/1310
253+
conda deactivate
259254
mamba env create -f ../requirements/env_hdk.yml
260255
conda activate modin_on_hdk
261256
pip install asv==0.5.1
262257
pip install ..
263258
264259
# check Modin on HDK
265-
MODIN_ENGINE=native MODIN_STORAGE_FORMAT=hdk MODIN_EXPERIMENTAL=true asv run --quick --strict --show-stderr \
260+
MODIN_ENGINE=native MODIN_STORAGE_FORMAT=hdk MODIN_EXPERIMENTAL=true asv run --quick --dry-run --python=same --strict --show-stderr \
266261
--launch-method=forkserver --python=same --config asv.conf.hdk.json \
267262
-b ^hdk | tee benchmarks.log
268263
else

asv_bench/asv.conf.dask.json

+4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
// project being benchmarked
1414
"repo": "..",
1515

16+
// List of branches to benchmark. If not provided, defaults to "master"
17+
// (for git) or "default" (for mercurial).
18+
"branches": ["main"],
19+
1620
// Customizable commands for building, installing, and
1721
// uninstalling the project. See asv.conf.json documentation.
1822
"install_command": ["in-dir={env_dir} python -mpip install {wheel_file}[dask]"],

asv_bench/asv.conf.hdk.json

+4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
// project being benchmarked
1414
"repo": "..",
1515

16+
// List of branches to benchmark. If not provided, defaults to "master"
17+
// (for git) or "default" (for mercurial).
18+
"branches": ["main"],
19+
1620
// Customizable commands for building, installing, and
1721
// uninstalling the project. See asv.conf.json documentation.
1822
//

asv_bench/asv.conf.json

+4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
// project being benchmarked
1414
"repo": "..",
1515

16+
// List of branches to benchmark. If not provided, defaults to "master"
17+
// (for git) or "default" (for mercurial).
18+
"branches": ["main"],
19+
1620
// Customizable commands for building, installing, and
1721
// uninstalling the project. See asv.conf.json documentation.
1822
"install_command": ["in-dir={env_dir} python -mpip install {wheel_file}[ray]"],

asv_bench/asv.conf.unidist.json

+4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
// project being benchmarked
1414
"repo": "..",
1515

16+
// List of branches to benchmark. If not provided, defaults to "master"
17+
// (for git) or "default" (for mercurial).
18+
"branches": ["main"],
19+
1620
// Customizable commands for building, installing, and
1721
// uninstalling the project. See asv.conf.json documentation.
1822
"install_command": ["in-dir={env_dir} python -mpip install {wheel_file}[unidist]"],

asv_bench/benchmarks/benchmarks.py

+5-8
Original file line numberDiff line numberDiff line change
@@ -1029,20 +1029,17 @@ class TimeDropDuplicatesDataframe:
10291029
param_names = ["shape"]
10301030

10311031
def setup(self, shape):
1032-
from pandas import DataFrame
1033-
10341032
rows, cols = shape
10351033
N = rows // 10
10361034
K = 10
1037-
# Assigning a large number of columns - inefficient in Modin, so use pandas
1038-
temp_df = DataFrame()
1039-
# dataframe would have cols-1 keys(strings) and one value(int) column
1035+
data = {}
1036+
# dataframe would have cols-1 keys(strings) and one value(int) column
10401037
for col in range(cols - 1):
1041-
temp_df["key" + str(col + 1)] = IMPL.Index(
1038+
data["key" + str(col + 1)] = IMPL.Index(
10421039
[f"i-{i}" for i in range(N)], dtype=object
10431040
).values.repeat(K)
1044-
self.df = IMPL.DataFrame(temp_df)
1045-
self.df["value"] = np.random.randn(N * K)
1041+
data["value"] = np.random.randn(N * K)
1042+
self.df = IMPL.DataFrame(data)
10461043
execute(self.df)
10471044

10481045
def time_drop_dups(self, shape):

0 commit comments

Comments
 (0)