Skip to content

Commit d738b66

Browse files
committed
vllm: amd-aiter optional dependency
2 parents d12e332 + 578c8c8 commit d738b66

8 files changed

Lines changed: 152 additions & 72 deletions

File tree

pkgs/development/python-modules/mistral-common/default.nix

Lines changed: 67 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -5,118 +5,131 @@
55

66
# build-system
77
setuptools,
8+
wheel,
9+
build,
810

911
# dependencies
1012
jsonschema,
1113
numpy,
12-
opencv-python-headless,
1314
pillow,
1415
pydantic,
1516
pydantic-extra-types,
1617
requests,
17-
sentencepiece,
1818
tiktoken,
1919
typing-extensions,
2020

21-
# tests
21+
# optional-dependencies
2222
click,
2323
fastapi,
2424
huggingface-hub,
25-
openai,
26-
pycountry,
25+
jinja2,
26+
llguidance,
27+
opencv-python-headless,
2728
pydantic-settings,
2829
pytestCheckHook,
30+
sentencepiece,
2931
soundfile,
3032
soxr,
33+
uvloop,
34+
35+
# tests
36+
openai,
37+
pycountry,
3138
uvicorn,
3239
}:
3340

34-
buildPythonPackage rec {
41+
buildPythonPackage (finalAttrs: {
3542
pname = "mistral-common";
36-
version = "1.8.8";
43+
version = "1.11.0";
3744
pyproject = true;
3845

3946
src = fetchFromGitHub {
4047
owner = "mistralai";
4148
repo = "mistral-common";
42-
tag = "v${version}";
43-
hash = "sha256-rvW2idAqdCZi7+DsHJXczJKbfceZQ4lQyHScLOqxFIc=";
49+
tag = "v${finalAttrs.version}";
50+
hash = "sha256-DejbLY2i6Hp1J+spxMut5RKugj7rDyrZmp6v+5wqyWY=";
4451
};
4552

46-
build-system = [ setuptools ];
53+
build-system = [
54+
setuptools
55+
wheel
56+
build
57+
];
4758

4859
dependencies = [
4960
jsonschema
5061
numpy
51-
opencv-python-headless
5262
pillow
5363
pydantic
5464
pydantic-extra-types
5565
requests
56-
sentencepiece
5766
tiktoken
5867
typing-extensions
5968
];
6069

61-
optional-dependencies = lib.fix (self: {
62-
opencv = [
63-
opencv-python-headless
64-
];
65-
sentencepiece = [
66-
sentencepiece
67-
];
68-
soundfile = [
69-
soundfile
70-
];
71-
soxr = [
72-
soxr
73-
];
74-
audio = self.soundfile ++ self.soxr;
75-
image = self.opencv;
76-
hf-hub = [
77-
huggingface-hub
78-
];
79-
server = [
80-
click
81-
fastapi
82-
pydantic-settings
83-
]
84-
++ fastapi.optional-dependencies.standard;
85-
});
70+
optional-dependencies =
71+
let
72+
self = finalAttrs.finalPackage.optional-dependencies;
73+
in
74+
{
75+
opencv = [
76+
opencv-python-headless
77+
];
78+
sentencepiece = [
79+
sentencepiece
80+
];
81+
soundfile = [
82+
soundfile
83+
];
84+
soxr = [
85+
soxr
86+
];
87+
audio = self.soundfile ++ self.soxr;
88+
image = self.opencv;
89+
guidance = [
90+
jinja2
91+
llguidance
92+
];
93+
hf-hub = [
94+
huggingface-hub
95+
];
96+
server = [
97+
click
98+
fastapi
99+
pydantic-settings
100+
uvloop
101+
]
102+
++ fastapi.optional-dependencies.standard;
103+
all =
104+
self.opencv
105+
++ self.sentencepiece
106+
++ self.audio
107+
++ self.image
108+
++ self.guidance
109+
++ self.hf-hub
110+
++ self.server;
111+
};
86112

87113
pythonImportsCheck = [ "mistral_common" ];
88114

89115
nativeCheckInputs = [
90-
click
91-
fastapi
92-
huggingface-hub
93116
openai
94117
pycountry
95-
pydantic-settings
96118
pytestCheckHook
97-
soundfile
98-
soxr
99119
uvicorn
100-
];
120+
]
121+
++ finalAttrs.finalPackage.optional-dependencies.all;
101122

102123
disabledTests = [
103-
# Require internet
104-
"test_download_gated_image"
105-
"test_image_encoder_formats"
106-
"test_image_processing"
107-
108-
# AssertionError: Regex pattern did not match.
109-
"test_from_url"
110-
111124
# AssertionError, Extra items in the right set
112125
"test_openai_chat_fields"
113126
];
114127

115128
meta = {
116129
description = "Tools to help you work with Mistral models";
117130
homepage = "https://github.com/mistralai/mistral-common";
118-
changelog = "https://github.com/mistralai/mistral-common/releases/tag/v${version}";
131+
changelog = "https://github.com/mistralai/mistral-common/releases/tag/v${finalAttrs.version}";
119132
license = lib.licenses.asl20;
120133
maintainers = with lib.maintainers; [ bgamari ];
121134
};
122-
}
135+
})

