Skip to content

Commit

Permalink
Remove debug prints statement
Browse files Browse the repository at this point in the history
  • Loading branch information
marcopremier committed Nov 6, 2024
1 parent c33772b commit 8b87442
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions python/src/robyn/modeling/pareto/pareto_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,15 +378,15 @@ def prepare_pareto_data(
calibrated: bool,
) -> ParetoData:
result_hyp_param = aggregated_data["result_hyp_param"]
print(f"~~~~~~~~~~ aggregated_data['x_decomp_agg'] PRE MERGE: {aggregated_data["x_decomp_agg"]}\n\n------------\n\nresult_hyp_param:{result_hyp_param}")

# 1. Binding Pareto results
aggregated_data["x_decomp_agg"] = pd.merge(
aggregated_data["x_decomp_agg"],
result_hyp_param[["robynPareto", "solID"]],
on="solID",
how="left",
)
print(f"~~~~~~~~~ 1")

# Step 1: Collect decomp_spend_dist from each trial and add the trial number
decomp_spend_dist = pd.concat(
[
Expand Down Expand Up @@ -414,7 +414,7 @@ def prepare_pareto_data(
on="solID",
how="left",
)
print(f"~~~~~~~~~ 2")

# 3. Determining the number of Pareto fronts
if self.model_outputs.hyper_fixed or len(result_hyp_param) == 1:
pareto_fronts = 1
Expand Down Expand Up @@ -453,20 +453,18 @@ def prepare_pareto_data(
pareto_fronts = int(auto_pareto["robynPareto"])
# 5. Creating Pareto front vector
pareto_fronts_vec = list(range(1, pareto_fronts + 1))
print(f"~~~~~~~~~ 3")

# 6. Filtering data for selected Pareto fronts
decomp_spend_dist_pareto = decomp_spend_dist[
decomp_spend_dist["robynPareto"].isin(pareto_fronts_vec)
]
print(f"~~~~~~~~~ 3.1: \n\n")
result_hyp_param_pareto = result_hyp_param[
result_hyp_param["robynPareto"].isin(pareto_fronts_vec)
]
print(f"~~~~~~~~~ 3.2: {aggregated_data["x_decomp_agg"]}\n\n")
x_decomp_agg_pareto = aggregated_data["x_decomp_agg"][
aggregated_data["x_decomp_agg"]["robynPareto"].isin(pareto_fronts_vec)
]
print(f"~~~~~~~~~ 4")

return ParetoData(
decomp_spend_dist=decomp_spend_dist_pareto,
result_hyp_param=result_hyp_param_pareto,
Expand Down

0 comments on commit 8b87442

Please sign in to comment.