Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions python/prophet/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from typing import Sequence, Tuple
from collections import OrderedDict
from enum import Enum
import importlib_resources
import importlib.resources
import pathlib
import platform

Expand Down Expand Up @@ -92,7 +92,7 @@ class CmdStanPyBackend(IStanBackend):
def __init__(self):
import cmdstanpy
# this must be set before super.__init__() for load_model to work on Windows
local_cmdstan = importlib_resources.files("prophet") / "stan_model" / f"cmdstan-{self.CMDSTAN_VERSION}"
local_cmdstan = importlib.resources.files("prophet") / "stan_model" / f"cmdstan-{self.CMDSTAN_VERSION}"
if local_cmdstan.exists():
cmdstanpy.set_cmdstan_path(str(local_cmdstan))
super().__init__()
Expand All @@ -103,7 +103,7 @@ def get_type():

def load_model(self):
import cmdstanpy
model_file = importlib_resources.files("prophet") / "stan_model" / "prophet_model.bin"
model_file = importlib.resources.files("prophet") / "stan_model" / "prophet_model.bin"
return cmdstanpy.CmdStanModel(exe_file=str(model_file))

def fit(self, stan_init, stan_data, **kwargs):
Expand Down
1 change: 0 additions & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ dependencies = [
"pandas>=1.3.5",
"holidays>=0.25,<1",
"tqdm>=4.63.2",
"importlib_resources",
]
authors = [
{name = "Sean J. Taylor", email = "sjtz@pm.me"},
Expand Down
Loading