1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 torch, 7}: 8 9buildPythonPackage rec { 10 pname = "curated-transformers"; 11 version = "0.1.1"; 12 pyproject = true; 13 14 src = fetchFromGitHub { 15 owner = "explosion"; 16 repo = "curated-transformers"; 17 tag = "v${version}"; 18 hash = "sha256-QhJZnQIa9TilwdQCUlxnQCEc6Suj669cht6WHUAr/Gw="; 19 }; 20 21 build-system = [ setuptools ]; 22 23 dependencies = [ torch ]; 24 25 # Unit tests are hard to use, since most tests rely on downloading 26 # models from Hugging Face Hub. 27 pythonImportsCheck = [ "curated_transformers" ]; 28 29 meta = with lib; { 30 description = "PyTorch library of curated Transformer models and their composable components"; 31 homepage = "https://github.com/explosion/curated-transformers"; 32 changelog = "https://github.com/explosion/curated-transformers/releases/tag/v${version}"; 33 license = licenses.mit; 34 maintainers = with maintainers; [ danieldk ]; 35 }; 36}