pyproject.toml 5.92 KB
Newer Older
Neelay Shah's avatar
Neelay Shah committed
1
# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# SPDX-License-Identifier: Apache-2.0
#
# Licensed 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.

Neelay Shah's avatar
Neelay Shah committed
16
[project]
17
name = "ai-dynamo"
18
version = "0.2.1"
Neelay Shah's avatar
Neelay Shah committed
19
20
21
description = "Distributed Inference Framework"
readme = "README.md"
authors = [
Neelay Shah's avatar
Neelay Shah committed
22
    { name = "NVIDIA Inc.", email = "sw-dl-dynamo@nvidia.com" },
Neelay Shah's avatar
Neelay Shah committed
23
]
24
25
license = { text = "Apache-2.0" }
license-files = ["LICENSE"]
Neelay Shah's avatar
Neelay Shah committed
26
27
28
requires-python = ">=3.10"
dependencies = [
    "pytest>=8.3.4",
29
    "bentoml==1.4.8",
30
    "types-psutil==7.0.0.20250218",
31
    "kubernetes==32.0.1",
32
    "ai-dynamo-runtime==0.2.1",
33
    "fastapi==0.115.6",
34
    "distro",
35
    "typer",
36
    "circus>=0.17.0",
Neelay Shah's avatar
Neelay Shah committed
37
]
38

39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
classifiers = [
    "Development Status :: 4 - Beta",
    "Intended Audience :: Developers",
    "Intended Audience :: Science/Research",
    "Intended Audience :: Information Technology",
    "License :: OSI Approved :: Apache Software License",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Topic :: Scientific/Engineering",
    "Topic :: Scientific/Engineering :: Artificial Intelligence",
    "Operating System :: POSIX :: Linux",
]
keywords = ["llm", "genai", "inference", "nvidia", "distributed", "dynamo"]
Neelay Shah's avatar
Neelay Shah committed
54

55
56
57
[project.urls]
Repository = "https://github.com/ai-dynamo/dynamo.git"

58
[project.optional-dependencies]
59
all = [
60
    "ai-dynamo-vllm~=0.8.4",
61
62
63
    "nixl",
]

64
vllm = [
65
    "ai-dynamo-vllm~=0.8.4"
66
67
]

68
69
70
71
72
73
[project.scripts]
dynamo = "dynamo.sdk.cli.cli:cli"
dynamo-run = "dynamo.sdk.cli.run_executable:dynamo_run"
llmctl = "dynamo.sdk.cli.run_executable:llmctl"
http = "dynamo.sdk.cli.run_executable:http"
metrics = "dynamo.sdk.cli.run_executable:metrics"
74
mock_worker = "dynamo.sdk.cli.run_executable:mock_worker"
75
76

[build-system]
77
78
79
80
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.wheel]
81
packages = ["deploy/sdk/src/dynamo", "components/planner/src/dynamo"]
82
83
84

# This section is for including the binaries in the wheel package
# but doesn't make them executable scripts in the venv bin directory
85
86
87

[tool.hatch.build.hooks.custom]
path = "hatch_build.py"
88

89
90
91
92
93
[tool.codespell]
# note: pre-commit passes explicit lists of files here, which this skip file list doesn't override -
# this is only to allow you to run codespell interactively
# this also overrides the grpc_generated folder, since it is generated

94
95
# Ignore data files and auto-generated files
skip = "./.git,./.github,./lib/llm/tests/data,*.lock,*.sum"
96

97
98
# ignore allowed words used in code
ignore-words-list = "afterall,ser,ende"
99
100
# use the 'clear' dictionary for unambiguous spelling mistakes
builtin = "clear"
101
102
# use custom dictionary in addition to the built-in one
dictionary = "./codespell.txt"
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# disable warnings about binary files and wrong encoding
quiet-level = 3

[tool.isort]
profile = "black"
use_parentheses = true
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
ensure_newline_before_comments = true
line_length = 88
balanced_wrapping = true
indent = "    "
skip = ["build"]
Neelay Shah's avatar
Neelay Shah committed
117
known_first_party = ["dynamo"]
118
119
120

[tool.pytest.ini_options]
minversion = "8.0"
121
tmp_path_retention_policy = "failed"
Neelay Shah's avatar
Neelay Shah committed
122
123
124
125

# NOTE
# We ignore model.py explcitly here to avoid mypy errors with duplicate modules
# pytest overrides the default mypy exclude configuration and so we exclude here as well
126
# Ignore mypy check for api-store component from Dynamo Deploy. Mypy analysis will fail since this package (and its dependencies) are not installed.
127
128
129
130
131
132
133
addopts = [
    "-ra",
    "--showlocals",
    "--strict-markers",
    "--strict-config",
    "--mypy",
    "--ignore-glob=*model.py",
134
    "--ignore-glob=*_inc.py",
135
    "--ignore-glob=deploy/cloud/api-store/*",
136
137
    # FIXME: Get relative/generic blob paths to work here
]
138
139
140
xfail_strict = true
log_cli_level = "INFO"
filterwarnings = [
141
142
143
144
    "error",
    "ignore:.*cuda*:DeprecationWarning", # Need this to avoid deprecation warnings from CUDA in tensorrt_llm.
    "ignore:.*pkg_resources.*:DeprecationWarning",
    "ignore:.*multipart.*:PendingDeprecationWarning"
145
]
146
147


148
149
# NOTE: Can also manually mark tests with @pytest.mark.asyncio
asyncio_mode = "auto"
Neelay Shah's avatar
Neelay Shah committed
150
markers = [
151
152
153
154
    "pre_merge: marks tests to run before merging",
    "nightly: marks tests to run nightly",
    "weekly: marks tests to run weekly",
    "gpu: marks tests to run on GPU"
Neelay Shah's avatar
Neelay Shah committed
155
]
156
157
158
159
160
161
162

# Linting/formatting
[tool.ruff]
# Same as Black.
line-length = 88
indent-width = 4

Blazej's avatar
Blazej committed
163
164
[tool.ruff.lint.extend-per-file-ignores]
"icp/tests/**/test_*.py" = ["F811", "F401"]
165
"*_inc.py" = ["F821"]
Blazej's avatar
Blazej committed
166

167
[tool.mypy]
Neelay Shah's avatar
Neelay Shah committed
168

169
170
# --disable-error-code: WAR large set of errors due to mypy not being run
#   previously. We can slowly enable sets of errors to fix over time.
Neelay Shah's avatar
Neelay Shah committed
171
172
# disable_error_code = []

173
# --explicit-package-bases: WAR errors about duplicate module names used
174
175
176
#   throughout the llm examples. For example, the common module in
#   tensorrt_llm and vllm are both named common.
explicit_package_bases = true
Neelay Shah's avatar
Neelay Shah committed
177

178
179
180
181
# --ignore-missing-imports: WAR too many errors when developing outside
#   of container environment with PYTHONPATH set and packages installed.
#   NOTE: Can possibly move mypy from pre-commit to a github action run only in
#   a container with the expected environment and PYTHONPATH setup.
Neelay Shah's avatar
Neelay Shah committed
182
183
ignore_missing_imports = true

184
185
186
187
check_untyped_defs = true

[[tool.mypy.overrides]]
# Skip mypy analysis on internal dependencies of vllm
188
module = ["vllm.*", "bentoml.*", "fs.*", "_bentoml_sdk.*"]
189
follow_imports = "skip"
190
ignore_missing_imports = true