guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: Add python-ml-collections.


From: guix-commits
Subject: branch master updated: gnu: Add python-ml-collections.
Date: Mon, 30 Oct 2023 08:01:32 -0400

This is an automated email from the git hooks/post-receive script.

rekado pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 7e9783b2ab gnu: Add python-ml-collections.
7e9783b2ab is described below

commit 7e9783b2ab8c747ef340daa749bdeba9e924ec57
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Mon Oct 30 13:00:56 2023 +0100

    gnu: Add python-ml-collections.
    
    * gnu/packages/machine-learning.scm (python-ml-collections): New variable.
    
    Change-Id: I9299fe4221f13d979266fccc7b9cdd96a8d6e678
---
 gnu/packages/machine-learning.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/machine-learning.scm 
b/gnu/packages/machine-learning.scm
index 26a8c97a4a..460e77cf0b 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -296,6 +296,42 @@ classification.")
      (list python))
     (synopsis "Python bindings of libSVM")))
 
+(define-public python-ml-collections
+  (package
+    (name "python-ml-collections")
+    (version "0.1.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "ml_collections" version))
+       (sha256
+        (base32 "1k38psfzqsqnl99fl578bd07zdmvfkja61r3sgjs2fj3xircrvrz"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                ;; TODO: we can't seem to run the config_flags tests, because
+                ;; the installed Python files conflict with those from the
+                ;; source directory, resulting in constants to be defined more
+                ;; than once.
+                (invoke "pytest" "ml_collections/config_dict/tests"
+                        ;; This one fails because we're testing the __main__
+                        ;; class, not config_dict_test.
+                        "-k" "not testJSONConversionBestEffort")))))))
+    (propagated-inputs
+     (list python-absl-py python-contextlib2 python-pyyaml python-six))
+    (native-inputs (list python-mock python-pytest))
+    (home-page "https://github.com/google/ml_collections";)
+    (synopsis "Python collections designed for Machine Learning usecases")
+    (description
+     "ML Collections is a library of Python collections designed for Machine
+Learning usecases.")
+    (license license:asl2.0)))
+
 (define-public ghmm
   ;; The latest release candidate is several years and a couple of fixes have
   ;; been published since.  This is why we download the sources from the SVN



reply via email to

[Prev in Thread] Current Thread [Next in Thread]