Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -10,7 +10,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 @@ -94,7 +94,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 @@ -105,7 +105,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.0.4",
"holidays>=0.25,<1",
"tqdm>=4.36.1",
"importlib_resources",
]
authors = [
{name = "Sean J. Taylor", email = "sjtz@pm.me"},
Expand Down
Loading