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.

CI broken due to Core issue

See original GitHub issue

Our unittest jobs started failing with the latest nightly from core (from the 14th) with

Traceback (most recent call last):
  File "/root/project/test/test_backbone_utils.py", line 142, in test_build_fx_feature_extractor
    train_return_nodes, eval_return_nodes = self._get_return_nodes(model)
  File "/root/project/test/test_backbone_utils.py", line 130, in _get_return_nodes
    model, tracer_kwargs={"leaf_modules": self.leaf_modules}, suppress_diff_warning=True
  File "/root/project/torchvision/models/feature_extraction.py", line 253, in get_graph_node_names
    train_tracer.trace(model.train())
  File "/root/project/env/lib/python3.7/site-packages/torch/fx/_symbolic_trace.py", line 587, in trace
    self.create_node('output', 'output', (self.create_arg(fn(*args)),), {},
  File "/root/project/torchvision/models/swin_transformer.py", line 394, in forward
    x = self.features(x)
  File "/root/project/env/lib/python3.7/site-packages/torch/fx/_symbolic_trace.py", line 577, in module_call_wrapper
    return self.call_module(mod, forward, args, kwargs)
  File "/root/project/torchvision/models/feature_extraction.py", line 84, in call_module
    out = forward(*args, **kwargs)
  File "/root/project/env/lib/python3.7/site-packages/torch/fx/_symbolic_trace.py", line 573, in forward
    return _orig_module_call(mod, *args, **kwargs)
  File "/root/project/env/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1131, in _call_impl
    return forward_call(*input, **kwargs)
  File "/root/project/env/lib/python3.7/site-packages/torch/nn/modules/container.py", line 139, in forward
    input = module(input)
  File "/root/project/env/lib/python3.7/site-packages/torch/fx/_symbolic_trace.py", line 577, in module_call_wrapper
    return self.call_module(mod, forward, args, kwargs)
  File "/root/project/torchvision/models/feature_extraction.py", line 84, in call_module
    out = forward(*args, **kwargs)
  File "/root/project/env/lib/python3.7/site-packages/torch/fx/_symbolic_trace.py", line 573, in forward
    return _orig_module_call(mod, *args, **kwargs)
  File "/root/project/env/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1131, in _call_impl
    return forward_call(*input, **kwargs)
  File "/root/project/torchvision/models/swin_transformer.py", line 49, in forward
    x = F.pad(x, (0, 0, 0, W % 2, 0, H % 2))
TypeError: pad(): argument 'pad' (position 2) must be tuple of ints, not tuple

I’m unable to pin-point a specific PR in torch core though. Perhaps this is something @jamesr66a could help with? Thanks!

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
vfdev-5commented, Jun 15, 2022

Doing git bisect, it tells me that:

d332724071704939e1c50704f6bc62bb6c990383 is the first bad commit
commit d332724071704939e1c50704f6bc62bb6c990383
Author: Nikolay Korovaiko <korovaikon@gmail.com>
Date:   Tue Jun 14 02:17:59 2022 +0000

    Python Bindings for SymInts (#78135)
    
    This PR adds support for `SymInt`s in python. Namely,
    * `THPVariable_size` now returns `sym_sizes()`
    * python arg parser is modified to parse PyObjects into ints and `SymbolicIntNode`s
    * pybind11 bindings for `SymbolicIntNode` are added, so size expressions can be traced
    * a large number of tests added to demonstrate how to implement python symints.
    Pull Request resolved: https://github.com/pytorch/pytorch/pull/78135
    Approved by: https://github.com/ezyang

https://github.com/pytorch/pytorch/pull/78135

This commit breaks the snippet from @YosuaMichael , https://github.com/pytorch/vision/issues/6166#issuecomment-1155511441:

import torch
import torch.fx
import torch.nn.functional as F

class CustomModule(torch.nn.Module):
    def forward(self, x):
        bs, c, h, w = x.shape
        return F.pad(x, (0, w%2, 0, h%2, 0, 0))

m = CustomModule()
x = torch.rand(1, 3, 4, 4)
m_fx = torch.fx.symbolic_trace(m)

EDIT:

Checked explicitly:

2reactions
YosuaMichaelcommented, Jun 14, 2022

@datumbox I think that problem is not related to the broken CI. My laptop use: torch==1.13.0.dev20220531 and when I do both pytest test_backbone_utils.py -k swin_t and pytest test_models.py -k swin_t both passes the test. However I still get the same error TypeError: int() argument must be a string, a bytes-like object or a number, not 'Proxy' when I run the script.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Identify and fix broken builds with CI/CD pipelines | TechTarget
Experiencing broken builds in your CI/CD pipeline? These best practices related to credentials, flaky tests and alerts can boost productivity ...
Read more >
7 Common Issues with CI/CD and How to Fix Them | AltexSoft
Here are a few common issues you will experience when attempting to set up and work with a CI/CD pipeline.
Read more >
Troubleshooting CI/CD - GitLab Docs
Common CI/CD issues · Jobs or pipelines don't run when expected · Pipeline with many jobs fails to start · A job runs...
Read more >
iOS CI Broken due to Personal Accounts used to build the client.
Basically the CI builds the iOS Client from a Github Repository, first including the main application module (from the main code repository) ...
Read more >
7 CI/CD Challenges & their Must-Know Solutions - BrowserStack
Sometimes when you scale up your operations, problems in the testing system start to arise due to the increase in data volume, devices,...
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