Toni Borders
11/07/2023, 4:41 PMAssertion failed: (isInt<33>(Addend) && "Invalid page reloc value."), function encodeAddend, file /Users/ci/miniconda3-arm64/envs/numba-builder/conda-bld/llvmdev_1684265191581/work/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOAArch64.h, line 210.
zsh: abort poetry run python myscript.py
I noticed someone else made a similar post, but it was in relation to using polars.José Morales
11/07/2023, 4:47 PMToni Borders
11/07/2023, 5:57 PMMax (Nixtla)
11/07/2023, 6:28 PMToni Borders
11/07/2023, 6:31 PMfrom statsforecast.utils import AirPassengersDF as panel_df
I have 2 very simple functions to fit and predict separately
def fit():
season = 7
model = StatsForecast(df=panel_df,
models=[AutoARIMA(),
AutoETS(model=['Z', 'Z', 'Z'], season_length=season),
SeasonalNaive(season_length=season)],
freq='D',
n_jobs=1,
verbose=True)
model.fit(panel_df)
#write_model_to_s3(model)
return
def load():
with open('/Users/tmb/PycharmProjects/data-science/UFE/output_files/model.pkl', 'rb') as f:
storedmodel = pickle.load(f)
return storedmodel
def predict(model):
forecast = model.predict(h=15, level=[90,95])
print("forecast")
print(forecast.head(3))
return forecast
Note that I have saved off a fit from a previous run and am loading that for the prediction.
The main controlling function looks as follows:
def main():
plot(panel_df)
#add_zeros()
# Time the fit and print
init = time()
fit()
end = time()
print(f'Fit Seconds: {(end - init) }')
# Time load&predict and print
init = time()
model= load()
forecast_df = predict(model)
end = time()
print(f'Load and Predict Seconds: {(end - init) }')
# Time forecast only and print
init = time()
#forecast_only_df = SF_forecast()
end = time()
print(f'Forecast Only Seconds: {(end - init) }')
Finally it might also be relevant that my virtual environment is managed by the Poetry package management
.toml file
[tool.poetry.dependencies]
python = "^3.9"
plotly = "^5.17.0"
statsmodels = "^0.14.0"
boto3 = "^1.28.62"
tabulate = "^0.9.0"
matplotlib = "^3.8.0"
requests = "^2.31.0"
seaborn = "^0.13.0"
pandas-datareader = "^0.10.0"
jupyterlab = "^4.0.7"
scikit-learn = "^1.3.1"
mglearn = "^0.2.0"
dash = "^2.14.0"
statsforecast = "^1.6.0"
darts = "^0.26.0"
pylab-sdk = "^1.5.0"
utilsforecast = "^0.0.12"
[build-system]
requires = ["poetry-core"]
Let me know if you need any further info!José Morales
11/07/2023, 6:41 PMToni Borders
11/07/2023, 6:42 PMJosé Morales
11/07/2023, 6:45 PMToni Borders
11/07/2023, 6:47 PMJosé Morales
11/07/2023, 6:48 PMToni Borders
11/07/2023, 6:48 PMJosé Morales
11/07/2023, 6:48 PMToni Borders
11/07/2023, 6:49 PMThis is from the poetry lock file [[package]]
name = "numba"
version = "0.58.1"
description = "compiling Python code using LLVM"
optional = false
python-versions = ">=3.8"
files = [
{file = "numba-0.58.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:07f2fa7e7144aa6f275f27260e73ce0d808d3c62b30cff8906ad1dec12d87bbe"},
{file = "numba-0.58.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:7bf1ddd4f7b9c2306de0384bf3854cac3edd7b4d8dffae2ec1b925e4c436233f"},
{file = "numba-0.58.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:bc2d904d0319d7a5857bd65062340bed627f5bfe9ae4a495aef342f072880d50"},
{file = "numba-0.58.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:4e79b6cc0d2bf064a955934a2e02bf676bc7995ab2db929dbbc62e4c16551be6"},
{file = "numba-0.58.1-cp310-cp310-win_amd64.whl", hash = "sha256:81fe5b51532478149b5081311b0fd4206959174e660c372b94ed5364cfb37c82"},
{file = "numba-0.58.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:bcecd3fb9df36554b342140a4d77d938a549be635d64caf8bd9ef6c47a47f8aa"},
{file = "numba-0.58.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a1eaa744f518bbd60e1f7ccddfb8002b3d06bd865b94a5d7eac25028efe0e0ff"},
{file = "numba-0.58.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:bf68df9c307fb0aa81cacd33faccd6e419496fdc621e83f1efce35cdc5e79cac"},
{file = "numba-0.58.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:55a01e1881120e86d54efdff1be08381886fe9f04fc3006af309c602a72bc44d"},
{file = "numba-0.58.1-cp311-cp311-win_amd64.whl", hash = "sha256:811305d5dc40ae43c3ace5b192c670c358a89a4d2ae4f86d1665003798ea7a1a"},
{file = "numba-0.58.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ea5bfcf7d641d351c6a80e8e1826eb4a145d619870016eeaf20bbd71ef5caa22"},
{file = "numba-0.58.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:e63d6aacaae1ba4ef3695f1c2122b30fa3d8ba039c8f517784668075856d79e2"},
{file = "numba-0.58.1-cp38-cp38-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:6fe7a9d8e3bd996fbe5eac0683227ccef26cba98dae6e5cee2c1894d4b9f16c1"},
{file = "numba-0.58.1-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:898af055b03f09d33a587e9425500e5be84fc90cd2f80b3fb71c6a4a17a7e354"},
{file = "numba-0.58.1-cp38-cp38-win_amd64.whl", hash = "sha256:d3e2fe81fe9a59fcd99cc572002101119059d64d31eb6324995ee8b0f144a306"},
{file = "numba-0.58.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5c765aef472a9406a97ea9782116335ad4f9ef5c9f93fc05fd44aab0db486954"},
{file = "numba-0.58.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:9e9356e943617f5e35a74bf56ff6e7cc83e6b1865d5e13cee535d79bf2cae954"},
{file = "numba-0.58.1-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:240e7a1ae80eb6b14061dc91263b99dc8d6af9ea45d310751b780888097c1aaa"},
{file = "numba-0.58.1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:45698b995914003f890ad839cfc909eeb9c74921849c712a05405d1a79c50f68"},
{file = "numba-0.58.1-cp39-cp39-win_amd64.whl", hash = "sha256:bd3dda77955be03ff366eebbfdb39919ce7c2620d86c906203bed92124989032"},
{file = "numba-0.58.1.tar.gz", hash = "sha256:487ded0633efccd9ca3a46364b40006dbdaca0f95e99b8b83e778d1195ebcbaa"},
]
José Morales
11/07/2023, 6:51 PMToni Borders
11/07/2023, 6:55 PMJosé Morales
11/07/2023, 6:56 PMAkmal Soliev
11/07/2023, 10:11 PMToni Borders
11/08/2023, 8:40 AM