From patchwork Sat Sep 7 16:56:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 67735 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 1406127BBEA; Sat, 7 Sep 2024 17:58:05 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 7A67F27BBE2 for ; Sat, 7 Sep 2024 17:58:04 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1smyl7-0001xr-T5; Sat, 07 Sep 2024 12:58:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1smyl7-0001xR-3L for guix-patches@gnu.org; Sat, 07 Sep 2024 12:58:01 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1smyl6-0001kU-RB for guix-patches@gnu.org; Sat, 07 Sep 2024 12:58:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=M/gdXunYKSqP4H2+piqrC7ngjEoNNczLZRIZwp1gJQA=; b=naFm9nSv7zmIWYLK1V2B1tiy/e+j+Ft838AHne31u2iEVvq7gxQ5uYZUGuwCFXVGfUS3jOUZ0oV0CYAH8a4siP/SkMv6u+iG4cC+jHb5jf/oG5xuV0N4s0VWZVM8SurqDCvNSfcdJLpuYxuGoo1njpAu7Edl6fGFMmPKUzhvOW0lhwK7mfOeMQhWdlY2DmWzka8TD8fzi3dTa3DkzkOYG6mqzK/mF4GQxNLoHAN9Z6dVvx54OKVySkcovMsqeQYpxcgZxMGBDjslu371hanGQVHkRiJ8ynwj0703fGnT9ui0z0j0fX0iDtm5cuhTS1Wh5JamUq5B/YrFHBpjuEGwdw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1smyl7-0007yy-Pi for guix-patches@gnu.org; Sat, 07 Sep 2024 12:58:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73109] [PATCH 2/2] gnu: Add python-transformers. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 07 Sep 2024 16:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73109 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73109@debbugs.gnu.org Cc: ngraves@ngraves.fr Received: via spool by 73109-submit@debbugs.gnu.org id=B73109.172572823330591 (code B ref 73109); Sat, 07 Sep 2024 16:58:01 +0000 Received: (at 73109) by debbugs.gnu.org; 7 Sep 2024 16:57:13 +0000 Received: from localhost ([127.0.0.1]:57471 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smykL-0007xK-DF for submit@debbugs.gnu.org; Sat, 07 Sep 2024 12:57:13 -0400 Received: from 14.mo550.mail-out.ovh.net ([178.32.97.215]:42673) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smykJ-0007x7-8H for 73109@debbugs.gnu.org; Sat, 07 Sep 2024 12:57:12 -0400 Received: from director8.ghost.mail-out.ovh.net (unknown [10.108.17.234]) by mo550.mail-out.ovh.net (Postfix) with ESMTP id 4X1K5K0Rzyz1Rml for <73109@debbugs.gnu.org>; Sat, 7 Sep 2024 16:57:09 +0000 (UTC) Received: from ghost-submission-55b549bf7b-bvfjf (unknown [10.110.178.140]) by director8.ghost.mail-out.ovh.net (Postfix) with ESMTPS id C59641FE80; Sat, 7 Sep 2024 16:57:08 +0000 (UTC) Received: from ngraves.fr ([37.59.142.108]) by ghost-submission-55b549bf7b-bvfjf with ESMTPSA id d1pcJuSF3GbVwQkAZ4vtfQ (envelope-from ); Sat, 07 Sep 2024 16:57:08 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-108S00249657a7b-1eeb-4315-bf06-942e39bd8d62, 9FD0014F98746B3795650381BBEC0664E0950E21) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 81.67.146.208 Date: Sat, 7 Sep 2024 18:56:55 +0200 Message-ID: <20240907165703.23229-2-ngraves@ngraves.fr> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240907165703.23229-1-ngraves@ngraves.fr> References: <20240907165703.23229-1-ngraves@ngraves.fr> MIME-Version: 1.0 X-Ovh-Tracer-Id: 9648117777620525794 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeeftddrudeifedguddutdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecunecujfgurhephffvvefufffkofgjfhggtgfgsehtkeertdertdejnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepvdffheegkefhkefggfelheffteeigfegiedtudetkeffhfekheevjeefjeeltdeinecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepuddvjedrtddrtddruddpkedurdeijedrudegiedrvddtkedpfeejrdehledrudegvddruddtkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedupdhrtghpthhtohepjeefuddtleesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheehtddpmhhouggvpehsmhhtphhouhht DKIM-Signature: a=rsa-sha256; bh=M/gdXunYKSqP4H2+piqrC7ngjEoNNczLZRIZwp1gJQA=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1725728229; v=1; b=Pg33ZcPItKX8o9EfRRnOkVBo6jzjtgnbfnkQo/8DiswKRr0Pg8+bRo+PbwlkuGuVOO73ubYm q7ncSJ7mW3aAMeiE3I9hmfnRi292iKm56sYYZAEkE6ZxB8kze5lEhTdgIat2nqBtPFHH49AqNPF 1TOrXX+nxpyJRxPsq22RUJL6/jOHGIOr2bOwPkuzMoNGL1/+J1gUOpEJD5E78BXH+pGcMF9lqlC Y1eHKUOOZDW5ArrOe8YlmUUOTDoijX+hGk0EzJVMZCTm2/ucOXCpWXnjADB5qwJ9kqCy5prsvox CtNIbNUb/Yy9xqFqNKeBIfhnlK54QOcuVD97QavZoApAQ== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches X-Patchwork-Original-From: Nicolas Graves via Guix-patches via From: Nicolas Graves Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/machine-learning.scm (python-transformers): New variable. Change-Id: Ifd7fa3a0f4611d3298ab76ceb44b3aea1397b824 --- gnu/packages/machine-learning.scm | 60 +++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 412499d424..42842d7d61 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -5846,6 +5846,66 @@ (define-public python-tokenizers tokenizers, @code{rust-tokenizers}.") (license license:asl2.0))) +(define-public python-transformers + (package + (name "python-transformers") + (version "4.44.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "transformers" version)) + (sha256 + (base32 "09h84wqqk2bgi4vr9d1m3dsliard99l53n96wic405gfjb61gain")))) + (build-system pyproject-build-system) + ;; The imported package contains ~60 more inputs, but they don't seem + ;; necessary to build a minimal version of the package. + (propagated-inputs + (list python-filelock + python-huggingface-hub + python-numpy + python-pytorch + python-pyyaml + python-regex + python-requests + python-safetensors + python-tokenizers + python-tqdm + tensorflow)) + (home-page "https://github.com/huggingface/transformers") + (synopsis "Machine Learning for PyTorch and TensorFlow") + (description + "This package provides easy download of thousands of pretrained models to +perform tasks on different modalities such as text, vision, and audio. + +These models can be applied on: +@itemize +@item Text, for tasks like text classification, information extraction, +question answering, summarization, translation, and text generation, in over +100 languages. +@item Images, for tasks like image classification, object detection, and +segmentation. +@item Audio, for tasks like speech recognition and audio classification. +@end itemize + +Transformer models can also perform tasks on several modalities combined, such +as table question answering, optical character recognition, information +extraction from scanned documents, video classification, and visual question +answering. + +This package provides APIs to quickly download and use those pretrained models +on a given text, fine-tune them on your own datasets and then share them with +the community on our model hub. At the same time, each python module defining +an architecture is fully standalone and can be modified to enable quick +research experiments. + +Transformers is backed by the three most popular deep learning libraries — +Jax, PyTorch and TensorFlow — with a seamless integration between them. It's +straightforward to train your models with one before loading them for +inference with the other. + +Note: This version doesn't support integration with JAX.") + (license license:asl2.0))) + (define-public python-hmmlearn (package (name "python-hmmlearn")