pkgs/development/python-modules/opentelemetry-api/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
let
1515
self = buildPythonPackage rec {
1616
pname = "opentelemetry-api";
17-
version = "1.34.0";
17+
version = "1.40.0";
1818
pyproject = true;
1919

2020
# to avoid breakage, every package in opentelemetry-python must inherit this version, src, and meta
2121
src = fetchFromGitHub {
2222
owner = "open-telemetry";
2323
repo = "opentelemetry-python";
2424
tag = "v${version}";
25-
hash = "sha256-fAXcS2VyDMk+UDW3ru5ZvwzXjydsY1uFcT2GvZuiGWw=";
25+
hash = "sha256-1KVy9s+zjlB4w7E45PMCWRxPus24bgBmmM3k2R9d+Jg=";
2626
};
2727

2828
sourceRoot = "${src.name}/opentelemetry-api";

pkgs/development/python-modules/opentelemetry-instrumentation/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212

1313
buildPythonPackage rec {
1414
pname = "opentelemetry-instrumentation";
15-
version = "0.55b0";
15+
version = "0.61b0";
1616
pyproject = true;
1717

1818
# To avoid breakage, every package in opentelemetry-python-contrib must inherit this version, src, and meta
1919
src = fetchFromGitHub {
2020
owner = "open-telemetry";
2121
repo = "opentelemetry-python-contrib";
2222
tag = "v${version}";
23-
hash = "sha256-UM9ezCh3TVwyj257O0rvTCIgfrddobWcVIgJmBUj/Vo=";
23+
hash = "sha256-DT13gcYPNYXBPnf622WsA16C+7sabJfOshDquHn06Ok=";
2424
};
2525

2626
sourceRoot = "${src.name}/opentelemetry-instrumentation";
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
lib,
3+
buildPythonPackage,
4+
fetchPypi,
5+
hatchling,
6+
opentelemetry-sdk,
7+
opentelemetry-semantic-conventions,
8+
}:
9+
let
10+
version = "0.4.15";
11+
in
12+
buildPythonPackage {
13+
pname = "opentelemetry-semantic-conventions-ai";
14+
inherit version;
15+
pyproject = true;
16+
17+
src = fetchPypi {
18+
pname = "opentelemetry_semantic_conventions_ai";
19+
inherit version;
20+
hash = "sha256-Et4XLR4R0hxugrv1eMfopxNYmn/adq+e14VjJWSii4E=";
21+
};
22+
23+
build-system = [ hatchling ];
24+
25+
dependencies = [
26+
opentelemetry-sdk
27+
opentelemetry-semantic-conventions
28+
];
29+
30+
pythonImportsCheck = [ "opentelemetry.semconv_ai" ];
31+
32+
meta = {
33+
description = "Open-source observability for your GenAI or LLM application, based on OpenTelemetry";
34+
homepage = "https://github.com/traceloop/openllmetry";
35+
license = lib.licenses.asl20;
36+
maintainers = with lib.maintainers; [ lach ];
37+
};
38+
}

pkgs/development/python-modules/vllm/0006-drop-rocm-extra-reqs.patch

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,17 @@ diff --git a/requirements/rocm.txt b/requirements/rocm.txt
22
index 375f0a019..04a59dc3b 100644
33
--- a/requirements/rocm.txt
44
+++ b/requirements/rocm.txt
5-
@@ -9,4 +9,2 @@ ray[cgraph]>=2.48.0 # Ray Compiled Graph, required for pipeline parallelism in V1.
5+
@@ -10,13 +10,7 @@
6+
# Dependencies for AMD GPUs
7+
datasets
68
peft
79
-pytest-asyncio
810
-tensorizer==2.10.1
911
packaging>=24.2
10-
@@ -12,6 +10,2 @@ tensorizer==2.10.1
11-
packaging>=24.2
1212
-setuptools>=77.0.3,<80.0.0
1313
-setuptools-scm>=8
14-
-runai-model-streamer[s3,gcs]==0.15.3
14+
-runai-model-streamer[s3,gcs,azure]==0.15.7
1515
-conch-triton-kernels==1.2.1
1616
timm>=1.0.17
17-
grpcio-tools>=1.76.0
18-
@@ -17,2 +13,1 @@ conch-triton-kernels==1.2.1
19-
timm>=1.0.17
20-
-grpcio-tools>=1.76.0
17+
# amd-quark: required for Quark quantization on ROCm
18+
# To be consistent with test_quark.py
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/requirements/cuda.txt b/requirements/cuda.txt
2+
index 22477dc82..84fe34730 100644
3+
--- a/requirements/cuda.txt
4+
+++ b/requirements/cuda.txt
5+
@@ -14,7 +14,3 @@
6+
# Cap nvidia-cudnn-frontend (transitive dep of flashinfer) due to
7+
# breaking changes in 1.19.0
8+
nvidia-cudnn-frontend>=1.13.0,<1.19.0
9+
-
10+
-# QuACK and Cutlass DSL for FA4 (cute-DSL implementation)
11+
-nvidia-cutlass-dsl>=4.4.0.dev1
12+
-quack-kernels>=0.2.7

0 commit comments

Comments
 (0)