[build-system]
requires = ["setuptools>=61.0", "build>=1.2.1"]
build-backend = "setuptools.build_meta"

[project]
name = "realhf"
description = "ReaL: Efficient RLHF Training of Large Language Models with Parameter Reallocation"
readme = "README.md"
requires-python = ">=3.10"
dynamic = ["version"]
keywords = [
    "distributed-systems",
    "reinforcement-learning-from-human-feedback",
    "large-language-models",
    "llm-training",
]
classifiers = [
    #   3 - Alpha
    #   4 - Beta
    #   5 - Production/Stable
    "Development Status :: 2 - Pre-Alpha",
    "Environment :: GPU :: NVIDIA CUDA :: 12 :: 12.2",
    "Intended Audience :: Developers",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.10",
]

dependencies = [
    # Core ML/AI libraries
    "torch>2.0.0",
    "huggingface_hub",
    "datasets",
    "accelerate",
    "transformers==4.53.0",
    
    # Scientific computing
    "scipy",
    "pandas",
    "matplotlib",
    "seaborn",
    "h5py",
    
    # Utilities and data processing
    "nltk",
    "sentencepiece",
    "einops",
    "tqdm",
    "rich",
    "orjson>=3.10.16",
    "pydantic",
    "PyYAML",
    "hydra-core==1.4.0.dev1",
    "packaging",
    "tabulate",
    "gymnasium>=1.1.1",
    "torchdata",
    "autoflake",
    "tensordict",
    
    # Monitoring and logging
    "wandb",
    "tensorboardx",
    "colorama",
    "colorlog",
    "psutil",
    "pynvml",
    "swanlab[dashboard]",
    
    # Performance and compression
    "ninja",
    "numba",
    "blosc",
    "pybind11>=2.10.0",
    
    # Networking and async
    "networkx==3.3",
    "aiofiles",
    "aiohttp>=3.11.10",
    "httpx>=0.28.1",
    "pyzmq",
    "paramiko",
    "etcd3",
    "protobuf<3.21",
    
    # Distributed computing
    "ray",
    "redis",
    "deepspeed>=0.17.2",
    
    # Web frameworks
    "fastapi>=0.115.12",
    "uvicorn>=0.34.2",
    "uvloop>=0.21.0",
    "flask",
    
    # Build and packaging tools
    "build>=1.2.1",
    "wheel>=0.43.0",
    "setuptools>=62.3.0,<75.9",
    "cookiecutter>2.1.1",
    
    # System utilities
    "distro-info>=1.0",
    "python-debian>=0.1.49",
    "func_timeout",
    "regex",
    "python_dateutil",
    "word2number",
    "Pebble",
    "timeout-decorator",
    "prettytable",
    
    # Development tools (consider moving to optional dependencies)
    "pytest",
    "ipython",
    "jupyter-book",
    "sphinx",
    "sphinx-nefertiti",
    "black==25.1.0",
    "isort==5.13.2",
    "clang-format==19.1.7",
]

[project.optional-dependencies]
dev = [
    "pytest",
    "black==25.1.0",
    "isort==5.13.2",
    "clang-format==19.1.7",
]

docs = [
    "sphinx",
    "sphinx-nefertiti",
    "jupyter-book",
]

[tool.setuptools.dynamic]
version = {attr = "realhf.__version__"}

[tool.setuptools.packages.find]
where = ["."] # ["."] by default
# include = ["csrc/*", "realhf/*"] # ["*"] by default
# exclude = ["tests", "docker"]    # empty by default
# namespaces = false               # true by default

[tool.isort]
profile = "black"

[tool.pytest.ini_options]
pythonpath = ["."]

[tool.black]
line-length = 88
