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

Log EValue tag names instead of numeric values #7538

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

GregoryComer
Copy link
Member

Summary:
Update error log messages that include EValue tags to use a string representation of the tag rather than the numerical index. This improves readability for users.

Example Old Message:

[method.cpp:814] The 0-th input of method should have the same type as the input_evalue, but get tag 1 and tag 4

Example New Message:

[method.cpp:813] Input 0 was expected to be Tensor but was Int.

Differential Revision: D67888756

Copy link

pytorch-bot bot commented Jan 7, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/7538

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure

As of commit aa81d29 with merge base 91f09aa (image):

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 7, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67888756

@facebook-github-bot
Copy link
Contributor

@GregoryComer has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

GregoryComer added a commit to GregoryComer/executorch that referenced this pull request Jan 19, 2025
Summary:
Update error log messages that include EValue tags to use a string representation of the tag rather than the numerical index. This improves readability for users.

Example Old Message:
```
[method.cpp:814] The 0-th input of method should have the same type as the input_evalue, but get tag 1 and tag 4
```

Example New Message:
```
[method.cpp:813] Input 0 was expected to be Tensor but was Int.
```


Test Plan:
Locally built the executorch bento kernel and tested with an invalid EValue input to capture the example new message above. Repeated with "-c executorch.enable_enum_strings=false" to verify fallback behavior.

Added tests for `tag_to_string` to tag_test.cpp, runnable via
```
buck test executorch/runtime/core/test:tag_test
```

Reviewed By: digantdesai, manuelcandales

Differential Revision: D67888756

Pulled By: GregoryComer
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67888756

1 similar comment
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67888756

GregoryComer added a commit to GregoryComer/executorch that referenced this pull request Jan 21, 2025
Summary:
Update error log messages that include EValue tags to use a string representation of the tag rather than the numerical index. This improves readability for users.

Example Old Message:
```
[method.cpp:814] The 0-th input of method should have the same type as the input_evalue, but get tag 1 and tag 4
```

Example New Message:
```
[method.cpp:813] Input 0 was expected to be Tensor but was Int.
```

Pull Request resolved: pytorch#7538

Test Plan:
Locally built the executorch bento kernel and tested with an invalid EValue input to capture the example new message above. Repeated with "-c executorch.enable_enum_strings=false" to verify fallback behavior.

Added tests for `tag_to_string` to tag_test.cpp, runnable via
```
buck test executorch/runtime/core/test:tag_test
```

Reviewed By: digantdesai, manuelcandales

Differential Revision: D67888756

Pulled By: GregoryComer
GregoryComer added a commit to GregoryComer/executorch that referenced this pull request Jan 21, 2025
Summary:
Update error log messages that include EValue tags to use a string representation of the tag rather than the numerical index. This improves readability for users.

Example Old Message:
```
[method.cpp:814] The 0-th input of method should have the same type as the input_evalue, but get tag 1 and tag 4
```

Example New Message:
```
[method.cpp:813] Input 0 was expected to be Tensor but was Int.
```

Pull Request resolved: pytorch#7538

Test Plan:
Locally built the executorch bento kernel and tested with an invalid EValue input to capture the example new message above. Repeated with "-c executorch.enable_enum_strings=false" to verify fallback behavior.

Added tests for `tag_to_string` to tag_test.cpp, runnable via
```
buck test executorch/runtime/core/test:tag_test
```

Reviewed By: digantdesai, manuelcandales

Differential Revision: D67888756

Pulled By: GregoryComer
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67888756

GregoryComer added a commit to GregoryComer/executorch that referenced this pull request Jan 22, 2025
Summary:
Update error log messages that include EValue tags to use a string representation of the tag rather than the numerical index. This improves readability for users.

Example Old Message:
```
[method.cpp:814] The 0-th input of method should have the same type as the input_evalue, but get tag 1 and tag 4
```

Example New Message:
```
[method.cpp:813] Input 0 was expected to be Tensor but was Int.
```


Test Plan:
Locally built the executorch bento kernel and tested with an invalid EValue input to capture the example new message above. Repeated with "-c executorch.enable_enum_strings=false" to verify fallback behavior.

Added tests for `tag_to_string` to tag_test.cpp, runnable via
```
buck test executorch/runtime/core/test:tag_test
```

Reviewed By: digantdesai, manuelcandales, dbort

Differential Revision: D67888756

Pulled By: GregoryComer
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67888756

GregoryComer added a commit to GregoryComer/executorch that referenced this pull request Jan 22, 2025
Summary:
Update error log messages that include EValue tags to use a string representation of the tag rather than the numerical index. This improves readability for users.

Example Old Message:
```
[method.cpp:814] The 0-th input of method should have the same type as the input_evalue, but get tag 1 and tag 4
```

Example New Message:
```
[method.cpp:813] Input 0 was expected to be Tensor but was Int.
```


Test Plan:
Locally built the executorch bento kernel and tested with an invalid EValue input to capture the example new message above. Repeated with "-c executorch.enable_enum_strings=false" to verify fallback behavior.

Added tests for `tag_to_string` to tag_test.cpp, runnable via
```
buck test executorch/runtime/core/test:tag_test
```

Reviewed By: digantdesai, manuelcandales, dbort

Differential Revision: D67888756

Pulled By: GregoryComer
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67888756

GregoryComer added a commit to GregoryComer/executorch that referenced this pull request Jan 22, 2025
Summary:
Update error log messages that include EValue tags to use a string representation of the tag rather than the numerical index. This improves readability for users.

Example Old Message:
```
[method.cpp:814] The 0-th input of method should have the same type as the input_evalue, but get tag 1 and tag 4
```

Example New Message:
```
[method.cpp:813] Input 0 was expected to be Tensor but was Int.
```


Test Plan:
Locally built the executorch bento kernel and tested with an invalid EValue input to capture the example new message above. Repeated with "-c executorch.enable_enum_strings=false" to verify fallback behavior.

Added tests for `tag_to_string` to tag_test.cpp, runnable via
```
buck test executorch/runtime/core/test:tag_test
```

Reviewed By: digantdesai, manuelcandales, dbort

Differential Revision: D67888756

Pulled By: GregoryComer
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67888756

Summary:
Update error log messages that include EValue tags to use a string representation of the tag rather than the numerical index. This improves readability for users.

Example Old Message:
```
[method.cpp:814] The 0-th input of method should have the same type as the input_evalue, but get tag 1 and tag 4
```

Example New Message:
```
[method.cpp:813] Input 0 was expected to be Tensor but was Int.
```


Test Plan:
Locally built the executorch bento kernel and tested with an invalid EValue input to capture the example new message above. Repeated with "-c executorch.enable_enum_strings=false" to verify fallback behavior.

Added tests for `tag_to_string` to tag_test.cpp, runnable via
```
buck test executorch/runtime/core/test:tag_test
```

Reviewed By: digantdesai, manuelcandales, dbort

Differential Revision: D67888756

Pulled By: GregoryComer
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67888756

@facebook-github-bot facebook-github-bot merged commit 02da069 into pytorch:main Jan 22, 2025
45 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported release notes: misc Miscellaneous
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants