neuralforecast icon indicating copy to clipboard operation
neuralforecast copied to clipboard

NotImplementedError: The operator 'aten::upsample_linear1d.out' is not currently implemented for the MPS device.

Open tinased95 opened this issue 1 year ago • 3 comments

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

tinased95 avatar Jul 31 '23 03:07 tinased95

Ran into same problem using NHiTs on my Mac M1. Added to Pytorch issues:

https://github.com/pytorch/pytorch/issues/77764#issuecomment-1656531763

nigelparsad avatar Aug 03 '23 01:08 nigelparsad

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/

yeraypabon avatar Mar 10 '24 18:03 yeraypabon

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'

damandak avatar May 13 '24 08:05 damandak