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.5.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.5-py3-none-any.whl (20.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ai4one-0.1.5.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.5.tar.gz
Algorithm Hash digest
SHA256 2df76b5580db8baec2e725fb667b997a28847b15e7cd08cb2bd67b18b8d10e8f
MD5 a6022c0c914e07739d0ef54824f817f3
BLAKE2b-256 7baa0b27bb8113b36b121adfd12b2b659baf8637a66e056e9d9b41bb9c213d10

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ai4one-0.1.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 14be880ae3666185641dd85640942aa94b772b2cef0ba9ec8d3ac6d9436fd44c
MD5 519a8ecf2f61cbec658f3a646632da9d
BLAKE2b-256 fbbddc590e818dff5d488b41674ad9bcd17734f4c8be57e1270dc8cfd479f837

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