Skip to content
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

builtins.AssertionError: Unresolvable type None #1269

Closed
flytair opened this issue Dec 5, 2020 · 6 comments · Fixed by #2661
Closed

builtins.AssertionError: Unresolvable type None #1269

flytair opened this issue Dec 5, 2020 · 6 comments · Fixed by #2661

Comments

@flytair
Copy link

flytair commented Dec 5, 2020

hi,
when i run static_quantization_tutorial.py, it assert error at:

torch.jit.save(torch.jit.script(per_channel_quantized_model), saved_model_dir + scripted_quantized_model_file)

the error message is:
assert base is not None, "Unresolvable type {}".format(expr[:i])
builtins.AssertionError: Unresolvable type None

cc @jerryzh168 @jianyuh @sekyondaMeta @svekars @carljparker @NicolasHug @kit1980 @subramen

@holly1238 holly1238 added the quantization Issues relating to quantization tutorials label Jul 27, 2021
@svekars svekars added medium docathon-h1-2023 A label for the docathon in H1 2023 labels May 31, 2023
@Samsonboadi
Copy link
Contributor

/assigntome

@svekars
Copy link
Contributor

svekars commented Jun 5, 2023

The .py file was replaced with the .rst file in the repo: https://github.com/pytorch/tutorials/blob/main/advanced_source/static_quantization_tutorial.rst. Please fix the issue in the .rst file rather than in the .py file. Please test locally that your solution works before submitting.

@svekars
Copy link
Contributor

svekars commented Oct 24, 2023

This issue has been unassigned due to inactivity. If you are still planning to work on this, you can still send a PR referencing this issue.

@svekars svekars added docathon-h2-2023 and removed docathon-h1-2023 A label for the docathon in H1 2023 labels Oct 30, 2023
@bjhargrave
Copy link
Contributor

/assigntome

@svekars
Copy link
Contributor

svekars commented Nov 7, 2023

This issue has been unassigned due to inactivity. If you are working on this issue, assign it to yourself and send a PR ASAP.

@bjhargrave
Copy link
Contributor

/assigntome

bjhargrave added a commit to bjhargrave/pytorch-tutorials that referenced this issue Nov 7, 2023
The model must be in eval mode to fuse and in train mode to
prepare_qat. After this fix, the tutorial runs to completion on a
linux x86 system.

Fixes pytorch#1269

Signed-off-by: BJ Hargrave <hargrave@us.ibm.com>
@svekars svekars added module: quantization and removed quantization Issues relating to quantization tutorials labels Nov 7, 2023
bjhargrave added a commit to bjhargrave/pytorch-tutorials that referenced this issue Nov 8, 2023
We need to use the qat variant of the fuse_modules method.
After this fix, the tutorial runs to completion on a
linux x86 system.

Fixes pytorch#1269

Signed-off-by: BJ Hargrave <hargrave@us.ibm.com>
svekars added a commit that referenced this issue Nov 9, 2023
We need to use the qat variant of the fuse_modules method.
After this fix, the tutorial runs to completion on a
linux x86 system.

Fixes #1269

Signed-off-by: BJ Hargrave <hargrave@us.ibm.com>
Co-authored-by: Svetlana Karslioglu <svekars@meta.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment