πŸ§ͺ RexF - Smart Experiments Framework

CI Status PyPI Version Python Versions License: MIT

A lightweight Python library for reproducible computational experiments with an ultra-simple, smart API. From idea to insight in under 5 minutes, with zero configuration.

✨ Key Features

  • 🎯 Ultra-Simple API: Single @experiment decorator - that’s it!

  • πŸš€ Auto-Everything: Parameters, metrics, and results detected automatically

  • πŸ” Smart Exploration: Automated parameter space exploration with multiple strategies

  • πŸ’‘ Intelligent Insights: Automated pattern detection and recommendations

  • πŸ“Š Web Dashboard: Beautiful real-time experiment monitoring

  • πŸ”§ CLI Analytics: Powerful command-line tools for ad-hoc analysis

  • πŸ“ˆ Query Interface: Find experiments using simple expressions like "accuracy > 0.9"

  • πŸ”„ Reproducible: Git commit tracking, environment capture, seed management

  • πŸ’Ύ Local-First: SQLite database - no external servers required

πŸš€ Quick Start

Installation

pip install rexf

Ultra-Simple Usage

from rexf import experiment, run

@experiment
def my_experiment(learning_rate, batch_size=32):
    # Your experiment code here
    accuracy = train_model(learning_rate, batch_size)
    return {"accuracy": accuracy, "loss": 1 - accuracy}

# Run single experiment
run.single(my_experiment, learning_rate=0.01, batch_size=64)

# Get insights
print(run.insights())

# Find best experiments
best = run.best(metric="accuracy", top=5)

# Auto-explore parameter space
run.auto_explore(my_experiment, strategy="random", budget=20)

# Launch web dashboard
run.dashboard()

πŸ“š Documentation

🎯 Core Philosophy

From idea to insight in under 5 minutes, with zero configuration.

RexF prioritizes user experience over architectural purity. Instead of making you learn complex APIs, it automatically detects what you’re doing and provides smart features to accelerate your research.

🎨 Why RexF?

Traditional Approach

import mlflow
import sacred
from sacred import Experiment

# Complex setup required
ex = Experiment('my_exp')
mlflow.set_tracking_uri("...")

@ex.config
def config():
    learning_rate = 0.01
    batch_size = 32

@ex.automain
def main(learning_rate, batch_size):
    with mlflow.start_run():
        # Your code here
        mlflow.log_param("lr", learning_rate)
        mlflow.log_metric("accuracy", accuracy)

RexF Approach

from rexf import experiment, run

@experiment
def my_experiment(learning_rate=0.01, batch_size=32):
    # Your code here - that's it!
    return {"accuracy": accuracy}

run.single(my_experiment, learning_rate=0.05)

Comparison Table

Feature Comparison

Feature

Traditional Tools

RexF

Setup

Complex configuration

Single decorator

Parameter Detection

Manual logging

Automatic

Metric Tracking

Manual logging

Automatic

Insights

Manual analysis

Auto-generated

Exploration

Write custom loops

run.auto_explore()

Comparison

Custom dashboards

run.compare()

Querying

SQL/Complex APIs

run.find("accuracy > 0.9")

Indices and tables