Skip to main content

RL-Insight logo

RL-Insight

Online observability for reinforcement learning training. RL-Insight connects training-side metrics, RL state traces, and service dashboards across distributed rollout and optimization workloads.

Ask DeepWiki GitHub Repo stars Twitter Documentation

Why RL-Insight

RL-Insight focuses on the online observability path that RL training needs most:

  • One-command server startup: install dependencies and start the RL-Insight server with Prometheus, Tempo, and Grafana with rl-insight server install and rl-insight server start.
  • Trainer and rollout metric aggregation: collect key actor, rollout, and transfer queue metrics in one monitoring view while keeping training-side instrumentation lightweight.
  • Hardware monitoring: collect CPU, memory, network, disk, NVIDIA GPU, and Ascend NPU metrics with the monitor started by rl_insight.init(); no exporter deployment is required. Legacy exporter guides remain available for existing Prometheus deployments.
  • Grafana dashboards for RL workloads: provide ready-to-use dashboard structure for training metrics, rollout behavior, engine metrics, and RL state timelines.

Architecture

RL-Insight monitor architecture

RL-Insight has two metric sources. Training code reports framework-internal signals through the Python API, and RL subsystems such as rollout engines and transfer queues register their own /metrics endpoints through the metric aggregation interface. The RL-Insight server coordinates the training side and manages Prometheus, Tempo, and Grafana so metrics, traces, and subsystem signals converge into unified RL dashboards.

Demo

Two VeRL Trainer v1 + vLLM integration demos:

Sync with vLLM

https://github.com/user-attachments/assets/b0f05f3e-8b21-4813-8ba6-4796aa844d62

Watch the demo video

Separate Async with vLLM

https://github.com/user-attachments/assets/d0ef242d-e108-468f-afa5-ec9a5321f0e8

Watch the demo video

News

Get Started

Start with the guide that matches your current setup:

Document What it covers When to use it
Server Installation Prometheus, Tempo, and Grafana service setup, including supported Linux and Windows platforms, direct installation, offline installation, and existing service binaries. Use this first if the monitor services are not installed or you need to verify the server environment.
Quick Start A full smoke-test flow: install the Python package, start the monitor stack, emit sample metric/trace data, and open Grafana. Use this after the services are ready, or when you want to validate the monitor path end to end.
Hardware Monitoring Built-in hardware collection started by rl_insight.init() (CPU, memory, network, disk, NVIDIA GPU, Ascend NPU), plus the legacy exporter guides. Use this when you want hardware metrics in the RL-Insight Grafana dashboards.

Recommended order:

  1. Prepare the server services with Server Installation.
  2. Run the end-to-end flow with Quick Start.

Server Stack

RL-Insight manages three open-source services locally on Linux and Windows x64:

Service Purpose Default port Required version Installer version
Prometheus Metric storage and queries 9090 >= 2.30.0 2.54.1
Tempo Trace storage and query API 3200 >= 2.0.0 2.6.1
Grafana Dashboards and trace exploration 3000 >= 13.0.0 13.0.0

rl-insight server install downloads supported platform binaries into ~/.rl-insight/services. rl-insight server start runs the RL-Insight server with Prometheus, Tempo, and Grafana with data persisted under ~/.rl-insight/data by default. Pass --log-dir /path/to/data to use or restore another data directory.

Training API

rl_insight/ exports the online monitor public API, so training code can import one module:

API Use
init(project=None, experiment_name=None, config=None) Enable monitoring once per process and attach global labels.
metric_count(name, amount=1.0, documentation="", **labels) Increment a Prometheus counter.
metric_gauge(name, value, documentation="", **labels) Record the latest value for a gauge.
metric_histogram(name, value, documentation="", **labels) Add one sample to a histogram.
metric_log(name, value, *, step, **labels) Record a scalar for a specific training step through the trace path.
trace_state(state_name, state_lane_id=None, **labels) Record a named RL state interval.
trace_op(name=None, extra_labels=None, **static_labels) Decorate a sync or async function and emit one duration span per call.
trace_span(name, start_time_ns, end_time_ns, attributes) Report one completed span directly, with a caller-supplied name, epoch-ns times, and attributes.
finish() Reset monitor state.

Configuration can be passed to insight.init(config=...) or through environment variables:

import rl_insight as insight

insight.init(
    project="verl",
    experiment_name="ppo-smoke-test",
    config={
        "server": {
            "namespace": "rl_insight_monitor",
            "backend": "ray",
            "url": "http://<server-ip>:18080",
        },
        "prometheus": {
            "metrics_report_port": 9092,
        },
    },
)

Useful environment variables:

Variable Purpose
RL_INSIGHT_SERVER_URL RL-Insight server URL, for example http://<server-ip>:18080.
RL_INSIGHT_SERVER_BACKEND Trainer-side monitor client backend (server.backend), for example ray. Also applies to worker processes that call rl_insight.init() without a config.

Roadmap

Documentation

  • Configuration: server and client settings, defaults, and override precedence.
  • Python API: initialization, metrics, traces, and cleanup.
  • Quick Start: install RL-Insight, start the services, instrument code, and open Grafana.
  • Server Installation: Linux and Windows service requirements, supported OS/CPU combinations, and version policy.
  • Hardware Monitoring: built-in hardware collection, metric names, Grafana panels, and the legacy exporter guides.
  • Default server config: bundled ports, retention settings, and service config paths.

Community

Join our Lark group to connect with the team and other developers:

Join RL-Insight on Lark

Contribution Guide

See CONTRIBUTING.md.

Metadata

Release files for rl-insight 0.4.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 rl-insight 0.4.0
File Size Uploaded Provenance Actions
rl_insight-0.4.0.tar.gz 228.9 kB Without provenance Details for rl_insight-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rl-insight 0.4.0
File Interpreter ABI Platform Actions
rl_insight-0.4.0-py3-none-any.whl Python 3 none any Details for rl_insight-0.4.0-py3-none-any.whl

Total release size: 529.5 kB

Release files / rl_insight-0.4.0.tar.gz

Download URL rl_insight-0.4.0.tar.gz
Size 228.9 kB
Tags Source
SHA-256 checksum
How to use checksums
244d2a9a20ba27e2c9a24449727a6417ddb83520eb1186bcc1170f24bfab1f79
BLAKE2b-256 checksum
How to use checksums
b7e0f6dbc758297e9b00e3564df39bc98564311b32ec2a99e925983cb5369586
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.3

Release files / rl_insight-0.4.0-py3-none-any.whl

Download URL rl_insight-0.4.0-py3-none-any.whl
Size 300.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
098d0ad543b82102aab9c76ca7f0f9a206b849a99242d581c9a22228b833895e
BLAKE2b-256 checksum
How to use checksums
7f0131b19ba9b3f8094687a8085219f5dbf59493e6c47454739e855a94bb0674
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.3

Security for rl-insight 0.4.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.

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