mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-05-14 20:48:08 +00:00
Fix setup.py stan file temp destination (#2451)
This commit is contained in:
parent
9aa3f7b0fd
commit
3746765007
1 changed files with 3 additions and 4 deletions
|
|
@ -95,7 +95,6 @@ def install_cmdstan_deps(cmdstan_dir: Path):
|
|||
cores=cpu_count(),
|
||||
progress=True,
|
||||
):
|
||||
|
||||
raise RuntimeError("CmdStan failed to install in repackaged directory")
|
||||
|
||||
|
||||
|
|
@ -121,13 +120,13 @@ def build_cmdstan_model(target_dir):
|
|||
|
||||
install_cmdstan_deps(cmdstan_dir)
|
||||
model_name = "prophet.stan"
|
||||
|
||||
temp_stan_file = copy(os.path.join(MODEL_DIR, model_name), cmdstan_dir)
|
||||
# note: ensure copy target is a directory not a file.
|
||||
temp_stan_file = copy(os.path.join(MODEL_DIR, model_name), cmdstan_dir.parent.resolve())
|
||||
sm = cmdstanpy.CmdStanModel(stan_file=temp_stan_file)
|
||||
target_name = "prophet_model.bin"
|
||||
copy(sm.exe_file, os.path.join(target_dir, target_name))
|
||||
|
||||
if IS_WINDOWS:
|
||||
if IS_WINDOWS and repackage_cmdstan():
|
||||
copytree(cmdstan_dir, target_cmdstan_dir)
|
||||
|
||||
# Clean up
|
||||
|
|
|
|||
Loading…
Reference in a new issue