Skip to content
This repository was archived by the owner on Nov 13, 2025. It is now read-only.

Commit 2d150b3

Browse files
committed
Fix parameter ordering issue for workers
1 parent f2d992b commit 2d150b3

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

modules/cluster_estimation/cluster_estimation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ def create(
6363
min_new_points_to_run: int,
6464
max_num_components: int,
6565
random_state: int,
66-
local_logger: logger.Logger,
6766
min_points_per_cluster: int,
67+
local_logger: logger.Logger,
6868
) -> "tuple[bool, ClusterEstimation | None]":
6969
"""
7070
Data requirement conditions for estimation model to run.
@@ -111,8 +111,8 @@ def create(
111111
min_new_points_to_run,
112112
max_num_components,
113113
random_state,
114-
local_logger,
115114
min_points_per_cluster,
115+
local_logger,
116116
)
117117

118118
def __init__(
@@ -122,8 +122,8 @@ def __init__(
122122
min_new_points_to_run: int,
123123
max_num_components: int,
124124
random_state: int,
125-
local_logger: logger.Logger,
126125
min_points_per_cluster: int,
126+
local_logger: logger.Logger,
127127
) -> None:
128128
"""
129129
Private constructor, use create() method.

modules/cluster_estimation/cluster_estimation_worker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ def cluster_estimation_worker(
1818
min_new_points_to_run: int,
1919
max_num_components: int,
2020
random_state: int,
21+
min_points_per_cluster: int,
2122
input_queue: queue_proxy_wrapper.QueueProxyWrapper,
2223
output_queue: queue_proxy_wrapper.QueueProxyWrapper,
2324
controller: worker_controller.WorkerController,
24-
min_points_per_cluster: int,
2525
) -> None:
2626
"""
2727
Estimation worker process.
@@ -67,8 +67,8 @@ def cluster_estimation_worker(
6767
min_new_points_to_run,
6868
max_num_components,
6969
random_state,
70-
local_logger,
7170
min_points_per_cluster,
71+
local_logger,
7272
)
7373
if not result:
7474
local_logger.error("Worker failed to create class object", True)

modules/detect_target/detect_target_brightspot.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,7 @@ def run(
133133
# Catching all exceptions for library call
134134
# pylint: disable-next=broad-exception-caught
135135
except Exception as exception:
136-
self.__local_logger.error(
137-
f"Failed to convert to greyscale, exception: {exception}"
138-
)
136+
self.__local_logger.error(f"Failed to convert to greyscale, exception: {exception}")
139137
return False, None
140138

141139
# Calculate the percentile threshold for bright spots

tests/unit/test_cluster_detection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ def cluster_model() -> cluster_estimation.ClusterEstimation: # type: ignore
3737
MIN_NEW_POINTS_TO_RUN,
3838
MAX_NUM_COMPONENTS,
3939
RNG_SEED,
40-
test_logger,
4140
MIN_POINTS_PER_CLUSTER,
41+
test_logger,
4242
)
4343
assert result
4444
assert model is not None

0 commit comments

Comments
 (0)