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.

Disable attention plot with a command line parameter

See original GitHub issue

Describe the bug I’m training on clusters, but the machines don’t have libpng installed. Since I don’t really need the attention plot, I want to just disable the plot. However, I cannot find a way to disable that.

To Reproduce Steps to reproduce the behavior:

  1. run the librispeech recipe on a machine without libpng

Error logs

Traceback (most recent call last):
  File "/home/storage15/tangjiyang/espnet/tools/anaconda/envs/espnet/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/home/storage15/tangjiyang/espnet/tools/anaconda/envs/espnet/lib/python3.8/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/storage15/tangjiyang/espnet/espnet2/tasks/abs_task.py", line 1266, in main_worker
    cls.trainer.run(
  File "/home/storage15/tangjiyang/espnet/espnet2/train/trainer.py", line 310, in run
    cls.plot_attention(
  File "/home/storage15/tangjiyang/espnet/tools/anaconda/envs/espnet/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 49, in decorate_no_grad
    return func(*args, **kwargs)
  File "/home/storage15/tangjiyang/espnet/espnet2/train/trainer.py", line 766, in plot_attention
    fig.savefig(p)
  File "/home/storage15/tangjiyang/espnet/tools/anaconda/envs/espnet/lib/python3.8/site-packages/matplotlib/figure.py", line 2180, in savefig
    self.canvas.print_figure(fname, **kwargs)
  File "/home/storage15/tangjiyang/espnet/tools/anaconda/envs/espnet/lib/python3.8/site-packages/matplotlib/backend_bases.py", line 2075, in print_figure
    result = print_method(
  File "/home/storage15/tangjiyang/espnet/tools/anaconda/envs/espnet/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py", line 501, in print_png
    from matplotlib import _png

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
kamo-naoyukicommented, Sep 17, 2021

I fixed it in #3592. Please use --use_matplotlib option after merging.

1reaction
tjysdsgcommented, May 31, 2021

Alright I tested it, now it works with --num_att_plot 0, I opened #3257

Read more comments on GitHub >

github_iconTop Results From Across the Web

Command-line Tools — fairseq 0.12.2 documentation
Fairseq provides several command-line tools for training and evaluating models: ... how often to clear the PyTorch CUDA cache (0 to disable). Default:...
Read more >
Command Line Arguments for Your Python Script
In this tutorial, we are going to see how we can leverage the command line arguments to a Python script to help you...
Read more >
MVS Interactive Problem Control System (IPCS) Commands
Entering subcommands · Abbreviating subcommands and parameter operands · Overriding defaults · Online help · Standard subcommand return codes · Task directory for ......
Read more >
Annotated List of Command-line Options - ImageMagick
Below is list of command-line options recognized by the ImageMagick command-line tools. ... In summary, ImageMagick tries to write all images to one...
Read more >
The GAMS Call and Command Line Parameters
Run method in the object oriented APIs or calling the gams executable from a command line. In all cases the same GAMS engine...
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