-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Auto] Training of Auto*
models always fail with Expected a parent
error on macOS
#1203
Comments
Hello! Can you try in a clean environment with a fresh Pytorch installation and try again? On my end, I can't reproduce this error and I also run it on Mac, but that should fix it. |
Observation 1I created a fresh python 3.10 environment and ran the below command: > python3 -m pip install -U neuralforecast --extra-index-url https://download.pytorch.org/whl/cpu This installs numpy 2.1.3 and then the following code fails complaining that it is incompatible with numpy v2. >>> from neuralforecast import NeuralForecast
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.1.3 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.
Traceback (most recent call last): File "<stdin>", line 1, in <module>
File "/path/to/venv/lib/python3.10/site-packages/neuralforecast/__init__.py", line 3, in <module>
from .core import NeuralForecast
File "/path/to/venv/lib/python3.10/site-packages/neuralforecast/core.py", line 17, in <module>
import pytorch_lightning as pl
File "/path/to/venv/lib/python3.10/site-packages/pytorch_lightning/__init__.py", line 25, in <module>
from lightning_fabric.utilities.seed import seed_everything # noqa: E402
File "/path/to/venv/lib/python3.10/site-packages/lightning_fabric/__init__.py", line 30, in <module>
from lightning_fabric.fabric import Fabric # noqa: E402
File "/path/to/venv/lib/python3.10/site-packages/lightning_fabric/fabric.py", line 35, in <module>
import torch
File "/path/to/venv/lib/python3.10/site-packages/torch/__init__.py", line 1477, in <module>
from .functional import * # noqa: F403
File "/path/to/venv/lib/python3.10/site-packages/torch/functional.py", line 9, in <module>
import torch.nn.functional as F
File "/path/to/venv/lib/python3.10/site-packages/torch/nn/__init__.py", line 1, in <module>
from .modules import * # noqa: F403
File "/path/to/venv/lib/python3.10/site-packages/torch/nn/modules/__init__.py", line 35, in <module>
from .transformer import TransformerEncoder, TransformerDecoder, \
File "/path/to/venv/lib/python3.10/site-packages/torch/nn/modules/transformer.py", line 20, in <module>
device: torch.device = torch.device(torch._C._get_default_device()), # torch.device('cpu'),
/path/to/venv/lib/python3.10/site-packages/torch/nn/modules/transformer.py:20: UserWarning: Failed to initialize NumPy: _ARRAY_API not found (Triggered internally at /Users/runner/work/pytorch/pytorch/pytorch/torch/csrc/utils/tensor_numpy.cpp:84.)
device: torch.device = torch.device(torch._C._get_default_device()), # torch.device('cpu'),
>>> Observation 2I deleted that environment and created a new one, and installed Observation 3Since it is not possible for me to have just I am using intel chip Macbook in case that matters. |
How did you create the new environment? I'd install just with |
I used
|
What happened + What you expected to happen
If I try to train a
Auto*
model on my office macbook, it always fails for each of the trials, and finally failed complaining that no trials succeeded.Final Error
Before this, each individual trial report something like this:
This traceback corresponds to when I use
AutoRNN
as provided snippet below, but same error happens forAutoLSTM
,AutoTFT
, etc. as well. If I use non-Auto models likeRNN
orLSTM
, they work fine. If I try the same snippet on my personal laptop running Ubuntu WSL on Windows 11, it works there but fails on macbook.I expect the code snippet to work always.
Versions / Dependencies
Neural Forecast
1.7.5
Python
3.10.15
macOS Sequoia
15.1
Reproduction script
Issue Severity
High: It blocks me from completing my task.
The text was updated successfully, but these errors were encountered: