-
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
torch._dynamo.exc.Unsupported: call_function args: UserDefinedObjectVariable(EasyDict) #120219
Comments
@angelayi can you help take a look? |
So it seems that EasyDict is not dynamo traceable. |
@angelayi I think EasyDIct is from here https://github.com/makinacorpus/easydict/blob/master/easydict/__init__.py, not sure why it is not traceable |
Does the fact that EasyDict is not dynamo traceable make it impossible to diagnose the problem reported in the traceback log above? I tried using Execution failed with the same error
|
I also tried using
i.e. not using any external library. Execution failed with the same error
|
Assigned to export |
Slightly tangential: curious why you are using this API to capture the graph, as it is a private API (in |
@suo so on executorch side the export flow is, atm:
Before export was able to produce pre-dispatch IR, for the needs to quantization we needed pre-dispatch IR. For the reason 1 was used. In order to not have two different export workflows, for quant and executorch, it was decided that we will have two step API for edge specific export. Step 1 will provide pre-dispatch IR and passes, such as quant, that need pre-dispatch IR can work on it. Later edge will apply decomps/export to produce core-aten IR. 1 was is supposed to be replaced with equivalent export API but @angelayi might know the status. Then we can start replacing 1 with the new export API |
cc @tugsbayasgalan who is working on migrating capture_pre_autograd_graph to torch.export. |
@yanboliang offered to look into the the dynamo coverage issue. Meanwhile @kimishpatel any chance you can use non-strict (i.e., strict=False) to unblock? |
@avikchaudhuri it is coming from call to export from capture_pre_auto_grad. does it support nonstrict? @adonnini can you try that? |
@kimishpatel I added Then, I had the bright idea (not really) to update executorch installation to the latest nightly build (20240209). TRACEBACK LOG
|
I hope that is the case. It should be. Should I wait to hear from @mcr229 with regards to this latest error? Please let me know if there is anything I can/should do. |
Sorry to ask you to create another issue, but we can go back to executorch repo and create issue there and mark this as "unblocked" since we dont have proper solution but have a workaround. If you dont mind doing that, tag @mcr229 on the issue |
No problem at all. I created a new issue in executorch repo, pytorch/executorch#2025 |
Hi, I cloned the main executorch branch ( Ran executorch installation/set-up following the updated instructions in I set then ran the training module for my model including the executorch code. Execution failed once again with Below you will find the tracebak log Please let me know what I should do next to help resolve this problem. Thanks TRACEBACK LOG
|
|
@angelayi I understand. I'll take a look. It should be possible. Is device/dtype support planned? Any idea about the timeline? |
@angelayi I temporarily removed the need to specify the device. Code execution fails producing the traceback log reported below. The error should not have anything to do with the removal of the device as a parameter. Based on my (limited) experience with What do you think? Thanks TRACEBACK LOG
|
@adonnini Just checking, does your model work when you run it eagerly? It's erroring because it says you're passing in a dict as the second argument to torch.embedding when it expects a tensor. |
@angelayi the model works fine when I run it eagerly. In fact, the argument passed in the model is a dict. The model takes in input dataset and a dict as the two input parameters. And, this works without problems when running eagerly. |
@adonnini Sorry, it's not clear to me what's wrong just looking at the errors... Is it possible if you could send a mini repro? |
@angelayi I'll do that. It may take a few days as I need to clean up some of the code and I am in the middle of a couple of other projects. |
@angelayi setting up a mini repo is not going to be as straightforward as I thought because I have a lot of stuff in progress in the code. Would it be possible to work off the original repo of the model at |
@angelayi I know you are very busy. I hope I am not bothering you (too much). Will you be able to take a look at the repo of the model I am using to see if you can gain a better understanding of why The code in question is this:
where
and
and
|
@adonnini Can you share the script you use to export this model? I've cloned the repo but I want to make sure our setup is the same. |
@angelayi You will find the code below. I hope I understood your request correctly. Please let me know if you meant something different.
|
@angelayi Sorry to bother you. I know you are very busy. Did you get a chance to take a look at the repository for the model I am using and my latest note above? |
@angelayi I was able to produce a lowered model using torchscript and load it successfully in my Android app using the pytorch mobile runtime. This is not a solution to this issue as executorch is the runtime environment I need/want to use. I did it to see if there was a problem with the model. I think this test shows that there probably isn't. |
@angelayi did you get a chance to duplicate my set-up and try to reproduce the issue? Please let me know if you need additional information and I can help in any way. Thanks. |
I set up a public repository with a copy of my set-up. Here is a link to the README.MD https://github.com/adonnini/LocationPredictionContextQ/blob/main/README.md Please let me know if you have problems accessing the repository or have any other problems. As I say in the Notes section, please keep in mind that I come from the Java world and am a Python beginner. I hope this helps. Thanks |
@angelayi Here I am bugging you again! Sorry. When do you think you will have a chance to reproduce this error directly using my set-up (in the repository I created)? |
@angelayi Could you please let me know if you will not be able to work on this issue any longer? Thanks |
Hi @adonnini, getting the repro to work is taking longer than expected. If anyone from the ExecuTorch team has bandwidth to take a look and figure out a minimum repro, that would be great! @kimishpatel |
@angelayi I am sorry to hear this. You are having a hard time running the code in my set-up?
Thanks |
@angelayi I re-read your message above. I am not sure I understand what you mean by "figure out a minimum repro". the only script you need to run is |
@angelayi Were you able to make any progress in getting the repro to work? As you mentioned more than one month ago, you were having problems. |
@anijain2305 Hi do the changes you made to the issue three days ago mean that nobody will be working on its resolution any longer? |
@adonnini No, I was just doing a triage of open Dynamo issues. This is an export issue, so removed the Dynamo tags. But I think you should look at this comment - #122340 (comment) This other issue seems very relevant to this one. |
@anijain2305 Thanks. I took a look at the comment you reference above. After making all the changes suggested by your colleagues, the traceback produced when I run the code has changed to the one you will find below. Could you please let me know why you think the comment you referenced is relevant and what you think I should do next? Please let me know if you need anything from me. Thanks TRACEBACK LOG
CODE
|
@anijain2305 I changed the export statement from
to
(I did not include the kwargs parameter as it is not relevant in my model)
TRACEBACK LOG
|
@anijain2305 Sorry to bother you again. I have been waiting for the resolution of this issue for a few months now. Please let me know what I should do next. |
Hi,
I am trying run for inference another model on an android device using executorch. Execution fails with a
torch._dynamo.exc.Unsupported: call_function args: UserDefinedObjectVariable(EasyDict)
error.
Below, you will find the relevant portion of the traceback log.
The model I am trying to process is largely based on this model
https://github.com/mie-lab/location-prediction/tree/main
I did not modify the modules involved in the execution error.
I re-ran the code using
The log and traceback log produced are ver long. Please let me know if you want me to post them.
Please let me know if you need additional information.
Thanks
TRACEBACK LOG
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @avikchaudhuri @gmagogsfm @zhxchen17 @tugsbayasgalan @angelayi @suo @ydwu4 @aakhundov
The text was updated successfully, but these errors were encountered: