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

Fix SaveNNMixin to work on torch-1.13 and torch-2.0 #32

Closed
Mr-Geekman opened this issue Aug 14, 2023 · 0 comments · Fixed by #98
Closed

Fix SaveNNMixin to work on torch-1.13 and torch-2.0 #32

Mr-Geekman opened this issue Aug 14, 2023 · 0 comments · Fixed by #98
Assignees
Labels
enhancement New feature or request priority/high High priority task

Comments

@Mr-Geekman
Copy link

Issue by Mr-Geekman
Thursday May 25, 2023 at 14:09 GMT
Originally opened as tinkoff-ai#1271


🚀 Feature Request

It seems like the only thing that stops us from updating torch is saving on disk. We should fix this by changing SaveNNMixin.

Using cloudpickle fixes the issue only for torch-1.13, but it doesn't work on torch-2.0.

Proposal

The goal is to fix SaveNNMixin to work with new torch versions.

We should try to use state_dict for saving, not saving the whole object with pickle/dill/cloudpickle. Probably, it will be useful to separate state of the object into torch nn and other components. Class etna.pipeline.mixins.SaveModelPipelineMixin can be useful as a reference of how it can be done.

After doing the task the requirement on torch should be weakened to include 1.13 and 2.0 versions.

Test cases

  • Fix existing tests
  • Check manually that on torch-1.13 and torch-2.0 tests.test_models.nn are working

Additional context

No response

@Mr-Geekman Mr-Geekman added enhancement New feature or request priority/high High priority task labels Aug 14, 2023
@Mr-Geekman Mr-Geekman moved this to Todo in etna board Aug 15, 2023
@d-a-bunin d-a-bunin self-assigned this Oct 3, 2023
@d-a-bunin d-a-bunin moved this from Todo to In Progress in etna board Oct 3, 2023
@d-a-bunin d-a-bunin moved this from In Progress to In Review in etna board Oct 4, 2023
@github-project-automation github-project-automation bot moved this from In Review to Done in etna board Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority/high High priority task
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants