GithubHelp home page GithubHelp logo

Comments (18)

jmoralez avatar jmoralez commented on June 14, 2024 3

Can you set the env variable before importing statsforecast?

from statsforecast.

jmoralez avatar jmoralez commented on June 14, 2024 1

You can set the NUMBA_DEBUG_CACHE env variable to see where the cache is being saved. Here's a minimal example:

import os

from numba import njit

os.environ['NUMBA_DEBUG_CACHE'] = '1'

@njit(cache=True)
def f(x):
    return x + 1

print(f(1))

running this script I get:

[cache] index saved to 'C:\\Users\\MyUser\\__pycache__\\test.f-7.py310.nbi'
[cache] data saved to 'C:\\Users\\MyUser\\__pycache__\\test.f-7.py310.1.nbc'
2

from statsforecast.

jmoralez avatar jmoralez commented on June 14, 2024

Hey @neonarc4, thanks for using statsforecast. What do you mean by "reduce the prediction accuracy"? If you want to reduce the compile time you can try caching and if that's the case please update the issue title.

from statsforecast.

neonarc4 avatar neonarc4 commented on June 14, 2024
os.environ["NIXTLA_NUMBA_CACHE"] = 1
os.environ["NUMBA_CACHE_DIR"] = 'numba_cache'
from statsforecast import StatsForecast
from statsforecast.models import AutoARIMA

sf = StatsForecast(
    models=[AutoARIMA(season_length = 12)],
    freq='M',
)

sf.fit(df)

is this correct approach ? on window 11

from statsforecast.

neonarc4 avatar neonarc4 commented on June 14, 2024

the folder remain blank for cache

from statsforecast.

jmoralez avatar jmoralez commented on June 14, 2024

Which version of statsforecast are you using?

from statsforecast.

neonarc4 avatar neonarc4 commented on June 14, 2024

alright now something broken is ur library doesnt support amd ? dml

image

from statsforecast.

jmoralez avatar jmoralez commented on June 14, 2024

statsforecast doesn't support GPU acceleration

from statsforecast.

neonarc4 avatar neonarc4 commented on June 14, 2024

ah lol then how can i fix this caching issue?

from statsforecast.

jmoralez avatar jmoralez commented on June 14, 2024

Which version of statsforecast are you using? The caching variable was introduced in 1.7.0.

from statsforecast.

neonarc4 avatar neonarc4 commented on June 14, 2024

@jmoralez 1.7.0

from statsforecast import StatsForecast
from statsforecast.models import AutoARIMA
import pandas as pd
import os

os.environ["NIXTLA_NUMBA_CACHE"] = "1"
os.environ["NUMBA_CACHE_DIR"] = "X:/sad/practice/test/aii/data"
df = pd.read_csv("https://datasets-nixtla.s3.amazonaws.com/air-passengers.csv", parse_dates=["ds"])

df.head()

sf = StatsForecast(
    models=[AutoARIMA(season_length=12)],
    freq="M",
)

sf.fit(df)
forecast_df = sf.predict(h=12, level=[90])
forecast_df.tail()
fig = sf.plot(df, forecast_df, level=[90])
fig.savefig("myfigure.png")

from statsforecast.

neonarc4 avatar neonarc4 commented on June 14, 2024

image

image

from statsforecast.

jmoralez avatar jmoralez commented on June 14, 2024

os.environ["NUMBA_CACHE_DIR"] = "X:/sad/practice/test/aii/data"

I don't think that's a valid path in Windows, it should probably be something like: "X:\sad\practice\test\aii\data"`. You can also not set this variable and just use the default directory (pycache)

from statsforecast.

neonarc4 avatar neonarc4 commented on June 14, 2024

no luck plz guide me bro

from statsforecast.

neonarc4 avatar neonarc4 commented on June 14, 2024

sorry fell sleep it doesnt work with statsforcecast

from statsforecast.

neonarc4 avatar neonarc4 commented on June 14, 2024
from statsforecast import StatsForecast
from statsforecast.models import AutoARIMA
import pandas as pd
import os
from tempfile import TemporaryDirectory
import time

# with TemporaryDirectory() as temp_dir:
#     os.environ["NUMBA_CACHE_DIR"] = temp_dir
os.environ["NIXTLA_NUMBA_CACHE"] = "1"
os.environ["NUMBA_DEBUG_CACHE"] = "1"
df = pd.read_csv("https://datasets-nixtla.s3.amazonaws.com/air-passengers.csv", parse_dates=["ds"])

df.head()

sf = StatsForecast(
    models=[AutoARIMA(season_length=12)],
    freq="M",
)

sf.fit(df)
forecast_df = sf.predict(h=12, level=[90])
forecast_df.tail()

fig = sf.plot(df, forecast_df, level=[90])
fig.savefig("myfigure.png")

ur code work but when i put it on statsforccast it doesnt

from statsforecast.

neonarc4 avatar neonarc4 commented on June 14, 2024

i love u bro amazing >.</ u fixed thnx alot may god bless u

from statsforecast.

neonarc4 avatar neonarc4 commented on June 14, 2024

between how it so fast without gpu need ? is my rx 7900 xtx is no needed ? or do i need to run linux machine for acceration on numba or ur library doesnt need gpu ? i am really curious how u able to achieve such insane speed without gpu kinda

from statsforecast.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.