[BUG]: RuntimeError(f"Could not compute metadata for {kind} target {target}: {e}")

Open
#6,413 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Quiet
Tech stack
python, pytorch

Research direction

Start with colossalai/fx/tracer/tracer.py, especially _meta_data_computing and create_proxy, and compare the failing get_attr path with the installed PyTorch FX behavior shown in the traceback. A minimal reproduction and environment details are still needed; done means metadata computation succeeds for the reported transformer target or the incompatibility is documented with a confirmed fix path.

Written by the indexing model from the issue text.

Description

bug
Is there an existing issue for this bug?
  • I have searched the existing issues
The bug has not been fixed in the latest main branch
  • I have checked the latest main branch
Do you feel comfortable sharing a concise (minimal) script that reproduces the error? :)

Yes, I will share a minimal reproducible script.

🐛 Describe the bug

Is it because the PyTorch version is not right?

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/dist-packages/colossalai/fx/tracer/tracer.py", line 300, in _meta_data_computing
    attr_itr = getattr(attr_itr, atom)
               ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/torch/fx/_symbolic_trace.py", line 852, in module_getattr_wrapper
    return self.getattr(attr, attr_val, parameter_proxy_cache)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/torch/fx/_symbolic_trace.py", line 632, in getattr
    maybe_parameter_proxy = maybe_get_proxy_for_attr(
                            ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/torch/fx/_symbolic_trace.py", line 626, in maybe_get_proxy_for_attr
    val_proxy = self.create_proxy("get_attr", n, (), {}, **kwargs)  # type: ignore[arg-type]
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/colossalai/fx/tracer/tracer.py", line 142, in create_proxy
    meta_out = self._meta_data_computing(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/colossalai/fx/tracer/tracer.py", line 313, in _meta_data_computing
    raise RuntimeError(f"Could not compute metadata for {kind} target {target}: {e}")
RuntimeError: Could not compute metadata for get_attr target transformer.h.0.attn.c_attn.bias: Could not compute metadata for get_attr target transformer.h.0.attn.c_attn.bias: Could not compute metadata for get_attr target transformer.h.0.attn.c_attn.bias: ......
Environment

No response

Dominant language
Python
Stars
41.4k
Forks
4.5k
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from hpcaitech/ColossalAI

All issues in hpcaitech/ColossalAI

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.