James McCool
commited on
Commit
·
fac0157
1
Parent(s):
ef7a8b2
Add debug print statements in hedging_preset.py to output the count of removed and locked lineups during processing. This change enhances visibility into lineup generation and aids in debugging the lineup filtering logic.
Browse files
global_func/hedging_preset.py
CHANGED
@@ -56,7 +56,9 @@ def hedging_preset(portfolio: pd.DataFrame, lineup_target: int, projections_file
|
|
56 |
print(locked_df.head(10))
|
57 |
|
58 |
removed_lineups = small_field_preset(removed_df, math.ceil(lineup_target / (list_size * 3)), excluded_cols)
|
|
|
59 |
locked_lineups = large_field_preset(locked_df, math.ceil(lineup_target / (list_size * 3)), excluded_cols)
|
|
|
60 |
|
61 |
concat_portfolio = pd.concat([concat_portfolio, removed_lineups, locked_lineups])
|
62 |
|
@@ -66,7 +68,9 @@ def hedging_preset(portfolio: pd.DataFrame, lineup_target: int, projections_file
|
|
66 |
teams_df = working_df[working_df['Stack'] == team]
|
67 |
|
68 |
removed_lineups = small_field_preset(removed_df, math.ceil(lineup_target / (list_size * 3)), excluded_cols)
|
|
|
69 |
team_lineups = large_field_preset(teams_df, math.ceil(lineup_target / (list_size * 3)), excluded_cols)
|
|
|
70 |
concat_portfolio = pd.concat([concat_portfolio, team_lineups])
|
71 |
|
72 |
return concat_portfolio.head(lineup_target)
|
|
|
56 |
print(locked_df.head(10))
|
57 |
|
58 |
removed_lineups = small_field_preset(removed_df, math.ceil(lineup_target / (list_size * 3)), excluded_cols)
|
59 |
+
print(len(removed_lineups))
|
60 |
locked_lineups = large_field_preset(locked_df, math.ceil(lineup_target / (list_size * 3)), excluded_cols)
|
61 |
+
print(len(locked_lineups))
|
62 |
|
63 |
concat_portfolio = pd.concat([concat_portfolio, removed_lineups, locked_lineups])
|
64 |
|
|
|
68 |
teams_df = working_df[working_df['Stack'] == team]
|
69 |
|
70 |
removed_lineups = small_field_preset(removed_df, math.ceil(lineup_target / (list_size * 3)), excluded_cols)
|
71 |
+
print(len(removed_lineups))
|
72 |
team_lineups = large_field_preset(teams_df, math.ceil(lineup_target / (list_size * 3)), excluded_cols)
|
73 |
+
print(len(team_lineups))
|
74 |
concat_portfolio = pd.concat([concat_portfolio, team_lineups])
|
75 |
|
76 |
return concat_portfolio.head(lineup_target)
|