Skip to main content

AlphaTrion is an open-source and all-in-one platform to build AI-powered applications.

Project description

alphatrion

Open, modular framework to build GenAI applications.

stability-alpha Latest Release

AlphaTrion is an open-source framework to help build GenAI applications, including experiment tracking, adaptive model routing, prompt optimization, performance evaluation and so on. The name comes after the oldest and wisest Transformer - AlphaTrion.

Still under active development.

Concepts

  • Project: A Project is a namespace-level abstraction that isolates experiments from different users or teams.
  • Experiment: An Experiment is a high-level abstraction for organizing and managing a series of related trials. It serves as a way to group together multiple trials that share a common goal or objective.
  • Trial: A Trial represents a single attempt or multiple iterations within an experiment. It encapsulates the configuration, execution, and results of a specific set of runs.
  • Run: A Run is an execution of a specific configuration within a trial. It represents a real iteration of the trial.

Quick Start

Install from PyPI

pip install alphatrion

Install from Source

  • Git clone the repository
  • Run source start.sh to activate the virtual environment.
  • Run poetry install to install dependencies.

Initialize the Environment

Run the following command for setup:

cp .env.example .env & make up

You can login to pgAdmin at http://localhost:8080 to see the Postgres database with following credentials:

Email:     alphatrion@inftyai.com
Username:  alphatrion
Password:  alphatr1on
Server:    postgres

Run a Sample Experiment

Below is a simple example with two approaches demonstrating how to create an experiment and log performance metrics.

import alphatrion as alpha
import uuid

# Better to use a fixed UUID to identify your project.
alpha.init(project_id=uuid.uuid4(), artifact_insecure=True)

async def report():
  # Run your code here then log metrics.
  await alpha.log_metrics({"accuracy": 0.95})

async with alpha.CraftExperiment.setup(name="my_first_experiment") as exp:
  async with exp.start_trial(name="my_trial") as trial:
    run = trial.start_run(lambda: report())
    await run.wait()

View Results

Dashboard is coming soon! Meanwhile, you can query the results directly from the database.

Cleanup

make down

Contributing

We welcome contributions! Please refer to developer.md for more information on how to set up your development environment and contribute to the project.

Star History Chart

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

alphatrion-0.0.2.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

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

alphatrion-0.0.2-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

Details for the file alphatrion-0.0.2.tar.gz.

File metadata

  • Download URL: alphatrion-0.0.2.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.13.6 Darwin/24.1.0

File hashes

Hashes for alphatrion-0.0.2.tar.gz
Algorithm Hash digest
SHA256 1bb301cef0345f0b70c58fdbdd55a1b8ffe18a509db08a0e12e21517b0dadbff
MD5 b38055f0a16e3c41a0625debb9320609
BLAKE2b-256 f980db024f043386074809def31cb41e1799d9229ba1904ebb8429e8c3acaf4c

See more details on using hashes here.

File details

Details for the file alphatrion-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: alphatrion-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 24.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.13.6 Darwin/24.1.0

File hashes

Hashes for alphatrion-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 288dca239b66bd54486fba75405d0ce665f42a86c765e1d9406e681e35c4d076
MD5 aa13629d8a7ea0fab576f73d0ad0394d
BLAKE2b-256 79a48b1892e89fe72bd457f4717eb89cfd8be945c68020bf7aebef9a1cde5f71

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