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

Delay transforming priority_order into ndarray #969

Closed
6 changes: 3 additions & 3 deletions dataprofiler/labelers/data_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -2047,9 +2047,9 @@ def process(
elif aggregation_func == "random":
num_labels = max(label_mapping.values()) + 1
random_state: random.Random = self._parameters["random_state"]
priority_order = np.array(list(range(num_labels)))
random_state.shuffle(priority_order) # type: ignore
self.priority_prediction(results, priority_order)
priority_order = list(range(num_labels))
random_state.shuffle(priority_order)
self.priority_prediction(results, np.array(priority_order))
else:
raise ValueError(
f"`{aggregation_func}` is not a valid aggregation function"
Expand Down