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

Do we need to update Pytorch Lightning from v0.9.0 to v1.0.2 #16

Closed
xianyuanliu opened this issue Oct 19, 2020 · 3 comments
Closed

Do we need to update Pytorch Lightning from v0.9.0 to v1.0.2 #16

xianyuanliu opened this issue Oct 19, 2020 · 3 comments

Comments

@xianyuanliu
Copy link
Member

Bug

I meet the same bug as this issue when I want to use pl.metrics.Accuracy directly to evaluate my models. This bug has been fixed in the new version 1.0.2.

However, the new version has changed the method to generate the loss/accuracy logs. This is the warning message.
The {log:dict keyword} was deprecated in 0.9.1 and will be removed in 1.0.0.
Please use self.log(...) inside the lightningModule instead.
Log on a step or aggregate epoch metric to the logger and/or progress bar (inside LightningModule)
self.log('train_loss', loss, on_step=True, on_epoch=True, prog_bar=True)

If we decide to update, we need to update all the training_step, validation_step, testing_step with the new logging method.

@RaivoKoot
Copy link
Member

Yeah,
Pytorch Lightning changed the way you log metrics after a certain update to make things less weird. We don't need to use the same Pytorch Lightning version for every single example though. Each example folder can use whichever version it chooses. So, for the older examples, we can just specify that they use the older Pytorch Lightning version and for the newer examples we can specify that they use the newer version. That solves the problem right?

@xianyuanliu
Copy link
Member Author

Yeah, it makes sense. However, we need to create different virtual environments to run different examples. We can update all the codes at one time later when Pytorch Lightning has a very stable version.

@RaivoKoot
Copy link
Member

Exactly

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

2 participants