From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2EeEKS0+ZmGKfwEAgWs5BA (envelope-from ) for ; Wed, 13 Oct 2021 04:02:21 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id iGwiJS0+ZmFUNAAAB5/wlQ (envelope-from ) for ; Wed, 13 Oct 2021 02:02:21 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4B5B116395 for ; Wed, 13 Oct 2021 04:02:21 +0200 (CEST) Received: from localhost ([::1]:54460 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maTb2-0007sR-5c for larch@yhetil.org; Tue, 12 Oct 2021 22:02:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48904) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maTal-0007mP-F7 for guix-patches@gnu.org; Tue, 12 Oct 2021 22:02:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45169) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maTal-0004rd-4J for guix-patches@gnu.org; Tue, 12 Oct 2021 22:02:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1maTal-0007VY-2D for guix-patches@gnu.org; Tue, 12 Oct 2021 22:02:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50956] [PATCH v2 4/4] gnu: Add python-optuna. Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 13 Oct 2021 02:02:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50956 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50956@debbugs.gnu.org Cc: Vinicius Monego Received: via spool by 50956-submit@debbugs.gnu.org id=B50956.163409048028796 (code B ref 50956); Wed, 13 Oct 2021 02:02:03 +0000 Received: (at 50956) by debbugs.gnu.org; 13 Oct 2021 02:01:20 +0000 Received: from localhost ([127.0.0.1]:56713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1maTZx-0007UG-0v for submit@debbugs.gnu.org; Tue, 12 Oct 2021 22:01:20 -0400 Received: from mout01.posteo.de ([185.67.36.65]:43841) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1maTZu-0007Td-5u for 50956@debbugs.gnu.org; Tue, 12 Oct 2021 22:01:11 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 7A9CA240026 for <50956@debbugs.gnu.org>; Wed, 13 Oct 2021 04:01:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1634090464; bh=8xJUsyzM9fq8i0xJa2kKKcWdMC1ZSKf1v21V8kjgB28=; h=From:To:Cc:Subject:Date:From; b=Z4W5pKjXQKHT0UHtqzAt26fKRTyIXxi+J6YY86+FxhGG/qrBdxDjxW4cQ/6CpDv/O Er3iXXIKNaiGA1acl3znYPcPvyuuztgjYCyi5dVWXh2lzM6rD8oZmNis8Dj5IGZTxm BUmNeHT4mEkDAuzOZJhK+vTARKsWlgGP3FzyjhcXGf5+x94UrLDasCPbjDLQ4KLCBE XDoOGHF6joqJDmNsaSPcHWblWAMXk7VjY1IoGy5SkPC0iSRaKEaT8lSo04RR60B0a7 i4lIhpdNESMTefmW2b2Cdalg8jC1At8KDG8blt2LiZmmUheEBimPnREM+CCR4aWbYs OZVimnqVdmfaw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4HTbNb414vz9rxM; Wed, 13 Oct 2021 04:01:03 +0200 (CEST) From: Vinicius Monego Date: Wed, 13 Oct 2021 02:00:35 +0000 Message-Id: <20211013020035.53000-4-monego@posteo.net> In-Reply-To: <20211013020035.53000-1-monego@posteo.net> References: <20211013020035.53000-1-monego@posteo.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1634090541; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=vegOcaiaNI8+QokO+TWzfBDHJoRZtQA5Jq92MLGFSIc=; b=Rw9yeNgOlM3Qsm3uAhWzCIoH+Q5n2I4e2pEstjOrdNb7AUMS/fdsxAZJVzrCiRyJWJ3IbN ZHTKQosMJoekD8OIHKVaT2fmmhNh59HvHNeROYsJ+VXm1JVHPtDibLw2s0wvLHIa65e4v/ 6/P0oHDsvlTxtibymWYyy3sFNU/UBfmDCdDkC5pvDxj1iC1n7O1roCwMmQqWsCgrXfiszT J7/VmsSIkd14FHPDUu2q5Adl3S3A/3Wmb/C5G1w6ALAP744qJ+Uw9GFV1/ceNimmjBJEu/ GfBDHkWM3O40gvjyG1E7Uy/N8XqDFV8XQTNB9239W+ErhvD/b6KgVcLxAHRR0Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1634090541; a=rsa-sha256; cv=none; b=rMuEG3aGBOv7ocTzZuJGzg49UnKZPmHqcwBo6fKHRcc3/ChKJa74/QY/7bSCQnf4Elt0W8 8ZYd7ghKzoUu1eiudBWYJeibwUuDJsj8CJr+Xlo96o0/u0h2ph3rAVSF9+aTuE4dlWBhGx l6jPugIpMqSLCTMYe4MeJoMyQPs+MqSDUAxZ0AuTPPRKhCQI72L+yQhJl0RHPuQnWwf2pQ yf/dFZoA/0KoMtTZnkjb2AwrwB2h3R2orHEiy15wRuwNQ9eB3TFaCICJMxjWchVi2oikTk YceKB/UuiaKSBaRYQ91Vy5zo3ZTUBW3vUzToo58+Us4HVZUoCANM6UFx4zkuFw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=Z4W5pKjX; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 3.69 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=Z4W5pKjX; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 4B5B116395 X-Spam-Score: 3.69 X-Migadu-Scanner: scn0.migadu.com X-TUID: u68GZRytZHvs * gnu/packages/machine-learning.scm (python-optuna): New variable. --- Updated to 2.10.0, added scikit-optimize to native-inputs don't delete the test file that requires it. Swapped order of native and propagated inputs. gnu/packages/machine-learning.scm | 93 +++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 09767584bb..44033cfb77 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -74,6 +74,7 @@ #:use-module (gnu packages ocaml) #:use-module (gnu packages onc-rpc) #:use-module (gnu packages parallel) + #:use-module (gnu packages openstack) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages protobuf) @@ -938,6 +939,98 @@ computing environments.") (home-page "http://dlib.net") (license license:boost1.0))) +(define-public python-optuna + (package + (name "python-optuna") + (version "2.10.0") + (source + (origin + (method git-fetch) ; no tests in PyPI tarball + (uri (git-reference + (url "https://github.com/optuna/optuna") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0fha0pwxq6n3mbpvpz3vk8hh61zqncj5cnq063kzfl5d8rd48vcd")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'dont-check-deps + ;; Don't check for test dependencies we don't have. + ;; TODO: Package and enable some of these. + (lambda _ + (substitute* "setup.py" + ((".*allennlp.*") "") + ((".*bokeh.*") "") + ((".*catalyst.*") "") + ((".*chainer.*") "") + ((".*fastai.*") "") + ((".*keras.*") "") + ((".*lightgbm.*") "") + ((".*mlflow.*") "") + ((".*mxnet.*") "") + ((".*plotly.*") "") + ((".*skorch.*") "") + ((".*tensorflow.*") "") + ((".*torch.*") "") + ((".*xgboost.*") "")))) + (add-after 'unpack 'disable-some-tests + (lambda _ + ;; Integration tests require most of the dependencies above. + (delete-file-recursively "tests/integration_tests") + ;; TODO: Requires bokeh. + (delete-file "tests/test_dashboard.py") + ;; FIXME: "Optuna" executable is not found. + (delete-file "tests/test_cli.py") + ;; FIXME: Files below require plotly but setup fails to identify + ;; plotly version and suggests an upgrade to >= 4.0.0. + (delete-file "tests/visualization_tests/test_contour.py") + (delete-file (string-append "tests/multi_objective_tests/" + "visualization_tests/" + "test_pareto_front.py")) + (delete-file-recursively "tests/visualization_tests"))) + (replace 'check + (lambda* (#:key inputs outputs tests? #:allow-other-keys) + (when tests? + (add-installed-pythonpath inputs outputs) + (invoke "python" "-m" "pytest" "-k" + ;; redis.exceptions.ResponseError: unknown command 'TIME'. + (string-append + "not test_retry_failed_trial_callback" + " and not test_failed_trial_callback" + " and not test_fail_stale_trials_with_optimize")))))))) + (native-inputs + `(("python-cma" ,python-cma) + ("python-fakeredis" ,python-fakeredis) + ("python-matplotlib" ,python-matplotlib) + ("python-mpi4py" ,python-mpi4py) + ("python-pandas" ,python-pandas) + ("python-pytest" ,python-pytest) + ("python-redis" ,python-redis) + ("python-scikit-learn" ,python-scikit-learn) + ("python-scikit-optimize" ,python-scikit-optimize) + ("which" ,which))) + (propagated-inputs + `(("python-alembic" ,python-alembic) + ("python-cliff" ,python-cliff) + ("python-cmaes" ,python-cmaes) + ("python-colorlog" ,python-colorlog) + ("python-numpy" ,python-numpy) + ("python-packaging" ,python-packaging) + ("python-pyyaml" ,python-pyyaml) + ("python-scipy" ,python-scipy) + ("python-sqlalchemy" ,python-sqlalchemy) + ("python-tqdm" ,python-tqdm))) + (home-page "https://optuna.org/") + (synopsis "Hyperparameter optimization framework") + (description "Optuna is an automatic hyperparameter optimization software +framework, particularly designed for machine learning. It features an +imperative, @emph{define-by-run} style user API. Thanks to it, the code +written with Optuna enjoys high modularity, and the user of Optuna can +dynamically construct the search spaces for the hyperparameters.") + (license license:expat))) + (define-public python-scikit-learn (package (name "python-scikit-learn") -- 2.30.2