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.0.tar.gz (83.5 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: scheduling_utils-0.2.0.tar.gz
  • Upload date:
  • Size: 83.5 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.0.tar.gz
Algorithm Hash digest
SHA256 652e4b901aa2036c49e7c3a7aca69b2a498eb8e7b1e0290773a6350df19ee7f8
MD5 f58a222c150aea4bf9b8afad8e42e693
BLAKE2b-256 963d44aec7722cb42a2fb13df7051762f59b2f53617e28f048e0d5efebd49175

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