Skip to content

Conversation

@Borda
Copy link
Collaborator

@Borda Borda commented Jan 11, 2021

What does this PR do?

adding some more legacy checkpoints, followup on #5223

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review

Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified
  • Check that target branch and milestone match!

Did you have fun?

Make sure you had fun coding 🙃

@Borda Borda added feature Is an improvement or enhancement ci Continuous Integration labels Jan 11, 2021
@Borda Borda added this to the 1.1.x milestone Jan 11, 2021
@Borda Borda marked this pull request as ready for review January 11, 2021 09:18
@Borda Borda self-assigned this Jan 11, 2021
@Borda Borda added the priority: 1 Medium priority task label Jan 11, 2021
@codecov
Copy link

codecov bot commented Jan 11, 2021

Codecov Report

Merging #5457 (0f5d2ca) into master (499d503) will decrease coverage by 0%.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           master   #5457   +/-   ##
======================================
- Coverage      93%     93%   -0%     
======================================
  Files         135     135           
  Lines       10011   10011           
======================================
- Hits         9324    9317    -7     
- Misses        687     694    +7     

@Borda
Copy link
Collaborator Author

Borda commented Jan 11, 2021

well not sure why the newly added ckpt fails, locally it works fine...

@Borda Borda changed the title populate some more legacy checkpoints populate some more legacy checkpoints [wip] Jan 11, 2021
@Borda
Copy link
Collaborator Author

Borda commented Jan 11, 2021

seems that there is a problem with PT, as the same files can be loaded in 1.5 1.6 1.7 but not in 1.4
and it includes also the later PL versions such as 1.1.3

FAILED tests/checkpointing/test_legacy_checkpoints.py::test_resume_legacy_checkpoints[0.8.3]
FAILED tests/checkpointing/test_legacy_checkpoints.py::test_resume_legacy_checkpoints[0.8.4]
FAILED tests/checkpointing/test_legacy_checkpoints.py::test_resume_legacy_checkpoints[0.8.5]
FAILED tests/checkpointing/test_legacy_checkpoints.py::test_resume_legacy_checkpoints[0.9.0]
FAILED tests/checkpointing/test_legacy_checkpoints.py::test_resume_legacy_checkpoints[1.0.8]
FAILED tests/checkpointing/test_legacy_checkpoints.py::test_resume_legacy_checkpoints[1.1.0]
FAILED tests/checkpointing/test_legacy_checkpoints.py::test_resume_legacy_checkpoints[1.1.1]
FAILED tests/checkpointing/test_legacy_checkpoints.py::test_resume_legacy_checkpoints[1.1.2]
FAILED tests/checkpointing/test_legacy_checkpoints.py::test_resume_legacy_checkpoints[1.1.3]

@carmocca
Copy link
Contributor

seems that there is a problem with PT, as the same files can be loaded in 1.5 1.6 1.7 but not in 1.4
and it includes also the later PL versions such as 1.1.3

what's the error?

@Borda
Copy link
Collaborator Author

Borda commented Jan 11, 2021

seems that there is a problem with PT, as the same files can be loaded in 1.5 1.6 1.7 but not in 1.4 and it includes also the later PL versions such as 1.1.3

what's the error?

PT somehow states that the ckpt is an archive...

      if _is_zipfile(f):
          # .zip is used for torch.jit.save and will throw an un-pickling error here
>         raise RuntimeError("{} is a zip archive (did you mean to use torch.jit.load()?)".format(f.name))
E         RuntimeError: /home/runner/work/pytorch-lightning/pytorch-lightning/legacy/checkpoints/1.1.3/epoch=4-step=319.ckpt is a zip archive (did you mean to use torch.jit.load()?)

@Borda
Copy link
Collaborator Author

Borda commented Jan 11, 2021

this seems to be very similart issue:

so the problem is that we cannot save checkpoints with and load with lover version, the breaking change is in 1.7 so for creating legacy checkpoints we have to use the lowest supported version...

@Borda Borda changed the title populate some more legacy checkpoints [wip] populate some more legacy checkpoints Jan 11, 2021
@Borda Borda requested a review from carmocca January 11, 2021 19:40
@Borda Borda added the ready PRs ready to be merged label Jan 11, 2021
@Borda
Copy link
Collaborator Author

Borda commented Jan 11, 2021

ok, seems that there is some problem with v0.8.5 and v0.9.0 so I would leave it for another PR...
eventually, we may consider making some workaround to transform archive to loadable format or use torch.jit

@Borda Borda enabled auto-merge (squash) January 11, 2021 20:27
@Borda Borda disabled auto-merge January 11, 2021 20:38
@Borda Borda enabled auto-merge (squash) January 11, 2021 20:44
@Borda Borda merged commit f065ea6 into master Jan 12, 2021
@Borda Borda deleted the tests/populate-legacy-ckpt branch January 12, 2021 01:36
SeanNaren pushed a commit that referenced this pull request Jan 12, 2021
* populate some more legacy checkpoints

* .

* pt freeze

* .

* skip

Co-authored-by: chaton <[email protected]>
(cherry picked from commit f065ea6)
SeanNaren pushed a commit that referenced this pull request Jan 12, 2021
* populate some more legacy checkpoints

* .

* pt freeze

* .

* skip

Co-authored-by: chaton <[email protected]>
(cherry picked from commit f065ea6)
SeanNaren pushed a commit that referenced this pull request Jan 13, 2021
* populate some more legacy checkpoints

* .

* pt freeze

* .

* skip

Co-authored-by: chaton <[email protected]>
(cherry picked from commit f065ea6)
SeanNaren pushed a commit that referenced this pull request Jan 13, 2021
* populate some more legacy checkpoints

* .

* pt freeze

* .

* skip

Co-authored-by: chaton <[email protected]>
(cherry picked from commit f065ea6)
SeanNaren pushed a commit that referenced this pull request Jan 19, 2021
* populate some more legacy checkpoints

* .

* pt freeze

* .

* skip

Co-authored-by: chaton <[email protected]>
(cherry picked from commit f065ea6)
Borda added a commit that referenced this pull request Jan 23, 2021
* populate some more legacy checkpoints

* .

* pt freeze

* .

* skip

Co-authored-by: chaton <[email protected]>
(cherry picked from commit f065ea6)
Borda added a commit that referenced this pull request Jan 25, 2021
* populate some more legacy checkpoints

* .

* pt freeze

* .

* skip

Co-authored-by: chaton <[email protected]>
(cherry picked from commit f065ea6)
Borda added a commit that referenced this pull request Jan 26, 2021
* populate some more legacy checkpoints

* .

* pt freeze

* .

* skip

Co-authored-by: chaton <[email protected]>
(cherry picked from commit f065ea6)
Borda added a commit that referenced this pull request Jan 26, 2021
* populate some more legacy checkpoints

* .

* pt freeze

* .

* skip

Co-authored-by: chaton <[email protected]>
(cherry picked from commit f065ea6)
Borda added a commit that referenced this pull request Jan 26, 2021
* populate some more legacy checkpoints

* .

* pt freeze

* .

* skip

Co-authored-by: chaton <[email protected]>
(cherry picked from commit f065ea6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continuous Integration feature Is an improvement or enhancement priority: 1 Medium priority task ready PRs ready to be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants