Skip to content
This repository was archived by the owner on Aug 28, 2025. It is now read-only.
This repository was archived by the owner on Aug 28, 2025. It is now read-only.

Update self.log #132

Description

@loodvn

🐛 Bug

Some tutorials still return non-detached tensors in training_step - this is deprecated in 1.6 and may cause memory leaks if people follow those patterns.

e.g.
output = OrderedDict({"loss": g_loss, "progress_bar": tqdm_dict, "log": tqdm_dict})

The error pops up in the autogenerated docs here: https://pytorch-lightning.readthedocs.io/en/stable/notebooks/lightning_examples/basic-gan.html

I raised this in Lightning-Universe/lightning-bolts#793 too.

I see the examples in https://github.com/PyTorchLightning/pytorch-lightning/tree/master/pl_examples already defer to lightning bolts for more robust examples - wherever a good source of docs/best practices should be, I think this specific error be fixed? (these examples are also discussed in #71).

Thanks, loving the library btw! :)

Activity

  1. Borda commented on Jan 7, 2022

    @Borda
    Contributor

    Hi @loodvn are you interested in sending out fix? :]

  2. loodvn commented on Jan 17, 2022

    @loodvn
    Author
  3. deleted a comment from stale on Mar 21, 2022
  4. reopened this on Apr 17, 2022
  5. stale commented on Apr 16, 2025

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug / fixSomething isn't workinghelp wantedExtra attention is neededwon't fixThis will not be worked on

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions