-
-
Save zilto/2253a6c01caed951fa53181a3c344bfc to your computer and use it in GitHub Desktop.
How to use and call data savers
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
# from the function module | |
@save_to.csv(path=source("pred_path"), output_name_="save_validation_predictions") | |
def validation_predictions_table(y_validation: np.ndarray, val_pred: np.ndarray) -> pd.DataFrame: | |
"""Create a table with the model's predictions on the validation set""" | |
return pd.DataFrame({"y_validation": y_validation, "val_pred": val_pred}) | |
# from the main process | |
results = dr.execute( | |
final_vars=[ | |
"validation_predictions_table", # the function name | |
"save_validation_predictions", # the decorator `output_name_` argument | |
] | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment