Skip to content

Cannot log gpu memory without making on step = True while logging train loss #8159

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

Closed
karthi0804 opened this issue Jun 28, 2021 Discussed in #7582 · 2 comments · Fixed by #8174
Closed

Cannot log gpu memory without making on step = True while logging train loss #8159

karthi0804 opened this issue Jun 28, 2021 Discussed in #7582 · 2 comments · Fixed by #8174
Assignees
Labels
good first issue Good for newcomers

Comments

@karthi0804
Copy link

Discussed in #7582

Originally posted by karthi0804 May 18, 2021
I am using 1.3.0 version. I wanted to just log the gpu memory at all time steps. So I enabled log_gpu_memory='all' and log_every_n_steps=1. I couldn't find the gpu logging for steps. But If I log the train loss on steps, I can see the gpu logging at each steps. Is this how it is intended to work? I expect that gpu logging should be independent of self.log().

@tchaton tchaton self-assigned this Jun 28, 2021
@tchaton
Copy link
Contributor

tchaton commented Jun 28, 2021

Dear @karthi0804,

Thanks for reporting this bug. Would you be interested to resolve this bug ? This should be quite easy.

The memory metrics are computed there and logged right after:
https://github.com/PyTorchLightning/pytorch-lightning/blob/b978d2a1f2f9cc9942971a6e252ccd1209a9269b/pytorch_lightning/trainer/connectors/logger_connector/logger_connector.py#L98

Best,
T.C

@karthi0804
Copy link
Author

@tchaton thanks for fixing it! hopefully I will contribute next time.

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

Successfully merging a pull request may close this issue.

2 participants