-
Notifications
You must be signed in to change notification settings - Fork 699
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationgood first issueGood for newcomersGood for newcomers
Description
Expected behavior
Code:
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
?
jobs-git
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationgood first issueGood for newcomersGood for newcomers