Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix benchmarks compatibility with newer pytest-cases #14764

Merged
merged 3 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ dependencies:
- pydata-sphinx-theme!=0.14.2
- pytest
- pytest-benchmark
- pytest-cases<3.8.2
- pytest-cases>=3.8.2
- pytest-cov
- pytest-xdist
- python-confluent-kafka>=1.9.0,<1.10.0a0
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-120_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ dependencies:
- pydata-sphinx-theme!=0.14.2
- pytest
- pytest-benchmark
- pytest-cases<3.8.2
- pytest-cases>=3.8.2
- pytest-cov
- pytest-xdist
- python-confluent-kafka>=1.9.0,<1.10.0a0
Expand Down
2 changes: 1 addition & 1 deletion dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ dependencies:
- fastavro>=0.22.9
- hypothesis
- pytest-benchmark
- pytest-cases<3.8.2
- pytest-cases>=3.8.2
- python-snappy>=0.6.0
- scipy
- output_types: conda
Expand Down
6 changes: 4 additions & 2 deletions python/cudf/benchmarks/API/bench_dataframe.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022-2023, NVIDIA CORPORATION.
# Copyright (c) 2022-2024, NVIDIA CORPORATION.

"""Benchmarks of DataFrame methods."""

Expand Down Expand Up @@ -178,6 +178,8 @@ def bench_nsmallest(benchmark, dataframe, num_cols_to_sort, n):
benchmark(dataframe.nsmallest, n, by)


@pytest_cases.parametrize_with_cases("dataframe, cond, other", prefix="where")
@pytest_cases.parametrize_with_cases(
"dataframe, cond, other", prefix="where", cases="cases_dataframe"
)
def bench_where(benchmark, dataframe, cond, other):
benchmark(dataframe.where, cond, other)
6 changes: 4 additions & 2 deletions python/cudf/benchmarks/API/bench_functions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022, NVIDIA CORPORATION.
# Copyright (c) 2022-2024, NVIDIA CORPORATION.

"""Benchmarks of free functions that accept cudf objects."""

Expand All @@ -9,7 +9,9 @@
from utils import benchmark_with_object


@pytest_cases.parametrize_with_cases("objs", prefix="concat")
@pytest_cases.parametrize_with_cases(
"objs", prefix="concat", cases="cases_functions"
)
@pytest.mark.parametrize(
"axis",
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022, NVIDIA CORPORATION.
# Copyright (c) 2022-2024, NVIDIA CORPORATION.

from utils import benchmark_with_object

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022, NVIDIA CORPORATION.
# Copyright (c) 2022-2024, NVIDIA CORPORATION.

"""Test cases for benchmarks in bench_functions.py."""

Expand Down
2 changes: 1 addition & 1 deletion python/cudf/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ test = [
"msgpack",
"pytest",
"pytest-benchmark",
"pytest-cases<3.8.2",
"pytest-cases>=3.8.2",
"pytest-cov",
"pytest-xdist",
"python-snappy>=0.6.0",
Expand Down