[project] name = "mindxtrain" version = "1.0.4" description = "Production training framework for fine-tuning open-weight LLMs on AMD MI300X and serving them through an OpenAI-compatible API." requires-python = ">=3.12,<3.13" license = { text = "Apache-2.0" } authors = [{ name = "mindX" }] readme = "README.md" dependencies = [ "pydantic>=2.9", "pyyaml>=6.0", "typer>=0.13", "rich>=13.9", "blake3>=0.4", "fastapi>=0.115", "uvicorn[standard]>=0.32", "httpx>=0.27", ] [project.scripts] mindxtrain = "mindxtrain.cli.main:app" [project.optional-dependencies] ml = [ "trl>=0.13", "transformers>=4.46", "peft>=0.13", "accelerate>=1.0", "datasets>=3.0", ] eval = [ "lm-eval>=0.4", "lighteval>=0.7", "inspect-ai>=0.3", "jinja2>=3.1", ] data = [ "datasketch>=1.6", "sentence-transformers>=3.2", "faiss-cpu>=1.9", "pyarrow>=18.0", ] serve = ["vllm>=0.6"] ui = [ "gradio[mcp]>=5.0", "pyyaml>=6.0", ] # The Hub is not a chain. It had been living inside `chain`, so reaching Hugging Face # meant installing web3 and the Algorand SDK; `chain` still pulls it so existing # installs keep working. hf = ["huggingface-hub>=0.26"] chain = [ "web3>=7.5", "py-algorand-sdk>=2.7", "mindxtrain[hf]", ] obs = [ "opentelemetry-sdk>=1.28", "prometheus-client>=0.21", "psutil>=6.1", ] all = [ "mindxtrain[ml,eval,data,serve,chain,obs,ui,hf]", ] [build-system] requires = ["hatchling"] build-backend = "hatchling.build" [tool.hatch.build.targets.wheel] packages = ["mindxtrain"] [dependency-groups] dev = [ "pytest>=8.3", "pytest-asyncio>=0.24", # starlette 1.6 deprecates driving its TestClient with httpx and asks for httpx2. # 24 test modules use TestClient, so the dependency moves rather than the tests. "httpx2>=2.13", "ruff>=0.7", "mypy>=1.13", "types-PyYAML>=6.0", ] [tool.ruff] target-version = "py312" line-length = 100 extend-exclude = ["docs/blueprints/**"] [tool.ruff.lint] select = ["E", "F", "W", "I", "B", "UP", "RUF"] # E501 — line length is enforced by `line-length` directly. # RUF002/RUF003 — Unicode chars in docstrings/comments are intentional # throughout the MEI module: the spec uses α, ≥, ≤, ×, §, etc. # Rewriting them as ASCII obscures meaning. ignore = ["E501", "RUF002", "RUF003"] [tool.ruff.lint.per-file-ignores] # Typer's idiomatic pattern is `arg: T = typer.Option(...)` — flagged as B008 falsely. "mindxtrain/cli/main.py" = ["B008"] [tool.mypy] python_version = "3.12" strict = true files = ["mindxtrain/config", "mindxtrain/provenance"] exclude = ["docs/", "tests/"] [[tool.mypy.overrides]] module = ["yaml.*", "blake3.*", "algosdk.*", "web3.*"] ignore_missing_imports = true [tool.pytest.ini_options] testpaths = ["tests"] asyncio_mode = "auto" addopts = "-ra"