You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from pytorch_forecasting.models import NBeats, BaseModel
from pytorch_lightning import Trainer, LightningModule
model = NBeats()
trainer.fit(model, train, valid)
Result:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
[<ipython-input-102-a9a3146dfc98>](https://localhost:8080/#) in <cell line: 1>()
----> 1 trainer.fit(model, train,valid)
1 frames
[/usr/local/lib/python3.10/dist-packages/pytorch_lightning/utilities/compile.py](https://localhost:8080/#) in _maybe_unwrap_optimized(model)
130 return model
131 _check_mixed_imports(model)
--> 132 raise TypeError(
133 f"`model` must be a `LightningModule` or `torch._dynamo.OptimizedModule`, got `{type(model).__qualname__}`"
134 )
TypeError: `model` must be a `LightningModule` or `torch._dynamo.OptimizedModule`, got `NBeats`
I'm trying to use the naked networks without the rest of the stuff around pytorch_forecasting.
I've read the source code I do believe this should work; but I must be doing something stupid.
Is it possible to add an example or FAQ of how to use pytorch_forecasting without from_dataset?
The text was updated successfully, but these errors were encountered:
Expected behavior
Code:
Result:
I'm trying to use the naked networks without the rest of the stuff around pytorch_forecasting.
I've read the source code I do believe this should work; but I must be doing something stupid.
Is it possible to add an example or FAQ of how to use pytorch_forecasting without
from_dataset
?The text was updated successfully, but these errors were encountered: