Skip to main content

Store, manage, and compare machine learning experiments

Project description

MLT Experiments Library

A Python library for managing machine learning experiments. Store, retrieve, compare, and analyze your ML experiments effortlessly.

Features

Easy Experiment Tracking

  • Save experiment configurations, hyperparameters, models, and results
  • Automatic timestamps and metadata management

📊 Experiment Comparison

  • Compare multiple experiments side-by-side
  • Find best experiments by metric
  • Export to CSV for analysis

🏷️ Flexible Organization

  • Tag experiments for easy filtering
  • List experiments by tag
  • Full experiment history

📁 Multiple Data Formats

  • JSON export/import
  • CSV export for spreadsheets
  • Pandas DataFrame integration

Installation

From PyPI (once published)

pip install mlt-experiments

From source

git clone https://github.com/yourusername/mlt-experiments.git
cd mlt-experiments
pip install -e .

Quick Start

from mlt_experiments import ExperimentTracker

# Initialize tracker
tracker = ExperimentTracker(data_dir="my_experiments")

# Save an experiment
tracker.save(
    experiment_name="baseline_v1",
    config={
        "model": "RandomForest",
        "learning_rate": 0.01,
        "batch_size": 32,
        "epochs": 100
    },
    results={
        "accuracy": 0.92,
        "loss": 0.23,
        "precision": 0.89,
        "recall": 0.91
    },
    tags=["baseline", "v1"]
)

# Load an experiment
exp = tracker.load("baseline_v1")
print(exp)

# List all experiments
experiments = tracker.list_all()
print(experiments)

# Compare experiments
comparison = tracker.compare(["baseline_v1", "baseline_v2"], metric="accuracy")
print(comparison)

# Get best experiment by metric
best = tracker.get_best(metric="accuracy", mode="max")
print(f"Best: {best['name']}")

# Export to CSV
tracker.export_to_csv("experiments_summary.csv")

API Reference

ExperimentTracker

__init__(data_dir="experiments_data")

Initialize tracker with storage directory.

save(experiment_name, config, results, model_code="", tags=None)

Save experiment with metadata.

load(experiment_name)

Load specific experiment.

list_all()

Get list of all experiments.

list_by_tag(tag)

Get experiments with specific tag.

compare(experiment_names, metric=None)

Compare multiple experiments.

get_best(metric, mode="max")

Get best experiment by metric.

export_to_csv(output_file)

Export all experiments to CSV.

delete(experiment_name)

Delete an experiment.

Use Cases

  • Research: Track different model architectures and hyperparameters
  • Production: Compare model versions and performance
  • Team Collaboration: Share experiments across team members
  • Exam/Assignment: Store all lab work in organized, reproducible format

License

MIT License - see LICENSE file for details

Contributing

Contributions welcome! Please submit pull requests or issues.

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

mlt_experiments_urk23cs5035-0.1.1.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

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

mlt_experiments_urk23cs5035-0.1.1-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file mlt_experiments_urk23cs5035-0.1.1.tar.gz.

File metadata

File hashes

Hashes for mlt_experiments_urk23cs5035-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3e6288562f1cf2df8b07e45465e6d77df9e5580467232af4cca90e30fdc8c8b3
MD5 6dcffe4b0e652852a67f218a8e554cac
BLAKE2b-256 d37ae4dbd3edfda629ea59e695eb574649794491ebf54268013b0bf5b2765ffc

See more details on using hashes here.

File details

Details for the file mlt_experiments_urk23cs5035-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mlt_experiments_urk23cs5035-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f2fb5ae3642135ac0e1f68017e813ff56a6c4cbacbd21be050ee23619c6eee7e
MD5 5dc16f0dc96d64284a428a09a2461231
BLAKE2b-256 fb2e360061b0afa74f0bc865ff92bc11b709d870a9d3880a6d23707c3e696c6f

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