huggingface / huggingface/pytorch-image-models

[FEATURE] Saving the 'epoch' argument in schedulers

Open
#909 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
37.1k
Forks
5.2k
Avg merge
1d 11h
Merged PRs (30d)
37

Description

You have developed great schedulers in timm. One thing that makes them a bit challenging to integrate with usual pytorch pipelines and lightning is the 'epoch' argument in the 'step' method. Pytorch saves the last step as an internal argument so calling the 'step' will automatically go one step further.

I understand that there are so many use cases that you might want to resume training from a certain start point. So, I suggest having an internal record of the epoch argument, and if the user wants to override it that can pass their intended epoch number.

If you want I can work on a PR.

Contributor guide

Open the contributing guide

Research direction

The issue names no files or tests; start by locating the scheduler step methods and their existing resume or state-handling logic. Compare how the epoch argument is currently used, then verify that an internally saved epoch advances automatically while an explicitly supplied epoch overrides it.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.