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

Simplify PyTorchPredictor serde #2965

Merged
merged 4 commits into from
Aug 17, 2023

Conversation

lostella
Copy link
Contributor

Description of changes: Simplify the serialization format for PyTorchPredictor. Piggy-backing on the recursive definition of encode and decode here, this PR removes the need for dedicated file encoding the network and the input transform: these can be stored directly together with the rest of the constructor parameters.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Please tag this pr with at least one of these labels to make our release process faster: BREAKING, new feature, bug fix, other change, dev setup

@lostella lostella added enhancement New feature or request BREAKING This is a breaking change (one of pr required labels) labels Aug 15, 2023
@lostella lostella requested a review from jaheba August 15, 2023 20:23
@lostella
Copy link
Contributor Author

lostella commented Aug 15, 2023

Alternatively, one could base PyTorchPredictor on RepresentablePredictor and get serde (and __eq__) for free, at the cost of having to make the constructor @validated.

@lostella lostella force-pushed the simplify-predictor-serde branch 2 times, most recently from 38dab74 to d979bd7 Compare August 16, 2023 08:14
@lostella lostella marked this pull request as ready for review August 16, 2023 08:24
@lostella lostella merged commit 43e78d3 into awslabs:dev Aug 17, 2023
21 checks passed
@lostella lostella deleted the simplify-predictor-serde branch August 17, 2023 13:47
@lostella lostella added the torch This concerns the PyTorch side of GluonTS label Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BREAKING This is a breaking change (one of pr required labels) enhancement New feature or request torch This concerns the PyTorch side of GluonTS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants