-
Notifications
You must be signed in to change notification settings - Fork 24
/
pyproject.toml
132 lines (117 loc) · 2.29 KB
/
pyproject.toml
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
[tool.poetry]
name = "mlx_llm"
version = "1.0.6"
description = "Large Language Models (LLMs) applications and tools running on Apple Silicon in real-time with Apple MLX"
authors = ["Riccardo Musmeci <riccardomusmeci92@gmail.com>"]
readme = "README.md"
packages = [
{ include = "mlx_llm", from = "src" },
]
[tool.poetry.dependencies]
python="^3.10"
mlx = "*"
torch = "*"
numpy = "1.26.2"
tqdm = "*"
sentencepiece = "*"
safetensors = "*"
transformers = "*"
huggingface-hub = "*"
protobuf = "*"
# dev dependencies
black = { version = "23.3.0", optional = true, extras = ["jupyter"] }
ruff = { version = "0.0.264", optional = true }
mypy = { version = "1.2.0", optional = true }
[tool.poetry.extras]
dev = ["black", "ruff", "mypy"]
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
src = ["src"]
line-length = 120
# Enable auto fix
fix = true
# Enable Pyflakes `E` and `F` codes by default.
select = ["B", "C", "E", "F", "W", "I001", "I002", "D101", "D102"]
ignore = ["E501", "D103", "F401", "C901", "B905", "E741"]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"__pycache__",
"bin",
"lib",
]
# Allow unused variables when underscore-prefixed.
#dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Assume Python 3.10.
target-version = "py310"
[tool.ruff.isort]
known-first-party = ["src"]
[tool.ruff.mccabe]
max-complexity = 18
[tool.black]
line-length = 120
include = '\.pyi?$|\.ipynb$'
exclude = '''
/(
\.eggs # exclude a few common directories in the
| \.git # root of the project
| \.hg
| \.mypy_cache
| \.nox
| \.tox
| \.venv
| venv
| \.svn
| \.ipynb_checkpoints
| _build
| buck-out
| build
| dist
| __pypackages__
| \.env
| env
| \.vscode
| \.ruff_cache
| docs
| bin
| lib
| \.cicd
| src/mlx_llm/\.resources
)/
'''
[tool.mypy]
python_version = "3.10"
files = ["./src/**/*.py", "./tests/**/*.py"]
exclude = [
'venv',
'.venv',
'env',
'.env',
'docs',
'bin',
'lib',
'.cicd',
"tests",
"local"
]
ignore_missing_imports = true