-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathpyproject.toml
More file actions
134 lines (124 loc) · 4.33 KB
/
Copy pathpyproject.toml
File metadata and controls
134 lines (124 loc) · 4.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
[project]
name = "surogate"
dynamic = ["version"]
description = "Surogate LLMOps Toolkit"
readme = "README.md"
requires-python = ">=3.12"
license = "Apache-2.0"
license-files = ["LICENSE"]
authors = [
{ name = "Flavius Burca", email = "flavius@invergent.ai" }
]
maintainers = [
{ name = "Flavius Burca", email = "flavius@invergent.ai" }
]
urls = { "Homepage" = "https://surogate.ai", "Repository" = "https://github.com/invergent-ai/surogate", "Issues" = "https://github.com/invergent-ai/surogate/issues" }
keywords = ["machine learning", "large language model"]
classifiers = [
"Environment :: GPU :: NVIDIA CUDA :: 12",
"Environment :: GPU :: NVIDIA CUDA :: 13",
"Operating System :: POSIX :: Linux",
"Programming Language :: C++",
"Programming Language :: Python :: 3",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Artificial Intelligence"
]
dependencies = [
"transformers>=5.5.0",
"huggingface-hub>=1.4.1",
"hf-transfer>=0.1.9",
"datasets>=4.3.0",
"addict",
"peft",
"json_repair",
"unique-namer",
"nanobind",
"binpacking",
"rich>=13.0.0",
"psutil",
"matplotlib",
"qwen-vl-utils==0.0.14",
"ray>=2.5.0",
"verifiers==0.3.0",
"wandb==0.25.1",
"jaxtyping",
"aiolimiter",
"openai==2.32.0"
]
scripts = { "surogate" = "surogate.cli.main:cli_main" }
[build-system]
requires = ["scikit-build-core>=0.11", "nanobind"]
build-backend = "scikit_build_core.build"
[tool.setuptools_scm]
version_scheme = "guess-next-dev"
local_scheme = "no-local-version"
fallback_version = "0.0.1"
[tool.scikit-build]
minimum-version = "build-system.requires"
metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"
wheel.py-api = "cp312"
wheel.packages = ["surogate"]
build.targets = ["_surogate"]
build-dir = "build/{wheel_tag}"
cmake.build-type = "Release"
[tool.scikit-build.cmake.define]
PYTHON_BINDING = "ON"
# USE_CUFILE / REQUIRE_CUFILE are deliberately not set here: they default to ON in
# csrc/CMakeLists.txt. An explicit USE_CUFILE = "OFF" here is what silently shipped
# every released wheel without GPUDirect Storage.
CMAKE_CUDA_ARCHITECTURES = {env="CUDAARCHS"}
[tool.uv]
prerelease = "allow"
cache-keys = [
{ file = "pyproject.toml" },
{ file = "surogate/**/*.py" },
{ file = "CMakeLists.txt" },
{ file = "csrc/CMakeLists.txt" }
]
override-dependencies = [
"triton",
"torch",
"vllm",
]
[project.entry-points."vllm.general_plugins"]
surogate = "surogate.grpo.inference.patches:transformers_v5_compat"
# ────────── Python formatter / linter ──────────
# Aligned with .clang-format for LLM/agent ergonomics: stable line boundaries,
# no aggressive re-flowing on edit, grep-friendly structure.
[tool.ruff]
line-length = 120 # matches .clang-format ColumnLimit
target-version = "py312"
extend-exclude = [
"build", # scikit-build output
".venv",
"csrc/build",
"csrc/third_party",
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false # a trailing comma keeps items one-per-line,
# which preserves grep targets and diff stability.
line-ending = "lf"
[tool.ruff.lint]
# Conservative default set. Style-heavy rules (like line-length W505) are OFF
# because the formatter handles whitespace; lint is for correctness bugs.
select = [
"E", # pycodestyle errors (indentation, whitespace correctness)
"F", # pyflakes (unused imports, undefined names)
"W", # pycodestyle warnings
"I", # isort (import ordering) — deterministic insert slots for new imports
"B", # flake8-bugbear (likely bugs, e.g. mutable default args)
"UP", # pyupgrade (use modern syntax)
]
ignore = [
"E501", # line-too-long — formatter already handles it
"E741", # ambiguous single-letter names (e.g. `l`, `I`) — common in ML code
"B008", # function calls in argument defaults — common pattern with torch
"B905", # zip() without explicit strict= — not all call sites need strict
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"] # re-exports without use are intentional
"tests/**" = ["F401", "F811"] # test fixtures often shadow/reimport