Skip to content

Commit

Permalink
address code review
Browse files Browse the repository at this point in the history
  • Loading branch information
rjzamora committed Aug 30, 2024
1 parent a15aa35 commit 6f3e5c5
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 48 deletions.
9 changes: 1 addition & 8 deletions dask_cuda/benchmarks/local_cudf_groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import dask
import dask.dataframe as dd
from dask.distributed import performance_report, wait
from dask.utils import format_bytes, parse_bytes
from dask.utils import format_bytes

from dask_cuda.benchmarks.common import Config, execute_benchmark
from dask_cuda.benchmarks.utils import (
Expand Down Expand Up @@ -260,13 +260,6 @@ def parse_args():
"type": str,
"help": "Do shuffle with GPU or CPU dataframes (default 'gpu')",
},
{
"name": "--ignore-size",
"default": "1 MiB",
"metavar": "nbytes",
"type": parse_bytes,
"help": "Ignore messages smaller than this (default '1 MB')",
},
{
"name": "--runs",
"default": 3,
Expand Down
9 changes: 1 addition & 8 deletions dask_cuda/benchmarks/local_cudf_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import dask
import dask.dataframe as dd
from dask.distributed import performance_report, wait
from dask.utils import format_bytes, parse_bytes
from dask.utils import format_bytes

from dask_cuda.benchmarks.common import Config, execute_benchmark
from dask_cuda.benchmarks.utils import (
Expand Down Expand Up @@ -335,13 +335,6 @@ def parse_args():
"action": "store_true",
"help": "Use shuffle join (takes precedence over '--broadcast-join').",
},
{
"name": "--ignore-size",
"default": "1 MiB",
"metavar": "nbytes",
"type": parse_bytes,
"help": "Ignore messages smaller than this (default '1 MB')",
},
{
"name": "--frac-match",
"default": 0.3,
Expand Down
7 changes: 0 additions & 7 deletions dask_cuda/benchmarks/local_cudf_shuffle.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,13 +228,6 @@ def parse_args():
"type": str,
"help": "Do shuffle with GPU or CPU dataframes (default 'gpu')",
},
{
"name": "--ignore-size",
"default": "1 MiB",
"metavar": "nbytes",
"type": parse_bytes,
"help": "Ignore messages smaller than this (default '1 MB')",
},
{
"name": "--runs",
"default": 3,
Expand Down
9 changes: 1 addition & 8 deletions dask_cuda/benchmarks/local_cupy.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from dask import array as da
from dask.distributed import performance_report, wait
from dask.utils import format_bytes, parse_bytes
from dask.utils import format_bytes

from dask_cuda.benchmarks.common import Config, execute_benchmark
from dask_cuda.benchmarks.utils import (
Expand Down Expand Up @@ -297,13 +297,6 @@ def parse_args():
"type": int,
"help": "Chunk size (default 2500).",
},
{
"name": "--ignore-size",
"default": "1 MiB",
"metavar": "nbytes",
"type": parse_bytes,
"help": "Ignore messages smaller than this (default '1 MB').",
},
{
"name": "--runs",
"default": 3,
Expand Down
9 changes: 1 addition & 8 deletions dask_cuda/benchmarks/local_cupy_map_overlap.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from dask import array as da
from dask.distributed import performance_report, wait
from dask.utils import format_bytes, parse_bytes
from dask.utils import format_bytes

from dask_cuda.benchmarks.common import Config, execute_benchmark
from dask_cuda.benchmarks.utils import (
Expand Down Expand Up @@ -168,13 +168,6 @@ def parse_args():
"type": int,
"help": "Kernel size, 2*k+1, in each dimension (default 1)",
},
{
"name": "--ignore-size",
"default": "1 MiB",
"metavar": "nbytes",
"type": parse_bytes,
"help": "Ignore messages smaller than this (default '1 MB')",
},
{
"name": "--runs",
"default": 3,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ def parse_args():
},
{
"name": "--path",
"default": "s3://dask-cudf-parquet-testing/dedup_parquet",
"type": str,
"help": "Parquet directory to read from (must be a flat directory).",
},
Expand Down Expand Up @@ -250,14 +249,6 @@ def parse_args():
"type": int,
"help": "Number of runs",
},
# NOTE: The following args are not relevant to this benchmark
{
"name": "--ignore-size",
"default": "1 MiB",
"metavar": "nbytes",
"type": parse_bytes,
"help": "Ignore messages smaller than this (default '1 MB')",
},
]

return parse_benchmark_args(
Expand Down
7 changes: 7 additions & 0 deletions dask_cuda/benchmarks/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,13 @@ def parse_benchmark_args(
"If the files already exist, new files are created with a uniquified "
"BASENAME.",
)
parser.add_argument(
"--ignore-size",
default="1 MiB",
metavar="nbytes",
type=parse_bytes,
help="Ignore messages smaller than this (default '1 MB')",
)

for args in args_list:
name = args.pop("name")
Expand Down

0 comments on commit 6f3e5c5

Please sign in to comment.