Skip to main content

Bandit-based adaptive learning for qortex: Thompson Sampling, reward models, persistent state.

Project description

qortex-learning

Bandit-based adaptive learning for qortex. Thompson Sampling with Beta-Bernoulli posteriors, persistent state via SQLite, and pluggable reward models.

Usage

from qortex.learning import Learner, LearnerConfig, Arm, ArmOutcome

learner = await Learner.create(LearnerConfig(name="prompts"))

candidates = [Arm(id="v1", token_cost=10), Arm(id="v2", token_cost=15)]
result = await learner.select(candidates, context={"task": "type-check"}, k=1)

await learner.observe(ArmOutcome(arm_id="v2", outcome="accepted", reward=1.0))

Part of the qortex workspace.

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

qortex_learning-0.1.0.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

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

qortex_learning-0.1.0-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file qortex_learning-0.1.0.tar.gz.

File metadata

  • Download URL: qortex_learning-0.1.0.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for qortex_learning-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4c42acb5a0796a336aa887dfeb0e3496242781cd119a40fec443f22a6592a192
MD5 4d99721ed7599e84efc4d82b743b8f41
BLAKE2b-256 82d8bebcef15a21cd0c2f90f3a95aca9d43e10a3a3bb597a26593e32c5536f41

See more details on using hashes here.

Provenance

The following attestation bundles were made for qortex_learning-0.1.0.tar.gz:

Publisher: publish-learning.yml on Peleke/qortex

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qortex_learning-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for qortex_learning-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 95254f96e51f779a3d6413ccfc408fe93d37013d3543e8fdb244254d59482f65
MD5 12645f2e5c01375bb7d17aadd064e58c
BLAKE2b-256 de977cf3fd279ab6b12f70fa38aaaf2362b055b36a3faf17d9f6aace32165b75

See more details on using hashes here.

Provenance

The following attestation bundles were made for qortex_learning-0.1.0-py3-none-any.whl:

Publisher: publish-learning.yml on Peleke/qortex

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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