Skip to content

log_gpu_memory='min_max' leads to error in parsing metrics keys #9010

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
cosw0t opened this issue Aug 20, 2021 · 0 comments · Fixed by #9013
Closed

log_gpu_memory='min_max' leads to error in parsing metrics keys #9010

cosw0t opened this issue Aug 20, 2021 · 0 comments · Fixed by #9013
Labels
bug Something isn't working help wanted Open to be worked on

Comments

@cosw0t
Copy link
Contributor

cosw0t commented Aug 20, 2021

🐛 Bug

log_gpu_memory='min_max' raises:

/usr/local/lib/python3.7/dist-packages/pytorch_lightning/trainer/connectors/logger_connector/logger_connector.py in _log_gpus_metrics(self)
    227     def _log_gpus_metrics(self):
    228         for key, mem in self.gpus_metrics.items():
--> 229             gpu_id = int(key.split("/")[0].split(":")[1])
    230             if gpu_id in self.trainer.accelerator_connector.parallel_device_ids:
    231                 self.trainer.lightning_module.log(key, mem, prog_bar=False, logger=True, on_step=True, on_epoch=False)

To Reproduce

https://colab.research.google.com/drive/13Q_YzybNXDRL7gBZsluIRqfBIq21G3Et?usp=sharing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Open to be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant