transformers: init at 2.2.1
This commit is contained in:
parent
16d9c2a570
commit
dae6544457
41
pkgs/development/python-modules/transformers/default.nix
Normal file
41
pkgs/development/python-modules/transformers/default.nix
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
{ buildPythonPackage
|
||||||
|
, stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, sacremoses
|
||||||
|
, requests
|
||||||
|
, sentencepiece
|
||||||
|
, boto3
|
||||||
|
, tqdm
|
||||||
|
, regex
|
||||||
|
, numpy
|
||||||
|
, pytest
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "transformers";
|
||||||
|
version = "2.2.1";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "huggingface";
|
||||||
|
repo = pname;
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "1p8p3lhhiyk1xl9gpgq4vbchyz57v3w7hhvsj1r90zs3cckindl8";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ numpy sacremoses requests sentencepiece boto3 tqdm regex ];
|
||||||
|
|
||||||
|
checkInputs = [ pytest ];
|
||||||
|
# pretrained tries to download from s3
|
||||||
|
checkPhase = ''
|
||||||
|
cd transformers # avoid importing local files
|
||||||
|
HOME=$TMPDIR pytest -k 'not pretrained_tokenizers'
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
homepage = "https://github.com/huggingface/transformers";
|
||||||
|
description = "State-of-the-art Natural Language Processing for TensorFlow 2.0 and PyTorch";
|
||||||
|
license = licenses.asl20;
|
||||||
|
platforms = [ "x86_64-linux" ];
|
||||||
|
maintainers = with maintainers; [ pashashocky ];
|
||||||
|
};
|
||||||
|
}
|
@ -1287,6 +1287,8 @@ in {
|
|||||||
inherit (pkgs) sentencepiece pkgconfig;
|
inherit (pkgs) sentencepiece pkgconfig;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
transformers = callPackage ../development/python-modules/transformers { };
|
||||||
|
|
||||||
sentinel = callPackage ../development/python-modules/sentinel { };
|
sentinel = callPackage ../development/python-modules/sentinel { };
|
||||||
|
|
||||||
sentry-sdk = callPackage ../development/python-modules/sentry-sdk {};
|
sentry-sdk = callPackage ../development/python-modules/sentry-sdk {};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user