-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
python3Packages.vllm: 0.3.3->0.5.2 #328258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
f2416db
python3Packages.lm-format-enforcer: init at 0.10.4
5377367
python3Packages.pyairports: init at 2.1.1
a96e5f0
python311Packages.vllm: 0.3.2->0.5.2
d40fd0f
python311Packages.vllm: reorder, filter, rename attrs as conventional
SomeoneSerge 4fb7cb4
python311Packages.vllm: postPatch -> patches
SomeoneSerge cc473a3
python311Packages.vllm: export in preBuild -> env
SomeoneSerge b9344b4
python312Packages.vllm: allow building for 3.12
SomeoneSerge 17a50f1
python312Packages.vllm: unbreak in vanilla nixpkgs (default to rocm)
SomeoneSerge File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
pkgs/development/python-modules/lm-format-enforcer/default.nix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| { | ||
| lib, | ||
| buildPythonPackage, | ||
| fetchFromGitHub, | ||
| pydantic, | ||
| interegular, | ||
| pyyaml, | ||
| poetry-core, | ||
| }: | ||
|
|
||
| buildPythonPackage rec { | ||
| pname = "lm-format-enforcer"; | ||
| version = "0.10.4"; | ||
| pyproject = true; | ||
|
|
||
| src = fetchFromGitHub { | ||
| owner = "noamgat"; | ||
| repo = pname; | ||
| rev = "refs/tags/v${version}"; | ||
| hash = "sha256-GOnMj910rgzYeIeN2yLcXZDDel/Hu6nv7ov5BrlHJLg="; | ||
| }; | ||
|
|
||
| build-system = [ poetry-core ]; | ||
|
|
||
| dependencies = [ | ||
| interegular | ||
| pydantic | ||
| pyyaml | ||
| ]; | ||
|
|
||
| doCheck = false; # most tests require internet access | ||
|
|
||
| pythonImportsCheck = [ "lmformatenforcer" ]; | ||
|
|
||
| meta = with lib; { | ||
| description = "Enforce the output format (JSON Schema, Regex etc) of a language model"; | ||
| changelog = "https://github.com/noamgat/lm-format-enforcer/releases/tag/v${version}"; | ||
| homepage = "https://github.com/noamgat/lm-format-enforcer"; | ||
| license = licenses.mit; | ||
| maintainers = with maintainers; [ cfhammill ]; | ||
| }; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| { | ||
| lib, | ||
| buildPythonPackage, | ||
| fetchPypi, | ||
| setuptools, | ||
| }: | ||
|
|
||
| buildPythonPackage rec { | ||
| pname = "pyairports"; | ||
| version = "2.1.1"; | ||
| pyproject = true; | ||
|
|
||
| src = fetchPypi { | ||
| inherit pname version; | ||
| hash = "sha256-PWCnJ/zk2oG5xjk+qK4LM9Z7N+zjRN/8hj90njrWK80="; | ||
| }; | ||
|
|
||
| build-system = [ setuptools ]; | ||
|
|
||
| doCheck = false; | ||
|
|
||
| pythonImportChecks = [ "pyairports" ]; | ||
|
|
||
cfhammill marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| meta = with lib; { | ||
| description = "pyairports is a package which enables airport lookup by 3-letter IATA code."; | ||
| homepage = "https://github.com/ozeliger/pyairports"; | ||
| license = licenses.asl20; | ||
| maintainers = with maintainers; [ cfhammill ]; | ||
| }; | ||
| } | ||
24 changes: 24 additions & 0 deletions
24
pkgs/development/python-modules/vllm/0001-setup.py-don-t-ask-for-hipcc-version.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| From f6a7748bee79fc2e1898968fef844daacfa7860b Mon Sep 17 00:00:00 2001 | ||
| From: SomeoneSerge <else@someonex.net> | ||
| Date: Wed, 31 Jul 2024 12:02:53 +0000 | ||
| Subject: [PATCH 1/2] setup.py: don't ask for hipcc --version | ||
|
|
||
| --- | ||
| setup.py | 1 + | ||
| 1 file changed, 1 insertion(+) | ||
|
|
||
| diff --git a/setup.py b/setup.py | ||
| index 72ef26f1..01e006f9 100644 | ||
| --- a/setup.py | ||
| +++ b/setup.py | ||
| @@ -279,6 +279,7 @@ def _install_punica() -> bool: | ||
|
|
||
|
|
||
| def get_hipcc_rocm_version(): | ||
| + return "0.0" # `hipcc --version` misbehaves ("unresolved paths") inside the nix sandbox | ||
| # Run the hipcc --version command | ||
| result = subprocess.run(['hipcc', '--version'], | ||
| stdout=subprocess.PIPE, | ||
| -- | ||
| 2.45.1 | ||
|
|
40 changes: 40 additions & 0 deletions
40
pkgs/development/python-modules/vllm/0002-setup.py-nix-support-respect-cmakeFlags.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| From 10b7e8330bdba319a4162cceb8e5dd4280215b04 Mon Sep 17 00:00:00 2001 | ||
| From: SomeoneSerge <else@someonex.net> | ||
| Date: Wed, 31 Jul 2024 12:06:15 +0000 | ||
| Subject: [PATCH 2/2] setup.py: nix-support (respect cmakeFlags) | ||
|
|
||
| --- | ||
| setup.py | 10 ++++++++++ | ||
| 1 file changed, 10 insertions(+) | ||
|
|
||
| diff --git a/setup.py b/setup.py | ||
| index 01e006f9..14762146 100644 | ||
| --- a/setup.py | ||
| +++ b/setup.py | ||
| @@ -15,6 +15,15 @@ from setuptools import Extension, find_packages, setup | ||
| from setuptools.command.build_ext import build_ext | ||
| from torch.utils.cpp_extension import CUDA_HOME | ||
|
|
||
| +import os | ||
| +import json | ||
| + | ||
| +if "NIX_ATTRS_JSON_FILE" in os.environ: | ||
| + with open(os.environ["NIX_ATTRS_JSON_FILE"], "r") as f: | ||
| + NIX_ATTRS = json.load(f) | ||
| +else: | ||
| + NIX_ATTRS = { "cmakeFlags": os.environ.get("cmakeFlags", "").split() } | ||
cfhammill marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| + | ||
|
|
||
| def load_module_from_path(module_name, path): | ||
| spec = importlib.util.spec_from_file_location(module_name, path) | ||
| @@ -159,6 +168,7 @@ class cmake_build_ext(build_ext): | ||
| '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY={}'.format(outdir), | ||
| '-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY={}'.format(self.build_temp), | ||
| '-DVLLM_TARGET_DEVICE={}'.format(VLLM_TARGET_DEVICE), | ||
| + *NIX_ATTRS["cmakeFlags"], | ||
| ] | ||
|
|
||
| verbose = envs.VERBOSE | ||
| -- | ||
| 2.45.1 | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.