Skip to content

[export] Update schema version#115712

Closed
angelayi wants to merge 1 commit intomainfrom
angelayi/schema_version1
Closed

[export] Update schema version#115712
angelayi wants to merge 1 commit intomainfrom
angelayi/schema_version1

Conversation

@angelayi
Copy link
Copy Markdown
Contributor

@angelayi angelayi commented Dec 12, 2023

Since pytorch 2.1 release we've made some BC breaking changes to the serialized schema. We should update it in time for the 2.2 release. Some of the changes include:

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Dec 12, 2023

🔗 Helpful Links

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

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

✅ You can merge normally! (1 Unrelated Failure)

As of commit 79f299e with merge base e918461 (image):

FLAKY - The following job failed but was likely due to flakiness present on trunk:

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


# NOTE: Please update this value if any modifications are made to the schema
SCHEMA_VERSION = 1
SCHEMA_VERSION = 2
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not blocking: should we add comment here describing what is changed? In general, whenever there is the version update, there should be some sort of doc or tracker?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ooh. I'm not sure what should be done during a version bump. I can add it to this PR and make sure it's in the release notes?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we paste it in the code as comment as well?

@zhxchen17
Copy link
Copy Markdown
Contributor

@angelayi considering export is still before alpha release, should we keep it 0? I feel it's rather confusing to see this to be bumped right now.

@angelayi
Copy link
Copy Markdown
Contributor Author

angelayi commented Dec 13, 2023

@zhxchen17 I think export is at alpha release, so it's up to us how we want to do versioning. From a user's pov, the schema changed between 2.1 and 2.2 release, which is why I think we should bump the schema to show this change.
It seems your opinion is that we should bump the version when export gets to beta/actual release.
And I think @gmagogsfm 's opinion is that we should start maintaining BC now, and add back in logic that allows loading the schema from 2.1.

@zhxchen17
Copy link
Copy Markdown
Contributor

@zhxchen17 I think export is at alpha release, so it's up to us how we want to do versioning. From a user's pov, the schema changed between 2.1 and 2.2 release, which is why I think we should bump the schema to show this change. It seems your opinion is that we should bump the version when export gets to beta/actual release. And I think @gmagogsfm 's opinion is that we should start maintaining BC now, and add back in logic that allows loading the schema from 2.1.

well if there's no major user of the schema in real life, I'd rather make the breaking change than taking the cost to maintain it.

Also I'm not sure we're at alpha release really:

Screenshot 2023-12-13 at 12 52 50 PM

@angelayi
Copy link
Copy Markdown
Contributor Author

Is alpha != prototype?

@gmagogsfm
Copy link
Copy Markdown
Contributor

Alpha == Prototype, but Alpha is still open sourced, so we need more guarantee than private prototype. It is debatable whether we want to take on the responsibility of maintaining BC-safe loader since it involves additional eng work. But I think it is a bare minimum for us to update schema version per PyTorch release since we have breaking changes. @zhxchen17 thoughts?

@angelayi
Copy link
Copy Markdown
Contributor Author

@pytorchbot merge

@pytorch-bot pytorch-bot Bot added the ciflow/trunk Trigger trunk jobs on your pull request label Dec 15, 2023
@pytorchmergebot
Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

angelayi added a commit that referenced this pull request Dec 15, 2023
Since pytorch 2.1 release we've made some BC breaking changes to the serialized schema. We should update it in time for the 2.2 release. Some of the changes include:

* #114371 - custom class objects / pybinded objects are no longer saved directly to the `ExportedProgram` structure. Instead, the name is serialized inside of the program, and the actual bytes are stored. in a separate location from the exported program, allowing it to be saved to a different location.
* #111204 - `GraphSignature` structure changed and `call_spec` is removed from the `GraphModule` schema
* #111407 - `loss_outout` -> `loss_output`
* #113075 - `example_inputs` removed from the `ExportedProgram` structure (this originally did not store anything), `dialect` added to the `ExportedProgram` structure.
* #113689 - tensor constants are now lifted as inputs to the graph, and their locations are stored in the `GraphSignature`
* #114172 - removed `equality_constraints` and added a `SymExprHint` for all symbolic expressions.
Pull Request resolved: #115712
Approved by: https://github.com/gmagogsfm
guilhermeleobas pushed a commit to guilhermeleobas/pytorch that referenced this pull request Dec 18, 2023
Since pytorch 2.1 release we've made some BC breaking changes to the serialized schema. We should update it in time for the 2.2 release. Some of the changes include:

* pytorch#114371 - custom class objects / pybinded objects are no longer saved directly to the `ExportedProgram` structure. Instead, the name is serialized inside of the program, and the actual bytes are stored. in a separate location from the exported program, allowing it to be saved to a different location.
* pytorch#111204 - `GraphSignature` structure changed and `call_spec` is removed from the `GraphModule` schema
* pytorch#111407 - `loss_outout` -> `loss_output`
* pytorch#113075 - `example_inputs` removed from the `ExportedProgram` structure (this originally did not store anything), `dialect` added to the `ExportedProgram` structure.
* pytorch#113689 - tensor constants are now lifted as inputs to the graph, and their locations are stored in the `GraphSignature`
* pytorch#114172 - removed `equality_constraints` and added a `SymExprHint` for all symbolic expressions.
Pull Request resolved: pytorch#115712
Approved by: https://github.com/gmagogsfm
malfet pushed a commit that referenced this pull request Dec 18, 2023
Since pytorch 2.1 release we've made some BC breaking changes to the serialized schema. We should update it in time for the 2.2 release. Some of the changes include:

* #114371 - custom class objects / pybinded objects are no longer saved directly to the `ExportedProgram` structure. Instead, the name is serialized inside of the program, and the actual bytes are stored. in a separate location from the exported program, allowing it to be saved to a different location.
* #111204 - `GraphSignature` structure changed and `call_spec` is removed from the `GraphModule` schema
* #111407 - `loss_outout` -> `loss_output`
* #113075 - `example_inputs` removed from the `ExportedProgram` structure (this originally did not store anything), `dialect` added to the `ExportedProgram` structure.
* #113689 - tensor constants are now lifted as inputs to the graph, and their locations are stored in the `GraphSignature`
* #114172 - removed `equality_constraints` and added a `SymExprHint` for all symbolic expressions.
Pull Request resolved: #115712
Approved by: https://github.com/gmagogsfm
dmenig pushed a commit to dmenig/pytorch that referenced this pull request Dec 21, 2023
Since pytorch 2.1 release we've made some BC breaking changes to the serialized schema. We should update it in time for the 2.2 release. Some of the changes include:

* pytorch#114371 - custom class objects / pybinded objects are no longer saved directly to the `ExportedProgram` structure. Instead, the name is serialized inside of the program, and the actual bytes are stored. in a separate location from the exported program, allowing it to be saved to a different location.
* pytorch#111204 - `GraphSignature` structure changed and `call_spec` is removed from the `GraphModule` schema
* pytorch#111407 - `loss_outout` -> `loss_output`
* pytorch#113075 - `example_inputs` removed from the `ExportedProgram` structure (this originally did not store anything), `dialect` added to the `ExportedProgram` structure.
* pytorch#113689 - tensor constants are now lifted as inputs to the graph, and their locations are stored in the `GraphSignature`
* pytorch#114172 - removed `equality_constraints` and added a `SymExprHint` for all symbolic expressions.
Pull Request resolved: pytorch#115712
Approved by: https://github.com/gmagogsfm
@github-actions github-actions Bot deleted the angelayi/schema_version1 branch February 19, 2024 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants