Skip to content

Commit

Permalink
date format updates to all mjaor function calls
Browse files Browse the repository at this point in the history
  • Loading branch information
mitokic committed Aug 1, 2024
1 parent 1095722 commit 40a2c0b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
3 changes: 2 additions & 1 deletion R/final_models.R
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,8 @@ final_models <- function(run_info,
dplyr::mutate(
average_models = average_models,
max_model_average = max_model_average,
weighted_mape = round(weighted_mape, digits = 4)
weighted_mape = round(weighted_mape, digits = 4),
created = format(created, "%Y-%m-%d %H:%M:%S")
)

write_data(
Expand Down
3 changes: 2 additions & 1 deletion R/prep_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,8 @@ prep_data <- function(run_info,
lag_periods = ifelse(is.null(lag_periods), NA, paste(lag_periods, collapse = "---")),
rolling_window_periods = ifelse(is.null(rolling_window_periods), NA, paste(rolling_window_periods, collapse = "---")),
recipes_to_run = ifelse(is.null(recipes_to_run), NA, paste(recipes_to_run, collapse = "---")),
multistep_horizon = multistep_horizon
multistep_horizon = multistep_horizon,
created = format(created, "%Y-%m-%d %H:%M:%S")
)

write_data(
Expand Down
11 changes: 8 additions & 3 deletions R/prep_models.R
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,8 @@ train_test_split <- function(run_info,
dplyr::mutate(
back_test_scenarios = ifelse(is.null(back_test_scenarios), NA, back_test_scenarios),
back_test_spacing = ifelse(is.null(back_test_spacing), NA, back_test_spacing),
run_ensemble_models = run_ensemble_models
run_ensemble_models = run_ensemble_models,
created = format(created, "%Y-%m-%d %H:%M:%S")
)

write_data(
Expand Down Expand Up @@ -625,7 +626,8 @@ model_workflows <- function(run_info,
dplyr::mutate(
models_to_run = ifelse(is.null(models_to_run), NA, paste(models_to_run, collapse = "---")),
models_not_to_run = ifelse(is.null(models_not_to_run), NA, paste(models_not_to_run, collapse = "---")),
pca = ifelse(is.null(pca), NA, pca)
pca = ifelse(is.null(pca), NA, pca),
created = format(created, "%Y-%m-%d %H:%M:%S")
)

write_data(
Expand Down Expand Up @@ -804,7 +806,10 @@ model_hyperparameters <- function(run_info,

# update logging file
log_df <- log_df %>%
dplyr::mutate(num_hyperparameters = num_hyperparameters)
dplyr::mutate(
num_hyperparameters = num_hyperparameters,
created = format(created, "%Y-%m-%d %H:%M:%S")
)

write_data(
x = log_df,
Expand Down
2 changes: 1 addition & 1 deletion R/run_info.R
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ set_run_info <- function(experiment_name = "finn_fcst",
output_list <- list(
experiment_name = experiment_name,
run_name = run_name,
created = created,
created = format(created, "%Y-%m-%d %H:%M:%S"),
storage_object = storage_object,
path = path,
data_output = data_output,
Expand Down
3 changes: 2 additions & 1 deletion R/train_models.R
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,8 @@ train_models <- function(run_info,
feature_selection = feature_selection,
seed = seed,
negative_forecast = negative_forecast,
inner_parallel = inner_parallel
inner_parallel = inner_parallel,
created = format(created, "%Y-%m-%d %H:%M:%S")
)

write_data(
Expand Down

0 comments on commit 40a2c0b

Please sign in to comment.