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

benchmarks: avoid use of deprecated pandas API #339

Merged
merged 1 commit into from
Jul 26, 2022
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
8 changes: 4 additions & 4 deletions benchmarks/skimage/cucim_color_bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def set_args(self, dtype):
module_gpu=cucim.skimage.color,
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])

# rgb2hed and hed2rgb test combine_stains and separate_stains and all other
# stains should have equivalent performance.
Expand All @@ -145,7 +145,7 @@ def set_args(self, dtype):
module_gpu=cucim.skimage.color,
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])

B = RGBABench(
function_name="rgba2rgb",
Expand All @@ -157,7 +157,7 @@ def set_args(self, dtype):
module_gpu=cucim.skimage.color,
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])

for contiguous_labels in [True, False]:
if contiguous_labels:
Expand All @@ -176,7 +176,7 @@ def set_args(self, dtype):
module_gpu=cucim.skimage.color,
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])

fbase = os.path.splitext(pfile)[0]
all_results.to_csv(fbase + ".csv")
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/skimage/cucim_exposure_bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def set_args(self, dtype):
module_gpu=cucim.skimage.exposure,
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])


for shape in [(512, 512), (3840, 2160), (3840, 2160, 3), (192, 192, 192)]:
Expand All @@ -124,7 +124,7 @@ def set_args(self, dtype):
module_gpu=cucim.skimage.exposure,
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])

fbase = os.path.splitext(pfile)[0]
all_results.to_csv(fbase + ".csv")
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/skimage/cucim_feature_bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def set_args(self, dtype):
module_gpu=cucim.skimage.feature,
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])


for function_name, fixed_kwargs, var_kwargs, allow_color, allow_nd in [
Expand Down Expand Up @@ -118,7 +118,7 @@ def set_args(self, dtype):
module_gpu=cucim.skimage.feature,
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])

fbase = os.path.splitext(pfile)[0]
all_results.to_csv(fbase + ".csv")
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/skimage/cucim_filters_bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
module_gpu=cucim.skimage.filters,
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])

fbase = os.path.splitext(pfile)[0]
all_results.to_csv(fbase + ".csv")
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/skimage/cucim_measure_bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def set_args(self, dtype):
module_gpu=cucim.skimage.measure,
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])


for function_name, fixed_kwargs, var_kwargs, allow_color, allow_nd in [
Expand Down Expand Up @@ -268,7 +268,7 @@ def set_args(self, dtype):
module_gpu=cucim.skimage.measure,
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])


fbase = os.path.splitext(pfile)[0]
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/skimage/cucim_metrics_bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def set_args(self, dtype):
module_gpu=cucim.skimage.metrics,
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])


fbase = os.path.splitext(pfile)[0]
Expand Down
8 changes: 4 additions & 4 deletions benchmarks/skimage/cucim_morphology_bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def set_args(self, dtype):
module_gpu=cucim.skimage.morphology,
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])


for function_name, fixed_kwargs, var_kwargs, allow_nd in [
Expand Down Expand Up @@ -169,7 +169,7 @@ def set_args(self, dtype):
module_gpu=cucim.skimage.morphology,
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])


for function_name, fixed_kwargs, var_kwargs, allow_nd in [
Expand Down Expand Up @@ -200,7 +200,7 @@ def set_args(self, dtype):
module_gpu=cucim.skimage.morphology,
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])


for function_name, fixed_kwargs, var_kwargs, allow_color, allow_nd in [
Expand Down Expand Up @@ -262,7 +262,7 @@ def set_args(self, dtype):
module_gpu=cucim.skimage.morphology,
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])


fbase = os.path.splitext(pfile)[0]
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/skimage/cucim_registration_bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def set_args(self, dtype):
module_gpu=cucim.skimage.registration,
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])


for function_name, fixed_kwargs, var_kwargs, allow_color, allow_nd in [
Expand Down Expand Up @@ -125,7 +125,7 @@ def set_args(self, dtype):
module_gpu=cucim.skimage.registration,
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])


fbase = os.path.splitext(pfile)[0]
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/skimage/cucim_restoration_bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def set_args(self, dtype):
module_gpu=cucim.skimage.restoration,
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])


# function_name, fixed_kwargs, var_kwargs, allow_color, allow_nd = ('unsupervised_wiener', dict(), dict(), False, True)
Expand Down Expand Up @@ -178,7 +178,7 @@ def set_args(self, dtype):
module_gpu=cucim.skimage.restoration,
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])


fbase = os.path.splitext(pfile)[0]
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/skimage/cucim_segmentation_bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def set_args(self, dtype):
module_gpu=cucim.skimage.segmentation,
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])


dtypes = [np.float32]
Expand Down Expand Up @@ -181,7 +181,7 @@ def set_args(self, dtype):
module_gpu=cucim.skimage.segmentation,
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])


fbase = os.path.splitext(pfile)[0]
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/skimage/cucim_transform_bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
function_is_generator=function_is_generator,
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])


fbase = os.path.splitext(pfile)[0]
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/skimage/cupyx_scipy_ndimage_filter_bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def set_args(self, dtype):
var_kwargs=var_kwargs,
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])

for fname, wshape, var_kwargs in [
("convolve", weights_shape, dict(mode=modes)),
Expand All @@ -119,7 +119,7 @@ def set_args(self, dtype):
var_kwargs=var_kwargs,
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])

fbase = os.path.splitext(pfile)[0]
all_results.to_csv(fbase + ".csv")
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/skimage/cupyx_scipy_ndimage_fourier_bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def set_args(self, dtype):
var_kwargs=var_kwargs,
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])


fbase = os.path.splitext(pfile)[0]
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/skimage/cupyx_scipy_ndimage_interp_bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def set_args(self, dtype):
var_kwargs=dict(mode=modes, order=orders),
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])

for fname, fixed_kwargs, var_kwargs in [
(
Expand Down Expand Up @@ -139,7 +139,7 @@ def set_args(self, dtype):
var_kwargs=var_kwargs,
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])

fbase = os.path.splitext(pfile)[0]
all_results.to_csv(fbase + ".csv")
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/skimage/cupyx_scipy_ndimage_measurements_bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def set_args(self, dtype):
var_kwargs=var_kwargs,
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])

for fname in [
"sum",
Expand Down Expand Up @@ -180,7 +180,7 @@ def set_args(self, dtype):
var_kwargs=var_kwargs,
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])

fbase = os.path.splitext(pfile)[0]
all_results.to_csv(fbase + ".csv")
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/skimage/cupyx_scipy_ndimage_morphology_bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def set_args(self, dtype):
var_kwargs=var_kwargs,
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])

iterations = [1, 10, 30]
for fname, var_kwargs in [
Expand All @@ -152,7 +152,7 @@ def set_args(self, dtype):
var_kwargs=var_kwargs,
)
results = B.run_benchmark(duration=1)
all_results = all_results.append(results["full"])
all_results = pd.concat([all_results, results["full"]])

fbase = os.path.splitext(pfile)[0]
all_results.to_csv(fbase + ".csv")
Expand Down