neuralforecast
neuralforecast copied to clipboard
NotImplementedError: The operator 'aten::upsample_linear1d.out' is not currently implemented for the MPS device.
What happened + What you expected to happen
How can I run neuralforecast on M1 macI am using jupyter notebook and already tried adding environment variable. Is there a way to explicitly set cpu as the running platform for neuralforecast? Thanks.
Versions / Dependencies
neuralforecast=1.6.1
Reproduction script
nhits = NHITS(h=horizon, input_size=input_size, step_size=step_size, max_steps=200) nf = NeuralForecast(models=[nhits], freq='15T') nf.fit(df)
Issue Severity
None
Ran into same problem using NHiTs on my Mac M1. Added to Pytorch issues:
https://github.com/pytorch/pytorch/issues/77764#issuecomment-1656531763
I'm also having this issue. My current workaround is to fall back to CPU using
import os
os.environ['PYTORCH_ENABLE_MPS_FALLBACK'] = '1'
at the beginning of your script. It does seems like a PyTorch issue, and their MPS backend is in beta phase according to this: https://developer.apple.com/metal/pytorch/
I also have this issue. The proposed workaround of the fallback doesn't work for me, but my workaround is to add the following to the N-HiTS parameters:
accelerator='cpu'