Skip to main content

implementation of LR scheduling functions in c++, binded using ctypes

Project description

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 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 CosineScheduler

start_step = 0
stop_step = 10

start_value = 5
stop_value = 20

scheduler = 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:

    linear-ramp linear-decay

  • Cosine:

    cosine-ramp cosine-decay

  • LinearCosine:

    linear-cosine

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scheduling_utils-0.2.3.tar.gz (536.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scheduling_utils-0.2.3-py3-none-any.whl (465.0 kB view details)

Uploaded Python 3

File details

Details for the file scheduling_utils-0.2.3.tar.gz.

File metadata

  • Download URL: scheduling_utils-0.2.3.tar.gz
  • Upload date:
  • Size: 536.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for scheduling_utils-0.2.3.tar.gz
Algorithm Hash digest
SHA256 6d933ce8e370499cefba71d85a203282f73b8fa31300407528f0e7e06c34d156
MD5 83d8dbf09e7ab3b3cc701b9cd7eaf393
BLAKE2b-256 cb62ee0297b9f4f14d3c8cc282f7eeb4ffd43c6e95d86236992e7bdf37a9dadf

See more details on using hashes here.

File details

Details for the file scheduling_utils-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for scheduling_utils-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 59c9d87d1c5ec4d71292d89a6facdcc09d4efb966cefb07dbb3f086d943962c9
MD5 fa25522c14f4736e3bc511e8a0f2f16f
BLAKE2b-256 f06a05c5601ea6c78e744c799407cdc1dadfaf88681124e6db00f25f737133ef

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page