forked from mlc-ai/mlc-llm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
177 lines (151 loc) · 4.03 KB
/
pyproject.toml
File metadata and controls
177 lines (151 loc) · 4.03 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
[project]
name = "mlc_llm"
# Note: Call version.py to update the version before building the wheel
version = "0.20.0.dev0"
description = "MLC LLM: an universal LLM deployment engine via ML compilation."
authors = [{ name = "MLC LLM Contributors" }]
readme = "README.md"
license = { text = "Apache 2.0" }
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
]
keywords = ["machine learning"]
requires-python = ">=3.9"
dependencies = [
"apache-tvm-ffi",
"datasets",
"fastapi",
"flashinfer-python; sys_platform == 'linux'",
"ml_dtypes>=0.5.1",
"openai",
"pandas",
"prompt_toolkit",
"requests",
"safetensors",
"sentencepiece",
"shortuuid",
"tiktoken",
"torch",
"tqdm",
"transformers",
"uvicorn",
]
[project.urls]
Homepage = "https://llm.mlc.ai/"
Documentation = "https://llm.mlc.ai/docs/"
Repository = "https://github.com/mlc-ai/mlc-llm"
"Bug Tracker" = "https://github.com/mlc-ai/mlc-llm/issues"
[build-system]
requires = ["scikit-build-core>=0.10.0"]
build-backend = "scikit_build_core.build"
[tool.scikit-build]
# Point to the root CMakeLists.txt
cmake.source-dir = "."
cmake.build-type = "Release"
# Configure the wheel to be Python version-agnostic
wheel.py-api = "py3"
# Build configuration
build-dir = "build"
# CMake configuration - ensure proper installation paths
cmake.args = ["-DMLC_LLM_BUILD_PYTHON_MODULE=ON"]
# Wheel configuration
wheel.packages = ["python/mlc_llm"]
wheel.install-dir = "mlc_llm"
# Source distribution configuration
sdist.include = [
# Build files
"/CMakeLists.txt",
"/pyproject.toml",
"/cmake/**/*",
"/3rdparty/**/*",
# Source code
"/src/**/*.cc",
"/src/**/*.h",
# Python source
"/python/mlc_llm/**/*.py",
# Documentation and metadata
"/docs/**/*",
"/LICENSE",
"/README.md",
"/NOTICE",
# Tests
"/tests/**/*",
"/.pre-commit-config.yaml",
]
sdist.exclude = [
"**/.git",
"**/.github",
"**/__pycache__",
"**/*.pyc",
"build",
"dist",
"3rdparty/tvm",
"**/3rdparty/*/docs",
"**/3rdparty/*/media",
"**/3rdparty/*/examples",
"**/3rdparty/*/test",
]
# Logging
logging.level = "INFO"
[tool.ruff]
include = [
"python/**/*.py",
"tests/**/*.py",
"examples/**/*.py",
"docs/**/*.py",
"cmake/**/*.py",
"version.py",
]
line-length = 100
indent-width = 4
target-version = "py39"
exclude = ["3rdparty", "build", "dist", ".venv", ".ruff_cache"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"RUF", # ruff-specific rules
]
ignore = [
"UP028", # yield-in-for-loop
"UP030", # format-literals
"UP031", # printf-string-formatting
"RUF010", # explicit-f-string-type-conversion — !s/!r/!a is obscure; prefer explicit str()/repr()
"RUF043", # pytest-raises-ambiguous-pattern
"RUF059", # unused-unpacked-variable
]
fixable = ["ALL"]
unfixable = []
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402", "F401", "F403", "F405"]
[tool.ruff.lint.isort]
known-first-party = ["mlc_llm"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[dependency-groups]
lint = ["pre-commit"]