From patchwork Sat Sep 7 10:08:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 67714 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 70A3227BBEA; Sat, 7 Sep 2024 11:10:47 +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 E455A27BBE2 for ; Sat, 7 Sep 2024 11:10:46 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1smsOe-0001Ir-UZ; Sat, 07 Sep 2024 06:10:24 -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 1smsOM-00019w-0b for guix-patches@gnu.org; Sat, 07 Sep 2024 06:10:06 -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 1smsOL-0007rO-26 for guix-patches@gnu.org; Sat, 07 Sep 2024 06:10:05 -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=9b17omu0MEDzNaQZWwjQJuMu7IEGiJlOwlbENl4RXS0=; b=GyW5npQt1JOGJ6xQmEkbnFOJ87sD+m9+obWb5WSA+U7p73bfGfVbG6Di5rjl+5HnI93vkfJL4WIRPh94dW/PpfaPD4hYXx14Jg4oRlk4a7n23gEco2CGyV22P1bi8L1+/mqW9boXHDKQFPZDyns6acH3qfa04a43CXRI/d8Dfmges9y65K7oVAckLW2kpt1DQ+y1ebOG2XXbVdx6pdDAZ5o/5rP7DPDuAzdsGNRxmBDof2VtAJMS99V+i4N1P5WMAFAZG36NWASB2BnSrNmmFGmgTgfN5fwAWGRDbP/+DmfVLQuCQPI2Gh0W//gVpq9wax3ETjkdOjrL43ODBNR/Fw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1smsOL-0001SP-Kr for guix-patches@gnu.org; Sat, 07 Sep 2024 06:10:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73094] [PATCH 09/10] gnu: Add rust-safetensors. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 07 Sep 2024 10:10:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73094 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73094@debbugs.gnu.org Cc: ngraves@ngraves.fr Received: via spool by 73094-submit@debbugs.gnu.org id=B73094.17257037795311 (code B ref 73094); Sat, 07 Sep 2024 10:10:05 +0000 Received: (at 73094) by debbugs.gnu.org; 7 Sep 2024 10:09:39 +0000 Received: from localhost ([127.0.0.1]:54968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smsNu-0001Na-Ic for submit@debbugs.gnu.org; Sat, 07 Sep 2024 06:09:39 -0400 Received: from 12.mo550.mail-out.ovh.net ([87.98.162.229]:59759) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smsNs-0001NR-Rb for 73094@debbugs.gnu.org; Sat, 07 Sep 2024 06:09:37 -0400 Received: from director1.ghost.mail-out.ovh.net (unknown [10.109.176.215]) by mo550.mail-out.ovh.net (Postfix) with ESMTP id 4X1832727Rz1Nj7 for <73094@debbugs.gnu.org>; Sat, 7 Sep 2024 10:09:34 +0000 (UTC) Received: from ghost-submission-55b549bf7b-tjx5n (unknown [10.110.113.85]) by director1.ghost.mail-out.ovh.net (Postfix) with ESMTPS id AA6D31FDD1; Sat, 7 Sep 2024 10:09:34 +0000 (UTC) Received: from ngraves.fr ([37.59.142.110]) by ghost-submission-55b549bf7b-tjx5n with ESMTPSA id YeaAIF4m3GYnjQAArL/n3w (envelope-from ); Sat, 07 Sep 2024 10:09:34 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-110S004d6b704f9-6867-4420-b217-2f52e6e2dd8f, 9FD0014F98746B3795650381BBEC0664E0950E21) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 81.67.146.208 Date: Sat, 7 Sep 2024 12:08:51 +0200 Message-ID: <20240907100908.25197-9-ngraves@ngraves.fr> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240907100908.25197-1-ngraves@ngraves.fr> References: <20240907100908.25197-1-ngraves@ngraves.fr> MIME-Version: 1.0 X-Ovh-Tracer-Id: 2764647225261679330 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeeftddrudeifedgvdeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfgggtgfesthekredtredtjeenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpedvffehgeekhfekgffgleehffetiefggeeitdduteekfffhkeehveejfeejledtieenucffohhmrghinhepghhithhhuhgsrdgtohhmnecukfhppeduvdejrddtrddtrddupdekuddrieejrddugeeirddvtdekpdefjedrheelrddugedvrdduuddtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopeejfedtleegseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehhedtpdhmohguvgepshhmthhpohhuth DKIM-Signature: a=rsa-sha256; bh=9b17omu0MEDzNaQZWwjQJuMu7IEGiJlOwlbENl4RXS0=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1725703775; v=1; b=qiu+cg4fpqgvQs6vJnomSgdzkEM2uLrpBJzGHwBt0yaq7fVWvAxZ4z9GTTt8Hrpe3kcodLYj z9WGhh2W2iCxXST6wsmNGNrntMadFB0lkDxls4PeacOEQBTtzdhCUPLPRr6D44HARhabCjDt1A/ 6FtnI0/tfsk+gDrmlqOr9dAbxsXqq6h1ERPM3J4UvX213obI7w7ve4dQCzWe5rsYmwJABHk1vsy sc5aas2tzd/sYCEucIYgvgOCHJO7cBF37+qziRvHPDOCRdckeX0r20wLQuesIPNusPBoqQ/jtG8 /LX381N1oWnQgPq9CAZ08023VFo89s78n/9swTCkz4OnA== 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 (rust-safetensors): New variable. Change-Id: I2733dbae90b292ed6485666cf875d6fb899c5d12 --- gnu/packages/machine-learning.scm | 32 ++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index d9a02b7093..a4aeb97be7 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -17,7 +17,7 @@ ;;; Copyright © 2020 Edouard Klein ;;; Copyright © 2020, 2021, 2022, 2023, 2024 Vinicius Monego ;;; Copyright © 2020, 2021, 2022, 2023 Maxim Cournoyer -;;; Copyright © 2022, 2023 Nicolas Graves +;;; Copyright © 2022, 2023, 2024 Nicolas Graves ;;; Copyright © 2022 Kiran Shila ;;; Copyright © 2023 zamfofex ;;; Copyright © 2023 Navid Afkhami @@ -52,6 +52,7 @@ (define-module (gnu packages machine-learning) #:use-module (guix utils) #:use-module (guix download) #:use-module (guix svn-download) + #:use-module (guix build-system cargo) #:use-module (guix build-system cmake) #:use-module (guix build-system copy) #:use-module (guix build-system gnu) @@ -77,6 +78,7 @@ (define-module (gnu packages machine-learning) #:use-module (gnu packages cmake) #:use-module (gnu packages cpp) #:use-module (gnu packages cran) + #:use-module (gnu packages crates-io) #:use-module (gnu packages databases) #:use-module (gnu packages dejagnu) #:use-module (gnu packages documentation) @@ -1090,6 +1092,34 @@ (define-public python-sacrebleu and reproducible BLEU, chrF, and TER scores for natural language processing.") (license license:asl2.0))) +(define-public rust-safetensors + (package + (name "rust-safetensors") + (version "0.4.3") + (source + (origin + (method url-fetch) + (uri (crate-uri "safetensors" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "1fbx56wikqcvqb4y0ym0cys68lj0v3cpanhsy5i13fkz5jr7dvcc")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs + (("rust-serde" ,rust-serde-1) + ("rust-serde-json" ,rust-serde-json-1)) + #:cargo-development-inputs + (("rust-criterion" ,rust-criterion-0.5) + ("rust-memmap2" ,rust-memmap2-0.9) + ("rust-proptest" ,rust-proptest-1)))) + (home-page "https://github.com/huggingface/safetensors") + (synopsis "Simple and safe way to store and distribute tensors") + (description + "This package provides a fast (zero-copy) and safe (dedicated) format for +storing tensors safely, named safetensors. They aim to be safer than their +@code{PyTorch} counterparts.") + (license license:asl2.0))) + (define-public python-sentencepiece (package (name "python-sentencepiece")