Catalog PyPI
Back to packageRELEASE DETAILS

0.3.2

PyPI

ai4one

A small machine learning package

aiclideep-learningmachine-learningplot-tools
Published24 Aug 2025
Direct dependencies9
Transitive dependenciesNot calculated

README

Version 0.3.2 documentation

AI4One 🤖

A small, modular package for machine learning.


Installation

pip install ai4one

This package requires Python 3.8 or newer.


Usage

ai4one.config

3.9>=Python 版本>=3.7, 请使用pip isntall ai4one~=0.2安装 ai4one=0.2 版本。

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

ai4one.tools

ai4one.tools.plt

该模块提供了一些用于绘图的工具函数。

  1. setup_fonts 函数用于设置 matplotlib 字体,以支持中文字符。

    主要用途是跨平台支持中文字符的显示。

    • 默认配置为 New Times Roman 、SimSun 和 SimHei 两种字体。
    • 使用详情查看 tools.plt
from ai4one.tools.plt import setup_fonts
setup_fonts(["New Times Roman", "SimSun", "SimHei"])

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/*

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 10

Native requirements
9 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
dotenv
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
dotenv>=0.9.9runtime
mcp
Environment
{
  "extras": "cli",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
mcp[cli]>=1.13.0runtime
openai
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
openai>=0.8.0runtime
requests
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
requests>=2.31.0runtime
simple-parsing
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
simple-parsing>=0.1.5runtime
typer
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
typerruntime
PyYAML
Environment
{
  "extras": "",
  "marker": "extra == \"yaml\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
PyYAML; extra == "yaml"runtime
ai4one
Environment
{
  "extras": "yaml",
  "marker": "extra == \"all\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
ai4one[yaml]; extra == "all"runtime
pytest
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pytest; extra == "dev"runtime
ai4one
Environment
{
  "extras": "all",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
ai4one[all]; extra == "dev"runtime

Distribution files

2 collected
ai4one-0.3.2-py3-none-any.whl

bdist_wheel · 31.2 KB · Python py3

Source file
ai4one-0.3.2.tar.gz

sdist · 28.67 KB · Python source

Source file

Repository

PENDING
bestenevoy/ai4one

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 09:48 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:0c021b5c91fbef25ede78c70224ad2e13bd2a7dfcf367bddf7c51e9717d567f7

Other collected versions

View all collected versions →