depot/third_party/nixpkgs/pkgs/development/python-modules/sentence-transformers/default.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

54 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, huggingface-hub
, nltk
, numpy
, scikit-learn
, scipy
, sentencepiece
, tokenizers
, torch
, torchvision
, tqdm
, transformers
}:
buildPythonPackage rec {
pname = "sentence-transformers";
version = "2.2.2";
format = "setuptools";
src = fetchFromGitHub {
owner = "UKPLab";
repo = "sentence-transformers";
rev = "v${version}";
hash = "sha256-hEYpDAL0lliaS1j+c5vaZ0q1hw802jfTUurx/FvgY9w=";
};
propagatedBuildInputs = [
huggingface-hub
nltk
numpy
scikit-learn
scipy
sentencepiece
tokenizers
torch
torchvision
tqdm
transformers
];
pythonImportsCheck = [ "sentence_transformers" ];
doCheck = false; # tests fail at build_ext
meta = with lib; {
description = "Multilingual Sentence & Image Embeddings with BERT";
homepage = "https://github.com/UKPLab/sentence-transformers";
changelog = "https://github.com/UKPLab/sentence-transformers/releases/tag/${src.rev}";
license = licenses.asl20;
maintainers = with maintainers; [ dit7ya ];
};
}