Skip to content

Commit 75f2f10

Browse files
committed
lint
1 parent e834493 commit 75f2f10

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

sklbench/benchmarks/sklearn_estimator.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def get_estimator(library_name: str, estimator_name: str):
6666
f"Using first {classes_map[estimator_name][0]}."
6767
)
6868
estimator = classes_map[estimator_name][0]
69-
#if not issubclass(estimator, BaseEstimator):
69+
# if not issubclass(estimator, BaseEstimator):
7070
# logger.info(f"{estimator} estimator is not derived from sklearn's BaseEstimator")
7171
return estimator
7272

@@ -515,11 +515,14 @@ def main(bench_case: BenchCase, filters: List[BenchCase]):
515515
estimator_params = get_bench_case_value(
516516
bench_case, "algorithm:estimator_params", dict()
517517
)
518-
#logger.debug("estimator params: " + str(estimator_params))
518+
# logger.debug("estimator params: " + str(estimator_params))
519519
if "DBSCAN" in str(estimator_name):
520520
if "min_samples" in estimator_params:
521521
from mpi4py import MPI
522-
estimator_params["min_samples"] = MPI.COMM_WORLD.Get_size() * estimator_params["min_samples"]
522+
523+
estimator_params["min_samples"] = (
524+
MPI.COMM_WORLD.Get_size() * estimator_params["min_samples"]
525+
)
523526
# get estimator methods for measurement
524527
estimator_methods = get_estimator_methods(bench_case)
525528

@@ -555,7 +558,7 @@ def main(bench_case: BenchCase, filters: List[BenchCase]):
555558
# note: "handle" is not JSON-serializable
556559
if "handle" in estimator_params:
557560
del estimator_params["handle"]
558-
#logger.debug(f"Estimator parameters:\n{custom_format(estimator_params)}")
561+
# logger.debug(f"Estimator parameters:\n{custom_format(estimator_params)}")
559562
result_template.update(estimator_params)
560563

561564
data_descs = {

sklbench/datasets/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,11 @@ def cache_wrapper(**kwargs):
136136
data_name = kwargs["data_name"]
137137
data_cache = kwargs["data_cache"]
138138
if len(get_filenames_by_prefix(data_cache, data_name)) > 0:
139-
#logger.info(f'Loading "{data_name}" dataset from cache files')
139+
# logger.info(f'Loading "{data_name}" dataset from cache files')
140140
data = load_data_from_cache(data_cache, data_name)
141141
data_desc = load_data_description(data_cache, data_name)
142142
else:
143-
#logger.info(f'Loading "{data_name}" dataset from scratch')
143+
# logger.info(f'Loading "{data_name}" dataset from scratch')
144144
data, data_desc = function(**kwargs)
145145
save_data_to_cache(data, data_cache, data_name)
146146
save_data_description(data_desc, data_cache, data_name)

sklbench/utils/measurement.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,14 @@ def measure_time(
9393
)
9494
break
9595
from mpi4py import MPI
96+
9697
if MPI.COMM_WORLD.Get_rank() == 0:
97-
logger.debug("iters across n runs: " + str(iters) + ", inner iters across n runs: " + str(inners))
98+
logger.debug(
99+
"iters across n runs: "
100+
+ str(iters)
101+
+ ", inner iters across n runs: "
102+
+ str(inners)
103+
)
98104
logger.debug(times)
99105
# mean, std = box_filter(times)
100106
# if std / mean > std_mean_ratio:

0 commit comments

Comments
 (0)