Skip to content
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

LSTNet + PyTorch cannot be trained (RuntimeError) #283

Open
elseml opened this issue Dec 13, 2024 · 3 comments
Open

LSTNet + PyTorch cannot be trained (RuntimeError) #283

elseml opened this issue Dec 13, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@elseml
Copy link
Member

elseml commented Dec 13, 2024

When using an LSTNet summary network in combination with the PyTorch backend, automatic model building fails when calling approximator.fit() with the following RuntimeError:

RuntimeError: Unable to automatically build the model. Please build it yourself before calling fit/evaluate/predict. A model is 'built' when its variables have been created and its self.built attribute is True. Usually, calling the model on a batch of data is the right way to build it. Exception encountered: 'Exception encountered when calling ContinuousApproximator.call().

Model ContinuousApproximator does not have a call() method implemented.

Arguments received by ContinuousApproximator.call(): • args=({'inference_variables': 'torch.Tensor(shape=torch.Size([64, 3]), dtype=float32)', 'summary_variables': 'torch.Tensor(shape=torch.Size([64, 13, 2]), dtype=float32)', 'inference_conditions': 'torch.Tensor(shape=torch.Size([64, 1]), dtype=float32)'},) • kwargs=<class 'inspect._empty'>'

This error does not occur when one of the components is changed (e.g., either using TensorFlow as the keras backend or using another summary network such as DeepSet).

The error can be reproduced in the Linear_Regression.ipynb example by using the torch backend and replacing the DeepSet summary network with an LSTNet summary network.

@stefanradev93
Copy link
Contributor

@LarsKue I thought we fixed this?

@paul-buerkner paul-buerkner added the bug Something isn't working label Dec 17, 2024
@stefanradev93
Copy link
Contributor

Bump.

@LarsKue
Copy link
Contributor

LarsKue commented Dec 20, 2024

Could be caused by multiple issues, we will have to add tests to be sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants