Skip to content

Commit

Permalink
resolve minor conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
edwinnglabs committed Dec 25, 2023
2 parents 77dfe99 + 7919a8c commit d126d37
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
1 change: 0 additions & 1 deletion orbit/estimators/stan_estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ def fit(
fitter=None,
init_values=None,
):

# T_STAR is used as sampling temperature which is used for WBIC calculation
data_input.update({"T_STAR": sampling_temperature})
if self.verbose:
Expand Down
1 change: 0 additions & 1 deletion orbit/template/dlt.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ def __init__(
forecast_horizon=1,
**kwargs,
):

self.damped_factor = damped_factor
self.global_trend_option = global_trend_option
self.period = period
Expand Down
1 change: 0 additions & 1 deletion orbit/template/ktr.py
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,6 @@ def _generate_seas(
seas_decomp = dict()

if seasonality is not None and len(seasonality) > 0:

date_col = training_meta[TrainingMetaKeys.DATE_COL.value]
date_array = training_meta[TrainingMetaKeys.DATE_ARRAY.value]
training_end = training_meta[TrainingMetaKeys.END.value]
Expand Down
16 changes: 15 additions & 1 deletion orbit/utils/stan.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
# "{}/{}.pkl".format(CompiledStanModelPath.CHILD, stan_model_name),
# )

<<<<<<< HEAD
# # updated for py3
# os.makedirs(os.path.dirname(compiled_model), exist_ok=True)
# # compile if compiled file does not exist or stan source has changed (with later datestamp than compiled)
Expand All @@ -51,6 +52,20 @@
# )
# )
# sm = CmdStanModel(stan_file=source_model)
=======
# updated for py3
os.makedirs(os.path.dirname(compiled_model), exist_ok=True)
# compile if compiled file does not exist or stan source has changed (with later datestamp than compiled)
if not os.path.isfile(compiled_model) or os.path.getmtime(
compiled_model
) < os.path.getmtime(source_model):
logger.info(
"First time in running stan model:{}. Expect 3 - 5 minutes for compilation.".format(
stan_model_name
)
)
sm = CmdStanModel(stan_file=source_model)
>>>>>>> 7919a8c474dd4880539a9fddb54f9c1888b1704c

# with open(compiled_model, "wb") as f:
# pickle.dump(sm, f, protocol=pickle.HIGHEST_PROTOCOL)
Expand Down Expand Up @@ -90,7 +105,6 @@ def compile_stan_model_simplified(path):
if not os.path.isfile(compiled_path) or os.path.getmtime(
compiled_path
) < os.path.getmtime(source_path):

logger.info(
"First time in running stan model:{}. Expect 3 - 5 minutes for compilation.".format(
source_filename
Expand Down

0 comments on commit d126d37

Please sign in to comment.