Skip to main content

kiox: A composable experience replay buffer library

test codecov Maintainability MIT

kiox is a composable experience replay buffer library.

from kiox.kiox import Kiox
from kiox.transition_buffer import FIFOTransitionBuffer
from kiox.transition_factory import SimpleTransitionFactory

kiox = Kiox(FIFOTransitionBuffer(1000), SimpleTransitionFactory())

# collect experiences
kiox.collect(<obsrvation>, <action>, <reward>, <terminal>)

# sample batch
batch = kiox.sample(256)

key features

⚡ Composable experience replay buffer

kiox is composable and fully Pythonic library. You can add your own sampling algorithms and inject sampling-time logics (e.g. loading image data from disk just before sampling).

🔰 User-friendly API

kiox provides user-friendly API so that you can instantly incorporate kiox with your RL algorithms.

🚀 Distributed RL training support

kiox supports distributed RL training by using ProtocolBuffer and gRPC. Your custom modules will work without any code changes.

installation

kiox supports Linux, macOS and Windows.

$ pip install kiox

examples

Many extensive examples are available.

distributed training

In actor process:

from kiox.distributed.step_sender import StepSender
sender = StepSender("localhost", 8000, 1)
sender.collect(<obsrvation>, <action>, <reward>, <terminal>)

In trainer process:

# trainer process
from kiox.distributed.server import KioxServer

def transition_buffer_builder():
    return FIFOTransitionBuffer(1000)

def transition_factory_builder():
    return SimpleTransitionFactory()

# setup server
server = KioxServer(
    host="localhost",
    port=8000,
    observation_shape=(4,),
    action_shape=(1,),
    reward_shape=(1,),
    batch_size=8,
    transition_buffer_builder=transition_buffer_builder,
    transition_factory_builder=transition_factory_builder,
)
server.start()

# sample batch
batch = server.sample()

from offline data

# from offline data
from kiox.offline import create_simple_kiox_from_data
kiox = create_simple_kiox_from_data(
  observations=<observations>,
  actions=<actions>,
  rewards=<rewards>,
  terminals=<terminals>,
)

build

$ pip install grpcio-tools
$ scripts/build-protobuf
$ pip install -e .

contributions

Any kind of contribution to kiox would be highly appreciated! Please check the contribution guide.

Metadata

Release files for kiox 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kiox 0.1.0
File Size Uploaded Provenance Actions
kiox-0.1.0.tar.gz 18.8 kB Without provenance Details for kiox-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kiox 0.1.0
File Interpreter ABI Platform Actions
kiox-0.1.0-py3-none-any.whl Python 3 none any Details for kiox-0.1.0-py3-none-any.whl

Total release size: 45.4 kB

Release files / kiox-0.1.0.tar.gz

Download URL kiox-0.1.0.tar.gz
Size 18.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5c45cd51e5c2a8384e12add8c5200cf6a467d3fd867200ab6e19fcc7bacfaa24
BLAKE2b-256 checksum
How to use checksums
2f94c1c00f190b2f079119c9a63713012d0a14104328869352f52bf3d30fb13f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.7

Release files / kiox-0.1.0-py3-none-any.whl

Download URL kiox-0.1.0-py3-none-any.whl
Size 26.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7a28dd69c222fe2fb75cbc7cf1687a02f7f463b4affe2b95d0369bac07bfdcab
BLAKE2b-256 checksum
How to use checksums
76de756ade2c356945e9f7e4be8510a85cb41041e5b67765138b65281c67a644
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.7

Security for kiox 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page