question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add `enable_device_summary` flag to disable device printout

See original GitHub issue

🚀 Feature

Add enable_model_summary boolean kwarg to pl.Trainer() to supress _log_device_info()'s output.

Motivation

When calling predict within a surrogate model loop Trainer prints out the devices each time breaking apart intended tables etc or other outputs. Related to https://github.com/Lightning-AI/lightning/issues/13358 for cleaning-up/reducing stdout verbosity.

GPU available: False, used: False
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
HPU available: False, using: 0 HPUs
=======================================================
n_gen |  n_eval |  n_nds  |     eps      |  indicator  
=======================================================
    1 |     322 |       3 |            - |            -
GPU available: False, used: False
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
HPU available: False, using: 0 HPUs
    2 |    1322 |       4 |  0.625000000 |        ideal

Pitch

Add enable_model_summary kwarg to Trainer that defaults to True

Alternatives

The suggested solution is the simplest solution, any alternative would add more complexity.

Additional context

None


If you enjoy Lightning, check out our other projects! ⚡

  • Metrics: Machine learning metrics for distributed, scalable PyTorch applications.

  • Lite: enables pure PyTorch users to scale their existing code on any kind of device while retaining full control over their own loops and optimization logic.

  • Flash: The fastest way to get a Lightning baseline! A collection of tasks for fast prototyping, baselining, fine-tuning, and solving problems with deep learning.

  • Bolts: Pretrained SOTA Deep Learning models, callbacks, and more for research and production with PyTorch Lightning and PyTorch.

  • Lightning Transformers: Flexible interface for high-performance research using SOTA Transformers leveraging Pytorch Lightning, Transformers, and Hydra.

cc @borda @awaelchli @ananthsub @rohitgr7 @justusschock @kaushikb11

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:11 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
carmoccacommented, Sep 11, 2022

I changed my mind. I think the callback proposal is the simplest and most extensible option. This would also resolve https://github.com/Lightning-AI/lightning/issues/11014. And we could have flags in the callback to disable specific prints.

1reaction
awaelchlicommented, Jun 23, 2022

I’m curious, is there a desire to have verbosity controlled on a more global level, not just the summary here?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Disable Devices in Devices and Printers - Windows Client
This article describes how to hide or disable Devices in Devices and Printers. Applies to: Windows 10 - all editions
Read more >
build: add --v8-disable-object-print flag by fossamagna · Pull ...
v8-enable-object-print flag is set by default true. so, no way of disable this flag. remove --v8-enable-object-print flag. add a ...
Read more >
Information on the "Disable Panorama Policy and Objects ...
The Disable Panorama Policy and Objects and Disable Device and Network Template buttons can be found on a firewall by navigating:.
Read more >
Enable or Disable Your Flags - Harness.io Docs
Enable or disable Flags from the Feature Flag dashboard · In your Harness Project, go to Feature Flags. A list of all your...
Read more >
Enable and disable GitLab features deployed behind feature ...
Start the GitLab Rails console · Enable or disable the feature · Check if a feature flag is enabled · View set feature...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found