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

Got an error while running trainer = pl.Trainer ? #2

Open
Xanyv opened this issue Oct 12, 2020 · 3 comments
Open

Got an error while running trainer = pl.Trainer ? #2

Xanyv opened this issue Oct 12, 2020 · 3 comments

Comments

@Xanyv
Copy link

Xanyv commented Oct 12, 2020

when I run:

trainer = pl.Trainer(max_nb_epochs = tft.num_epochs,
gpus = 1,
track_grad_norm = 2,
gradient_clip_val = tft.max_gradient_norm,
early_stop_callback = early_stop_callback,
#train_percent_check = 0.01,
#val_percent_check = 0.01,
#test_percent_check = 0.01,
overfit_pct=0.01,
#fast_dev_run=True,
profiler=True,
#print_nan_grads = True,
#distributed_backend='dp'
)
trainer.fit(tft)

in training_tft.ipynb, it raise error below:

TypeError Traceback (most recent call last)
in
----> 1 trainer = pl.Trainer(max_nb_epochs = tft.num_epochs,
2 gpus = 1,
3 track_grad_norm = 2,
4 gradient_clip_val = tft.max_gradient_norm,
5 early_stop_callback = early_stop_callback,

TypeError: init() got an unexpected keyword argument 'max_nb_epochs'

Would appreciate a lot if anyone can help with this bug

@dehoyosb
Copy link
Owner

Hello, this code uses an older version of pytorch lightning, which uses the attribute max_nb_epochs. I recommend you visit pytorch forecasting, it took the temporal fusion transformer from this repo and has an updated implementation. https://github.com/jdb78/pytorch-forecasting/tree/master

@SaeedArisha
Copy link

@Xanyv use max_epochs instead, also after solving this you'll get an error on 'early_stop_callback' there, just use callbacks

@KatrinaJK
Copy link

max_nb_epochs-->max_epochs
early_stop_callback-->callbacks
profiler=True-->profiler="advance"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants