python3Packages.sentence-transformers: 5.1.2 -> 5.2.0 (#469957)

This commit is contained in:
Nick Cao
2025-12-13 00:57:33 +00:00
committed by GitHub
3 changed files with 85 additions and 9 deletions
@@ -0,0 +1,67 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
setuptools,
# dependencies
onnx,
optimum,
transformers,
# optional-dependencies
onnxruntime,
# onnxruntime-gpu, unpackaged
ruff,
}:
buildPythonPackage rec {
pname = "optimum-onnx";
version = "0.0.2";
pyproject = true;
src = fetchFromGitHub {
owner = "huggingface";
repo = "optimum-onnx";
tag = "v${version}";
hash = "sha256-wT3yqS64LMuq76Yxs6V6nHfD8vgSfPoJm3hbW7E2zpk=";
};
build-system = [
setuptools
];
pythonRelaxDeps = [
"transformers"
];
dependencies = [
onnx
optimum
transformers
];
optional-dependencies = {
onnxruntime = [
onnxruntime
];
# onnxruntime-gpu = [ onnxruntime-gpu ];
quality = [
ruff
];
};
pythonImportsCheck = [ "optimum.onnxruntime" ];
# Almost all tests need internet access
doCheck = false;
meta = {
description = "Export your model to ONNX and run inference with ONNX Runtime";
homepage = "https://github.com/huggingface/optimum-onnx";
changelog = "https://github.com/huggingface/optimum-onnx/releases/tag/${src.tag}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ GaetanLepage ];
};
}
@@ -8,11 +8,7 @@
setuptools,
# dependencies
accelerate,
datasets,
huggingface-hub,
optimum,
pillow,
scikit-learn,
scipy,
torch,
@@ -20,6 +16,15 @@
transformers,
typing-extensions,
# optional-dependencies
# image
pillow,
# train
accelerate,
datasets,
# onnx
optimum-onnx,
# tests
pytestCheckHook,
pytest-cov-stub,
@@ -27,21 +32,20 @@
buildPythonPackage rec {
pname = "sentence-transformers";
version = "5.1.2";
version = "5.2.0";
pyproject = true;
src = fetchFromGitHub {
owner = "huggingface";
repo = "sentence-transformers";
tag = "v${version}";
hash = "sha256-FNJ4mWBcgy3J8ZJtHt+uBgNmvMnqphj+sLMmBvgdB1k=";
hash = "sha256-WD5uTfAbDYYeSXlgznSs4XyN1fAILxILmmSHmLosmV4=";
};
build-system = [ setuptools ];
dependencies = [
huggingface-hub
pillow
scikit-learn
scipy
torch
@@ -51,12 +55,15 @@ buildPythonPackage rec {
];
optional-dependencies = {
image = [
pillow
];
train = [
accelerate
datasets
];
onnx = [ optimum ] ++ optimum.optional-dependencies.onnxruntime;
# onnx-gpu = [ optimum ] ++ optimum.optional-dependencies.onnxruntime-gpu;
onnx = [ optimum-onnx ] ++ optimum-onnx.optional-dependencies.onnxruntime;
# onnx-gpu = [ optimum-onnx ] ++ optimum-onnx.optional-dependencies.onnxruntime-gpu;
# openvino = [ optimum-intel ] ++ optimum-intel.optional-dependencies.openvino;
};
+2
View File
@@ -11438,6 +11438,8 @@ self: super: with self; {
optimum = callPackage ../development/python-modules/optimum { };
optimum-onnx = callPackage ../development/python-modules/optimum-onnx { };
optree = callPackage ../development/python-modules/optree { };
optuna = callPackage ../development/python-modules/optuna { };