-
Notifications
You must be signed in to change notification settings - Fork 364
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Code cleanup and proper logging for pareto and clustering (#1180)
* refactored pareto_optimizer code * removed unused unit test * Added logging for Pareto module * cleaned up unused functions and unimplemented code * cluster loggers --------- Co-authored-by: Dhaval Patel <[email protected]>
- Loading branch information
1 parent
634980b
commit 0b98a2f
Showing
12 changed files
with
119 additions
and
639 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# pyre-strict | ||
|
||
import logging | ||
|
||
import pandas as pd | ||
|
||
|
||
class RobynLogger: | ||
|
||
@staticmethod | ||
def log_df( | ||
logger, | ||
df: pd.DataFrame, | ||
logLevel: int = logging.DEBUG, | ||
print_head: bool = False, | ||
): | ||
""" | ||
Log the shape and first few rows of a DataFrame. | ||
Args: | ||
df (pd.DataFrame): DataFrame to log. | ||
name (str): Name of the DataFrame. | ||
""" | ||
if df is None: | ||
logger.log(logLevel, "DataFrame is None") | ||
return | ||
|
||
logger.log(logLevel, f"DataFrame columns: {df.columns}") | ||
logger.log(logLevel, f"DataFrame Shape: {df.shape}") | ||
if print_head: | ||
logger.log(logLevel, f"DataFrame Head: {df.head()}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
189 changes: 0 additions & 189 deletions
189
python/src/robyn/modeling/pareto/immediate_carryover.py
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.