From patchwork Fri Nov 10 17:27:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timothee Mathieu X-Patchwork-Id: 56229 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 E88E827BBE9; Fri, 10 Nov 2023 17:31:21 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HTML_MESSAGE,MAILING_LIST_MULTI,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable 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 8877627BBE2 for ; Fri, 10 Nov 2023 17:31:19 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r1VL4-00043u-Lr; Fri, 10 Nov 2023 12:30:38 -0500 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 1r1VKr-00042A-Lo for guix-patches@gnu.org; Fri, 10 Nov 2023 12:30:26 -0500 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 1r1VKq-0002pV-0A for guix-patches@gnu.org; Fri, 10 Nov 2023 12:30:25 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r1VLT-0002Dv-NJ for guix-patches@gnu.org; Fri, 10 Nov 2023 12:31:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67051] [PATCH] gnu: Add python-scikit-learn-extra Resent-From: Timothee Mathieu Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 10 Nov 2023 17:31:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67051 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67051@debbugs.gnu.org Cc: Timothee Mathieu X-Debbugs-Original-To: guix-patches Received: via spool by submit@debbugs.gnu.org id=B.16996374418482 (code B ref -1); Fri, 10 Nov 2023 17:31:03 +0000 Received: (at submit) by debbugs.gnu.org; 10 Nov 2023 17:30:41 +0000 Received: from localhost ([127.0.0.1]:50801 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1VL6-0002Cc-Gg for submit@debbugs.gnu.org; Fri, 10 Nov 2023 12:30:41 -0500 Received: from lists.gnu.org ([2001:470:142::17]:34430) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1VJF-00027z-A7 for submit@debbugs.gnu.org; Fri, 10 Nov 2023 12:28:47 -0500 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 1r1VIV-0003pH-DS for guix-patches@gnu.org; Fri, 10 Nov 2023 12:27:59 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r1VIS-0002JS-69 for guix-patches@gnu.org; Fri, 10 Nov 2023 12:27:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:cc:message-id:subject:mime-version; bh=xc/F6hQNAPJbyhu+02UOlS6fuG6YpAnFih71kN/Uedg=; b=YZ8vHb4ID+/760EaMtjhc9CRYHh+ei6dymk0z61qREOdDVdhOvTKtqrV BaWQ0hxzMeJSyrxUe7mC9os530y9vzZpWCdTdHMC8N8OAWl8/kG61uCH4 iU7X78EcccYk1IIGM5OWZhYd2ouTzyyM9N3JULWLkZDHMQbSx4Lze1ni4 A=; Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=Pass smtp.mailfrom=timothee.mathieu@inria.fr; spf=None smtp.helo=postmaster@zcs-store9.inria.fr Received-SPF: Pass (mail2-relais-roc.national.inria.fr: domain of timothee.mathieu@inria.fr designates 128.93.142.36 as permitted sender) identity=mailfrom; client-ip=128.93.142.36; receiver=mail2-relais-roc.national.inria.fr; envelope-from="timothee.mathieu@inria.fr"; x-sender="timothee.mathieu@inria.fr"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:128.93.142.0/24 ip4:192.134.164.0/24 ip4:128.93.162.160 ip4:89.107.174.7 mx ~all" Received-SPF: None (mail2-relais-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@zcs-store9.inria.fr) identity=helo; client-ip=128.93.142.36; receiver=mail2-relais-roc.national.inria.fr; envelope-from="timothee.mathieu@inria.fr"; x-sender="postmaster@zcs-store9.inria.fr"; x-conformance=spf_only X-IronPort-AV: E=Sophos;i="6.03,291,1694728800"; d="scan'208,217,223";a="135784655" X-MGA-submission: MDG7jmIIktzWDgKHH5ZgbrMeCXy7ddmhDMT4mploZNz2pGkJ3HJbzDx3pBf5dFq+qP/7t9ikVAamDb4Q/GJGy9hWNbA1cwN+BiTsibAS+3HLL7pS0x9ehTcKaO+JH1C7vymfRKGtET/mtEodo8eaBE/N7FNA9tqqEqnVkBNrx7tHHg== Received: from zcs-store9.inria.fr ([128.93.142.36]) by mail2-relais-roc.national.inria.fr with ESMTP; 10 Nov 2023 18:27:43 +0100 Date: Fri, 10 Nov 2023 18:27:43 +0100 (CET) From: Timothee Mathieu Message-ID: <625475154.8447192.1699637263695.JavaMail.zimbra@inria.fr> MIME-Version: 1.0 X-Originating-IP: [92.184.104.109] X-Mailer: Zimbra 8.8.15_GA_4562 (ZimbraWebClient - FF119 (Linux)/8.8.15_GA_4570) Thread-Index: NCK299Rp4c2UNBR+/jgBec/HZ1G3dg== Thread-Topic: Add python-scikit-learn-extra Received-SPF: pass client-ip=192.134.164.83; envelope-from=timothee.mathieu@inria.fr; helo=mail2-relais-roc.national.inria.fr X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 10 Nov 2023 12:30:36 -0500 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: , 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 From 59c388e64c12e39f7fb91ca538be332a130a3872 Mon Sep 17 00:00:00 2001 Message-ID: <59c388e64c12e39f7fb91ca538be332a130a3872.1699637173.git.timothee.mathieu@inria.fr> From: Timothee Mathieu Date: Fri, 10 Nov 2023 17:54:05 +0100 Subject: [PATCH] gnu: Add python-scikit-learn-extra. * gnu/packages/machine-learning.scm (python-scikit-learn-extra): New variable. Change-Id: I50992ceaa76608f3345df6d74a5d9e4aa7c485a5 --- gnu/packages/machine-learning.scm | 41 +++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) base-commit: bb3ab24a296ffa5273b2e82a02ed057e90c095f3 diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index a84377e1eb..1d0b796c68 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -1532,6 +1532,47 @@ (define-public python-scikit-learn data analysis.") (license license:bsd-3))) +(define-public python-scikit-learn-extra +(package + (name "python-scikit-learn-extra") + (version "0.3.0") +(source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/scikit-learn-contrib/scikit-learn-extra") + (commit "v0.3.0"))) + (file-name (git-file-name name version)) + (sha256 (base32 "0yy6ka94ss88f3r7b6mpjf1l8lnv7aabhsg844pigfj8lfiv0wvl")))) + (build-system pyproject-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'build 'build-ext + (lambda _ (invoke "python" "setup.py" "build_ext" "--inplace"))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + ;; Restrict OpenBLAS threads to prevent segfaults while testing! + (setenv "OPENBLAS_NUM_THREADS" "1") + + ;; Some tests require write access to $HOME. + (setenv "HOME" "/tmp") + + ;; Step out of the source directory to avoid interference; + ;; we want to run the installed code with extensions etc. + (with-directory-excursion "/tmp" + (invoke "pytest" "-vv" "--pyargs" "sklearn_extra" + ;; ignore tests that require network + "-k" "not test_build")))))))) + (propagated-inputs (list python-numpy python-scikit-learn python-scipy)) + (native-inputs (list python-pytest python-pytest-cov python-cython)) + (home-page "https://github.com/scikit-learn-contrib/scikit-learn-extra") + (synopsis "Set of tools for scikit-learn") + (description "This package provides a set of tools for scikit-learn.") + (license license:bsd-3)) +) + (define-public python-thinc (package (name "python-thinc")