Skip to content

Commit

Permalink
Lint utils/stan.py
Browse files Browse the repository at this point in the history
  • Loading branch information
swotai committed Mar 12, 2024
1 parent 563209f commit f724415
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions orbit/utils/stan.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@


def get_compiled_stan_model(
stan_model_name: str = "",
stan_model_name: str = "",
stan_file_path: Optional[str] = None,
exe_file_path: Optional[str] = None,
force_compile: bool = False,
Expand All @@ -43,12 +43,12 @@ def get_compiled_stan_model(
----------
stan_model_name :
The name of the Stan model to use. Use this for the built in models (dlt, ets, ktrlite, lgt)
stan_file_path :
stan_file_path :
The path to the Stan file to use. If not provided, the default is to search for the file in the 'orbit' package.
If provided, function will ignore the stan_model_name parameter, and will compile the provide stan_file_path
into executable in place (same folder as stan_file_path)
exe_file_path :
The path to the Stan-exe file to use. If not provided, the default is to search for the file
exe_file_path :
The path to the Stan-exe file to use. If not provided, the default is to search for the file
in the 'orbit' package. If provided, function will ignore the stan_model_name parameter,
and will compile the provide stan_file_path into executable in place (same folder as stan_file_path)
Returns
Expand All @@ -57,7 +57,9 @@ def get_compiled_stan_model(
A compiled Stan model.
"""
if (stan_file_path is not None) or (exe_file_path is not None):
sm = CmdStanModel(stan_file=stan_file, exe_file=exe_file_path, force_compile=force_compile)
sm = CmdStanModel(
stan_file=stan_file, exe_file=exe_file_path, force_compile=force_compile
)
else:
# Load orbit included cmdstan models
# Some oddities here. if not providing exe_file, CmdStanModel would delete the actual executable file.
Expand Down

0 comments on commit f724415

Please sign in to comment.