Replies: 1 comment
-
Hey, great points/questions! Let me break it down for both. Question 1 As you mentioned, the current approach separates the concerns. Configuration (min_lr, max_lr, num_iters) is treated as immutable hyperparameters, while state (current_iter) is the actual state (evolving). I can see the benefit of a self-contained record, but I also think it might lead to conflicting state if configs differ between training runs and the checkpointed values are restored. How should we handle a discrepancy if the config does not match the loaded values? Seems like a similar problem, and in such a trade-off I might prefer the current separation of concerns. Definitely opened to suggestions! Question 2 The |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Question 1
I noticed that when saving and loading learning rate schedulers, only the mutable state (e.g., current_iter) is persisted. For example:
The current implementation of
to_record
andload_record
only serializescurrent_iter
:This works, but I wonder if it might be more robust and self-contained to serialize the full scheduler state, including configuration fields like min_lr, max_lr, and num_iters. This would:
Self-descriptive
Avoid dependency
Question 2
Would it be possible (or desirable) to use the serde library directly for saving and loading scheduler states, instead of manually defining Record types and implementing to_record / load_record?
This could significantly reduce boilerplate and improve flexibility.
Thanks!
-Lucian
Beta Was this translation helpful? Give feedback.
All reactions