Skip to content

Commit

Permalink
Fix/added unique ids to model_name (#760)
Browse files Browse the repository at this point in the history
* added unique ids to model_name

* removed pid from the folder name

Co-authored-by: Greg DeVos <gregory.devos@ngc.com>
Co-authored-by: Julien Herzen <julien.herzen@unit8.co>
  • Loading branch information
3 people committed Feb 4, 2022
1 parent ec6ccf8 commit c2d91e0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions darts/models/forecasting/forecasting_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from random import sample
import numpy as np
import pandas as pd
import time

from darts.timeseries import TimeSeries
from darts.logging import get_logger, raise_log, raise_if_not, raise_if
Expand Down Expand Up @@ -686,6 +687,12 @@ def _evaluate_combination(param_combination):
param_combination_dict = dict(
list(zip(parameters.keys(), param_combination))
)
if param_combination_dict.get("model_name", None):
current_time = time.strftime("%Y-%m-%d_%H.%M.%S.%f", time.localtime())
param_combination_dict[
"model_name"
] = f"{current_time}_{param_combination_dict['model_name']}"

model = model_class(**param_combination_dict)
if use_fitted_values: # fitted value mode
model._fit_wrapper(series, past_covariates, future_covariates)
Expand Down

0 comments on commit c2d91e0

Please sign in to comment.