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.

Transform output on Linux doesn't match its JIT-scripted version

See original GitHub issue

šŸ› Bug

The latest PyTorch nightly on Linux (1.10.0.dev20210825) broke the test_adjust_hue test of TorchVision. The test fails when we compare the output of the transform with its JIT scripted version: https://github.com/pytorch/vision/blob/a9b38db2d9714b4a707de65f5b13632db821c6eb/test/test_functional_tensor.py#L655

The values are uint8 and as we can see from the output they are not the same. See #4313

Traceback (most recent call last):
  File "/root/project/test/test_functional_tensor.py", line 820, in test_adjust_hue
    agg_method="max"
  File "/root/project/test/test_functional_tensor.py", line 655, in check_functional_vs_PIL_vs_scripted
    assert out_fn_t.allclose(out_scripted, atol=atol)
AssertionError: assert False
 +  where False = <built-in method allclose of Tensor object at 0x7fd7c72f3b38>(tensor([[[**138**,   0, 115,  ..., 209,  40,  71],\n         [139, 245, 116,  ...,   7, 219,  89],\n         [142,  40, 146,...32],\n         [220, 137, 118,  ..., 255,  28,  68],\n         [140, 144,  41,  ..., 191,  38,  40]]], dtype=torch.uint8), atol=1e-06)
 +    where <built-in method allclose of Tensor object at 0x7fd7c72f3b38> = tensor([[[**137**,   0, 115,  ..., 209,  40,  71],\n         [139, 245, 116,  ...,   7, 219,  89],\n         [142,  40, 146,...32],\n         [220, 137, 118,  ..., 255,  28,  68],\n         [140, 144,  41,  ..., 191,  38,  40]]], dtype=torch.uint8).allclose

The test only fails on CPU not on GPU.

Possibly caused by one of these commits.

cc @vfdev-5 @datumbox

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
bertmahercommented, Aug 26, 2021

Iā€™ve worked around the dependency distance before by adding //caffe2:libtorch as a direct dependence of the test targets I want to run (see D28908516). That just covers the ā€œtorchā€ part of pytorch (so not ATen, c10), but itā€™s better than missing it.

2reactions
datumboxcommented, Aug 26, 2021

@fmassa @NicolasHug Any idea why the TorchVision cpu tests donā€™t run when PyTorch core commits? As far as I see, when the PR that broke vision was merged (GH pytorch/pytorch#63776 / D30484555), only pytorch_vision_gpu-buck was run. Now that the GPU runs donā€™t execute CPU-only tests, can we make sure that we also run the CPU versions on FBcode?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why doesn't my expression for the fourier transform of a ...
I am seeing a frustrating discrepancy between my evaluation of F(Ļ‰)=1a+iw, and the fast fourier transform of f(t)=eāˆ’atu(t) (where u(t) is theĀ ...
Read more >
Transform file content into json string with jq doesn't work in ...
I am on AWS EC2 machine with the latest Amazon Linux 2 image. What is going on here? The file looks like this:...
Read more >
Display all output but highlight search matches - Super User
To use a Color GREP to only highlight matched patterns but not otherwise change the output: grep --color=always -e "^" -e "hello" testfile....
Read more >
The Basics of Using the Sed Stream Editor to Manipulate Text ...
The sed stream editor is a non-interactive line editor that can perform powerful editing operations on text streams or files.
Read more >
FFTW Home Page
A fast, free C FFT library; includes real-complex, multidimensional, and parallel transforms. Benchmarked against many other FFTs.
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