Skip to content
Discussion options

You must be logged in to vote

Nevermind -- had a couple of issues that I fixed. First, I set Sagemaker to no parallelism whatsoever. Loading the model multiple times was eating up too many memory. And second, Sagemaker was complaining that my input data was >100mb. Since I don't really need my "training data" to get a forecast, I "tricked" Sagemaker -- I told it to look at a small, completely irrelevant file, and never loaded it in my transform_fn().

Once I fixed these, this worked, producing all the forecasts very quickly:

model = StatsForecast.load(path=f'{model_dir}/sf.pkl')
model.n_jobs = 1
forecast_df = model.predict(h=h)

A cleaner way would probably be to use Sagemaker Processing job, and maybe I'll switch over…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by benhorvath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant