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.2.1.tar.gz (22.5 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.2.1-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ai4one-0.2.1.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ai4one-0.2.1.tar.gz
Algorithm Hash digest
SHA256 dc57f3881bb58d9683e478787820c0480ba413e1d137b070a9037367918f2a31
MD5 77e0b158e175642ce0623e6bf3a16c9d
BLAKE2b-256 0b51305b966746a2db6fd84bf28c767d64d8737f2c2f889e727003ce8c67e406

See more details on using hashes here.

Provenance

The following attestation bundles were made for ai4one-0.2.1.tar.gz:

Publisher: publish.yml on bestenevoy/ai4one

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: ai4one-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 23.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ai4one-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 56ebfca13f03a67562e7d277fe73b1d00e1195fcea2ba96e430bf37482cccc81
MD5 87461899f780aa485656174e55bbeaa2
BLAKE2b-256 697f1ff61dc11b9f3cefb0e1a9337865754c21a526bba7020cb66f96900a3dfd

See more details on using hashes here.

Provenance

The following attestation bundles were made for ai4one-0.2.1-py3-none-any.whl:

Publisher: publish.yml on bestenevoy/ai4one

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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