Skip to main content

A small machine learning package

Project description

AI4One 🤖

A small, modular package for machine learning.


Installation

pip install ai4one

This package requires Python 3.8 or newer.


Usage

ai4one.config

The primary feature of this package is a powerful configuration system. For a comprehensive guide and examples, please see the Configuration System Guide.

from ai4one.config import BaseConfig, field
from typing import List

class TrainConfig(BaseConfig):
    learning_rate: float = 0.001
    epochs: int = 10
    optimizer: str = "Adam"
    layers: List[int] = [3, 3]

if __name__ == "__main__":
    config = TrainConfig.argument_parser()
    print(f"Using optimizer: {config.optimizer}")

You can also run the self-contained example to see it in action:

examples/example_config.py

ai4one.cli

ai4one gpu

Outputs:

--- CUDA Version ---
12.7 

--- PyTorch Version ---
2.1.0+cu121

--- Python Version ---
Python 3.10.12

--- Python Executable Path ---
/usr/bin/python

Development

Interested in contributing? Set up your local development environment with uv.

  1. Clone the repository:

    git clone https://github.com/bestenevoy/ai4one.git
    cd ai4one
    
  2. Create a virtual environment and install dependencies: This command installs all core, optional, and development dependencies.

    uv pip install -e ".[dev]"
    

    To keep your environment in sync with the lock file, you can run uv sync.

  3. Run tests:

    uv run pytest
    

Build and Publish

These commands are for package maintainers.

Build the package:

uv build

Publish to PyPI:

uv run twine upload dist/*

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

ai4one-0.1.6.tar.gz (20.4 kB view details)

Uploaded Source

Built Distribution

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

ai4one-0.1.6-py3-none-any.whl (20.9 kB view details)

Uploaded Python 3

File details

Details for the file ai4one-0.1.6.tar.gz.

File metadata

  • Download URL: ai4one-0.1.6.tar.gz
  • Upload date:
  • Size: 20.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for ai4one-0.1.6.tar.gz
Algorithm Hash digest
SHA256 b6de1ff880c6a1ecfcf1725b5b0cd469e414d92518efeea9125224408882bf86
MD5 44f979f53e6352706897f5f01cdbc481
BLAKE2b-256 220abbbecd0174adb7de3c44f962500127b42c629e5aea3b87123fe0c28628c1

See more details on using hashes here.

File details

Details for the file ai4one-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: ai4one-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 20.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for ai4one-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 9e9c455f256a7087488c4c9ad170b70f755c0ba0487edb5a198127817414d30f
MD5 773ed11a19481549809eb91d368ebc49
BLAKE2b-256 1bec1560b90d359dda1295c6baf171de4f98cc43909f50c1ef462f975254f7a8

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