https://github.com/serezd/scheduling_utils
https://github.com/serezd/scheduling_utils
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/serezd/scheduling_utils
- Owner: SerezD
- License: mit
- Created: 2023-02-03T09:14:25.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-11-21T12:49:54.000Z (over 1 year ago)
- Last Synced: 2025-01-22T22:30:40.775Z (4 months ago)
- Language: Python
- Size: 130 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LR Schedulers with C++ extensions
Implements some LR scheduling functions to decay or ramp values across timestamps.
### Install
Install with: `pip install scheduling_utils`### Usage
Each scheduler is available with full python code or c++ code
([ctypes](https://docs.python.org/3/library/ctypes.html) is used for binding)
wrapped into python classes.
To initialize and use for example a cosine scheduler, do the following:```
# import the c++ cosine scheduler
from schedulers_cpp import CosineScheduler# use this to use the full python version
# from schedulers import CosineSchedulerstart_step = 0
stop_step = 10start_value = 5
stop_value = 20scheduler = CosineScheduler(start_step, stop_step, start_value, stop_value)
# get values corresponding to step
for step in range(10):
value = scheduler.step(step)
```### Available Schedulers
Available Schedulers at current version:
- Linear:
- Cosine:

- LinearCosine:
