-
Notifications
You must be signed in to change notification settings - Fork 21.7k
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
[AudioLM] Graph break: call_method UserDefinedObjectVariable(dict) get [TorchVariable(<class 'torch.Tensor'>), ConstantVariable(NoneType)] #121345
Comments
Looking over the einops code, it looks like this is a normal dict:
|
I am having some similar problems with nested dicts right now. Except it's even worse as it's leading to an uncaught assestion in the constants.py (passing a Dict that should have been a ConstDict). |
@Skylion007 Do you have a small repro for your issue? I think we should find out the scenario that a regular is not wrapped as ConstDict, then it's not hard to fix it imo. |
If we just add allocation stack traces to all variable trackers this will be easy to nail. If someone gives me a patch I can run it on AudioLM |
Dictionaries in dynamo have some limitations. The good part of the story is that these limitations are documented and it's super easy to extend our implementation to support more types! pytorch/torch/_dynamo/variables/dicts.py Lines 27 to 29 in 06d2392
At the moment we are graph-breaking when hitting elements of dicts that are not hashable internally: pytorch/torch/_dynamo/variables/dicts.py Lines 74 to 75 in 06d2392
We could throw a hard error saying "this dict key is not supported, please file a ticket with your error to ask for support for this type of keys". |
🐛 Describe the bug
Discovered while compiling lucidrains/audiolm-pytorch
This is a bit concerning; if it's actually a dict, we should have wrapped it in UserDefinedObjectVariable. This lookup is happening in einops which had some problems
Full repro code: gist.github.com/ezyang/64c24c9fc5529f3afed4ee4266f6adc5
Versions
main
cc @msaroufim @bdhirsh @anijain2305 @zou3519 @chauhang @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng
The text was updated successfully, but these errors were encountered: