29 buildPythonPackage rec {
30 pname = "sentence-transformers";
34 src = fetchFromGitHub {
36 repo = "sentence-transformers";
37 rev = "refs/tags/v${version}";
38 hash = "sha256-T9y+usEOqz53Wv5gObD5o3gAlABHM3apoq/ySD5ynVg=";
41 build-system = [ setuptools ];
63 pythonImportsCheck = [ "sentence_transformers" ];
66 # Tests require network access
67 "test_cmnrl_same_grad"
68 "test_LabelAccuracyEvaluator"
69 "test_model_card_reuse"
70 "test_paraphrase_mining"
71 "test_ParaphraseMiningEvaluator"
74 "test_trainer_invalid_column_names"
75 "test_trainer_multi_dataset_errors"
79 # Tests require network access
80 "tests/evaluation/test_information_retrieval_evaluator.py"
81 "tests/test_compute_embeddings.py"
82 "tests/test_cross_encoder.py"
83 "tests/test_model_card_data.py"
84 "tests/test_multi_process.py"
85 "tests/test_pretrained_stsb.py"
86 "tests/test_sentence_transformer.py"
87 "tests/test_train_stsb.py"
90 # Sentence-transformer needs a writable hf_home cache
92 export HF_HOME=$(mktemp -d)
96 description = "Multilingual Sentence & Image Embeddings with BERT";
97 homepage = "https://github.com/UKPLab/sentence-transformers";
98 changelog = "https://github.com/UKPLab/sentence-transformers/releases/tag/${version}";
99 license = lib.licenses.asl20;
100 maintainers = with lib.maintainers; [ dit7ya ];
101 # Segmentation fault at import
102 broken = stdenv.hostPlatform.system == "x86_64-darwin";