You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FixesDLR-RM#2115. Avoid segmentation fault when loading models with non-portable schedules
Previously, using closures (e.g., lambdas) for learning_rate or clip_range caused
segmentation faults when loading models across different platforms (e.g., macOS to Linux), because cloudpickle could not safely serialize/deserialize them.
This commit rewrites:
- `constant_fn` as a `ConstantSchedule` class
- `get_schedule_fn` as a `ScheduleWrapper` class
- `get_linear_fn` as a `LinearSchedule` class
All schedules are now proper callable classes, making them portable and safely pickleable.
Old functions are kept (marked as deprecated) for backward compatibility when loading
existing models.
0 commit comments