-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathpyproject.toml
More file actions
115 lines (109 loc) · 3.08 KB
/
pyproject.toml
File metadata and controls
115 lines (109 loc) · 3.08 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
[project]
name = "dnet"
version = "0.0.2"
description = "Distributed Inference"
readme = "README.md"
license = { file = "LICENSE" }
authors = [
{ name = "andthattoo", email = "omer@dria.co" },
{ name = "erhant", email = "erhan@dria.co" },
{ name = "octavian", email = "octavian@firstbatch.xyz" },
{ name = "Shashank Jaiswal", email = "shashank@dria.co" },
]
keywords = [
"Artificial Intelligence",
"Large Language Models",
"Apple Silicon",
"MLX",
"Pipeline Parallelism",
]
requires-python = ">=3.12"
dependencies = [
"mlx-lm==0.28.2",
"numpy>=1.24.0",
"grpcio>=1.50.0",
"grpcio-tools>=1.50.0",
"transformers>=4.30.0",
"protobuf>=4.21.0",
"huggingface-hub==0.24.0",
"fastapi>=0.100.0",
"hypercorn>=0.14.0",
"pydantic>=2.0.0",
"pydantic-settings>=2.0.0",
"h2>=4.1.0",
"mypy-protobuf>=3.0.0",
"httpx[http2]>=0.24.0",
"cryptography>=40.0.0",
"distilp[solver,profiler] @ file://${PROJECT_ROOT}/lib/distilp",
"dnet-p2p @ file://${PROJECT_ROOT}/lib/dnet-p2p/bindings/py",
"rich>=13.0.0",
"psutil>=5.9.0",
]
[project.optional-dependencies]
mac = ["mlx"]
cpu = ["mlx[cpu]"]
cuda = ["mlx[cuda]"]
dev = [
"openai>=2.6.0", # for OpenAI compatibility tests
"pytest>=8.4.2",
"mypy>=1.3.0", # Type checking
"ruff>=0.0.285",
"types-psutil>=7.1.3",
"pre-commit>=4.5.0", # Git hooks
"requests>=2.31.0", # for integration tests
]
[project.scripts]
dnet-api = "cli.api:main"
dnet-shard = "cli.shard:main"
[build-system]
requires = ["uv_build>=0.8.17,<0.9.0"]
build-backend = "uv_build"
[tool.pytest.ini_options]
# Discover standard test module basenames everywhere
python_files = ["test_*.py", "*_test.py"]
testpaths = ["tests"]
python_functions = ["test_"]
log_cli = true
markers = [
"api: tests for API node components (HTTP, gRPC, managers)",
"shard: tests for Shard node components (HTTP, gRPC, runtime, policies, ring)",
"http: tests that exercise HTTP servers or endpoints",
"grpc: tests that exercise gRPC servers or stubs",
"ring: tests for the RingAdapter and ring transport",
"runtime: tests for ShardRuntime internals",
"policies: tests for policy planning/registry/implementations",
"codec: tests for activation codec serialize/deserialize",
"core: tests for core memory/cache/utils not tied to api/shard",
"e2e: integration tests requiring live servers or multiple components",
"integration: model catalog integration tests for CI (manual trigger)",
]
[tool.ruff]
exclude = [".git", ".venv", "__pycache__", "build", "dist", "lib"]
line-length = 88 # black
[tool.mypy]
python_version = "3.12"
show_error_codes = true
pretty = true
color_output = true
warn_unused_ignores = true
exclude = [
"^lib/",
"^tests/",
"^build/",
"^src/dnet/compression(/|$)",
"^src/dnet/protos(/|$)",
]
explicit_package_bases = true
mypy_path = ["src"]
[[tool.mypy.overrides]]
module = [
"distilp", "distilp.*",
"dnet_p2p", "dnet_p2p.*",
"mlx", "mlx.*",
"mlx_lm", "mlx_lm.*",
"grpc", "grpc.*",
"grpc_tools", "grpc_tools.",
"huggingface_hub", "huggingface_hub.*",
"requests",
]
ignore_missing_imports = true