-
Notifications
You must be signed in to change notification settings - Fork 607
Update schema to include infinity for double values #5203
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/5203
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit ac31049 with merge base 7650667 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This pull request was exported from Phabricator. Differential Revision: D62393242 |
This pull request was exported from Phabricator. Differential Revision: D62393242 |
5db96fb
to
0f92498
Compare
Summary: Pull Request resolved: pytorch#5203 Replace previous solution of parsing the json and replacing instances of "Infinity" with "inf" Differential Revision: D62393242
This pull request was exported from Phabricator. Differential Revision: D62393242 |
Summary: Pull Request resolved: pytorch#5203 Replace previous solution of parsing the json and replacing instances of "Infinity" with "inf" Differential Revision: D62393242
0f92498
to
bb69dab
Compare
This pull request was exported from Phabricator. Differential Revision: D62393242 |
Summary: Pull Request resolved: pytorch#5203 Replace previous solution of parsing the json and replacing instances of "Infinity" with "inf" Deserialization process: 1. Convert flatbuffer to json, using program.fbs. Program.fbs doesn't have the Union double type (only schema.py); use regex to replace instances of `-inf` to `"-inf"`. 2. Convert json to dataclasses. Add support for Union double type here. Differential Revision: D62393242
ed081c0
to
fd48e5e
Compare
Summary: Pull Request resolved: pytorch#5203 Replace previous solution of parsing the json and replacing instances of "Infinity" with "inf" Serialization: 1. Program is created using schema.py dataclasses in emitter. Add default constructors (`__init__`), so that all constructions of Double are either float, or string for infinity values. Deserialization process: 1. Convert flatbuffer to json, using program.fbs. Program.fbs doesn't have the Union double type (only schema.py); use regex to replace instances of `-inf` to `"-inf"`. 2. Convert json to dataclasses. Add support for Union double type here. Differential Revision: D62393242
This pull request was exported from Phabricator. Differential Revision: D62393242 |
Summary: Pull Request resolved: pytorch#5203 Replace previous solution of parsing the json and replacing instances of "Infinity" with "inf" Serialization: 1. Python dataclasses --> JSON --> flatbuffer. 2. Convert Double inside schema.py to a union value of float and string, so that there is valid JSON when we convert dataclasses --> JSON. 2. Program is created using schema.py dataclasses in emitter. Add default constructors (`__init__`), so that all constructions of Double are either float, or string for infinity values. 3. Note: `program.fbs` remains unchanged. Deserialization process: 1. Flatbuffer --> JSON --> python dataclasses. 2. Flatbuffer is converted to JSON using `program.fbs`, which does not have the Union double definition. Use regex to replace instances of `-inf` to `"-inf"` so that there is valid JSON. 3. Add support for Union double type for the conversion from JSON to python dataclasses Differential Revision: D62393242
This pull request was exported from Phabricator. Differential Revision: D62393242 |
fd48e5e
to
ac31049
Compare
Summary: Replace previous solution of parsing the json and replacing instances of "Infinity" with "inf"
Differential Revision: D62393242