Skip to main content

ReinforceNow CLI - Reinforcement Learning platform command-line interface

Project description

ReinforceNow CLI

PyPI version Docs Follow on X MIT License

Documentation

See the documentation for a technical overview of the platform and train your first agent

Quick Start

1. Install uv (Python package manager)

# macOS/Linux:
$ curl -LsSf https://astral.sh/uv/install.sh | sh

# Windows:
PS> powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

2. Install ReinforceNow

uv init && uv venv --python 3.11
source .venv/bin/activate  # Windows: .\.venv\Scripts\Activate.ps1
uv pip install rnow

3. Authenticate

rnow login

4. Create & Run Your First Project

rnow init --template sft
rnow run

That's it! Your training run will start on ReinforceNow's infrastructure. Monitor progress in the dashboard.

ReinforceNow Graph

Core Concepts

Go from raw data to a reliable AI agent in production. ReinforceNow gives you the flexibility to define:

1. Reward Functions

Define how your model should be evaluated using the @reward decorator:

from rnow.core import reward, RewardArgs

@reward
async def accuracy(args: RewardArgs, messages: list) -> float:
    """Check if the model's answer matches ground truth."""
    response = messages[-1]["content"]
    expected = args.metadata["answer"]
    return 1.0 if expected in response else 0.0

Write your first reward function

2. Tools (for Agents)

Give your model the ability to call functions during training:

from rnow.core import tool

@tool
def search(query: str, max_results: int = 5) -> dict:
    """Search the web for information."""
    # Your implementation here
    return {"results": [...]}

Train an agent with custom tools

3. Training Data

Create a train.jsonl file with your prompts and reward assignments:

{"messages": [{"role": "user", "content": "Balance the equation: Fe + O2 → Fe2O3"}], "rewards": ["accuracy"], "metadata": {"answer": "4Fe + 3O2 → 2Fe2O3"}}
{"messages": [{"role": "user", "content": "Balance the equation: H2 + O2 → H2O"}], "rewards": ["accuracy"], "metadata": {"answer": "2H2 + O2 → 2H2O"}}
{"messages": [{"role": "user", "content": "Balance the equation: N2 + H2 → NH3"}], "rewards": ["accuracy"], "metadata": {"answer": "N2 + 3H2 → 2NH3"}}

Learn about training data format

Contributing

We welcome contributions! ❤️ Please open an issue to discuss your ideas before submitting a PR


ReinforceNow

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

rnow-0.4.23.tar.gz (678.0 kB view details)

Uploaded Source

Built Distribution

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

rnow-0.4.23-py3-none-any.whl (706.6 kB view details)

Uploaded Python 3

File details

Details for the file rnow-0.4.23.tar.gz.

File metadata

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

File hashes

Hashes for rnow-0.4.23.tar.gz
Algorithm Hash digest
SHA256 b6e1416e0ff0cef167c7127122df8d4a15c37fe4ade2d97e408ea3e158cd7a57
MD5 83b74d36bcd512870f0aea4e75a8dc27
BLAKE2b-256 646701c5452ff6651cdc0f97383caaa4db37c45c81b5df75687c664b1f4aac08

See more details on using hashes here.

File details

Details for the file rnow-0.4.23-py3-none-any.whl.

File metadata

  • Download URL: rnow-0.4.23-py3-none-any.whl
  • Upload date:
  • Size: 706.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rnow-0.4.23-py3-none-any.whl
Algorithm Hash digest
SHA256 87e57eb69c1901facf812158f6b645ad0bb7dd18996547a45baa57e844a70f8f
MD5 da82f1ea174ab6feb53919ba053325a5
BLAKE2b-256 237ab87f6a17b84b68eeff873a19fac9135a46878d9ccdb6c7fee837ff5ecd0a

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