Skip to content
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

ENH: Do not wrap lines in logs (or provide an option to avoid wrapping) #1124

Closed
h-vetinari opened this issue Oct 19, 2024 · 1 comment · Fixed by #1136
Closed

ENH: Do not wrap lines in logs (or provide an option to avoid wrapping) #1124

h-vetinari opened this issue Oct 19, 2024 · 1 comment · Fixed by #1136

Comments

@h-vetinari
Copy link

In conda-forge/torchaudio-feedstock#4, I see the following kind of lines

 │ │ │ =========================== short test summary info ============================
 │ │ │ FAILED test/torchaudio_unittest/compliance/kaldi/kaldi_compatibility_cpu_test.py::TestKaldiFloat32::test_fbank_00 - KeyError: 'foo\n\nTo execute this tes
 │ │ │ t, run the following from the base repo dir:\n     python test/run/etc/conda/test-files/torchaudio/1/test/torchaudio_unittest/compliance/kaldi/kaldi_comp
 │ │ │ atibility_cpu_test.py -k TestKaldiFloat32.test_fbank_00\n\nThis message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0'
 │ │ │ FAILED test/torchaudio_unittest/compliance/kaldi/kaldi_compatibility_cpu_test.py::TestKaldiFloat32::test_fbank_01 - KeyError: 'foo\n\nTo execute this tes
 │ │ │ t, run the following from the base repo dir:\n     python test/run/etc/conda/test-files/torchaudio/1/test/torchaudio_unittest/compliance/kaldi/kaldi_comp
 │ │ │ atibility_cpu_test.py -k TestKaldiFloat32.test_fbank_01\n\nThis message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0'
 │ │ │ FAILED [...]

And various other places where long lines get wrapped. This makes the logs very hard to read (compared to having all the test names nicely aligned, for example), so if not the default (my preference), then there should at least be an option to disable line wrapping.

@wolfv
Copy link
Member

wolfv commented Oct 19, 2024

Yeah I would argue though that on a terminal at home (that also does wrapping) that we have ugly empty lines on the left hand side. So it loooks like:

 │ │ │ FAILED test/torchaudio_unittest/compliance/kaldi/kaldi_compatibility_cpu_test.py::TestKaldiFloat32::test_fbank_00 - KeyError: 'foo\n\nTo execute this tes
t, run the following from the base repo dir:\n     python test/run/etc/conda/test-files/torchaudio/1/test/torchaudio_unittest/compliance/kaldi/kaldi_comp
atibility_cpu_test.py -k TestKaldiFloat32.test_fbank_00\n\nThis message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0'
 │ │ │ FAILED test/torchaudio_unittest/compliance/kaldi/kaldi_compatibility_cpu_test.py::TestKaldiFloat32::test_fbank_01 - KeyError: 'foo\n\nTo execute this tes

But I agree that it's annoying in CI so we can definitely automatically disable it there.

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

Successfully merging a pull request may close this issue.

2 participants