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

Error message missing format string specifier #435

Closed
GregoryComer opened this issue Jun 25, 2024 · 0 comments · Fixed by #441
Closed

Error message missing format string specifier #435

GregoryComer opened this issue Jun 25, 2024 · 0 comments · Fixed by #441

Comments

@GregoryComer
Copy link
Member

Exception messages appear to be intended to be format strings but are not. This leads to variable specifiers in the raised error message.

File ~/.local/lib/python3.10/site-packages/torchao/quantization/utils.py:126, in guard_dtype_size(tensor_arg, arg_name, dtype, size)
    124 def guard_dtype_size(tensor_arg, arg_name, dtype=None, size=None):
    125     if dtype is not None and tensor_arg.dtype != dtype:
--> 126         raise ValueError("Expected Tensor argument {arg_name} to have dtype {dtype}, but got {tensor_arg.dtype} instead.")
    127     if size is not None and tensor_arg.size() != size:
    128         raise ValueError("Expected Tensor argument {arg_name} to have size {size}, but got {tensor_arg.size()} instead.")

ValueError: Expected Tensor argument {arg_name} to have dtype {dtype}, but got {tensor_arg.dtype} instead.
yanbing-j pushed a commit to yanbing-j/ao that referenced this issue Dec 9, 2024
* Add support for tiktoken and refactored runner structure

Summary:

Unified runner and move runner-et/CMakeLists.txt to runner/et.cmake and
runner-aoti/CMakeLists.txt to runner/aoti.cmake.

Added a root level CMakeLists.txt to build a tokenizer library and link
to both targets separately.

In CLI we need to specify the target to run:

```
cmake --build ./cmake-out --target et_run/aoti_run
```

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

* Fix CI

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

* Fix more CI

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

* Further fix CI

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

* Lint`

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

* Update build_android.sh

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

* Rebase

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

* Fix cmake commands in CI job

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant