Giter Club home page Giter Club logo

Comments (5)

fabvio avatar fabvio commented on May 16, 2024 1

Got it! Ok, it's all I could desire about checkpointing ahah.
I'll close the issue.

from labml.

fabvio avatar fabvio commented on May 16, 2024

I also opened a pull request to show what I mean. Obviously you designed this and you'll know way better than me what's going on under the hood, so I may not see every problem that comes with my approach. What do you think?

from labml.

vpj avatar vpj commented on May 16, 2024

Hey, thanks for raising this and the pull request. Your approach makes perfect sense.

The decision to save to numpy was done way back when lab was for Tensorflow, and I left it when we added PyTorch support and later dropped Tensorflow support (because none of the lab users seemed to be using Tensorflow).

I have personally being resetting optimizers (to save checkpoint sizes and because it didn't have a huge effect on the tasks I was working on) so I didn't come across this problem yet. Saving as state_dict directly is both simpler and probably future proof to any changes PyTorch might make too.

I'll merge you request, ASAP. I just want to add some backward compatibility to load back old checkpoints saved in numpy formats. I will close the issue once we merge it.

Thanks again

from labml.

fabvio avatar fabvio commented on May 16, 2024

Great! In the checkpoint saving it could be needed to load also the current epoch/iteration. I think it could be saved in the .json file, but I don't know which could be the best practise to load that if we want to resume an interrupted training. Do you have anything in mind?

from labml.

vpj avatar vpj commented on May 16, 2024

Right now it picks the global step from the checkpoint. The checkpoint folder name is the step at which it was saved

from labml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.