Package Details: python-flax 0.8.2-1

Git Clone URL: https://aur.archlinux.org/python-flax.git (read-only, click to copy)
Package Base: python-flax
Description: A neural network library and ecosystem for JAX designed for flexibility
Upstream URL: https://github.com/google/flax
Keywords: deep-learning jax
Licenses: Apache
Groups: jax
Submitter: wjhandley
Maintainer: wjhandley (daskol)
Last Packager: daskol
Votes: 2
Popularity: 0.72
First Submitted: 2021-05-25 18:34 (UTC)
Last Updated: 2024-03-14 13:07 (UTC)

Latest Comments

zxeoc commented on 2023-09-21 07:04 (UTC)

@daskol I'm sorry.

daskol commented on 2023-09-20 20:36 (UTC)

@zxeoc Do not paste large outputs in comments, please.

The issue is in python-etils which is a transitive dependency for python-flax.

zxeoc commented on 2023-09-20 19:41 (UTC) (edited on 2023-09-21 07:09 (UTC) by zxeoc)

I got an error when trying to install it on my laptop.

E   ModuleNotFoundError: No module named 'mediapy'
E   
E   Each etils sub-modules require deps to be installed separately (e.g. `from etils import ecolab` -> `pip install etils[ecolab]`)
...
==> ERROR: A failure occurred in check().
    Aborting...
error: failed to build 'python-etils-1.5.0-1': 
error: can't build python-orbax-checkpoint-0.2.7-2, deps not satisfied: python-etils
error: can't build python-flax-0.7.1-5, deps not satisfied: python-orbax-checkpoint
error: packages failed to build: python-etils-1.5.0-1  python-orbax-checkpoint-0.2.7-2  python-flax-0.7.1-5

daskol commented on 2023-07-29 17:47 (UTC) (edited on 2023-07-29 18:00 (UTC) by daskol)

Why two source=(...)?

@Henry-ZHR It was a typo. Sorry. Only the latest one is actual source.

There are several issues. The first one is that Flax Team for some reason does not publish(?) or update package on PyPI (it is recommened way to get sources). The second one is flax/version.py is not updated properly on regular basis (see this PR).

Henry-ZHR commented on 2023-07-29 17:06 (UTC)

Why two source=(...)?

daskol commented on 2023-02-20 13:13 (UTC) (edited on 2023-02-20 13:20 (UTC) by daskol)

@wjhandley Thanks! I've pushed a commit right with fixes suggested earlier. Indeed, python-flax was added by a mistake when I tried to resolve circular dependency between python-flax and python-orbax (see https://github.com/google/flax/issues/2707 for details).

wjhandley commented on 2023-02-20 11:18 (UTC)

Hi daskol. Should it depend on python-flax?

I've made you a co-maintainer if you want to adjust this directly.

daskol commented on 2023-02-16 11:43 (UTC)

Here is a patch which enumerates dependencies and bumps version.

diff --git a/PKGBUILD b/PKGBUILD
index 01391c3..eba80c3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,23 +1,32 @@
 # Maintainer: Will Handley <wh260@cam.ac.uk> (aur.archlinux.org/account/wjhandley)
 pkgname=python-flax
 _name=${pkgname#python-}
-pkgver=0.6.3
+pkgver=0.6.5
 pkgrel=1
 pkgdesc="A neural network library and ecosystem for JAX designed for flexibility"
 arch=(any)
 url="https://github.com/google/flax"
 license=('Apache')
-groups=()
-depends=(python-jax)
-makedepends=(python-build python-installer)
-provides=()
-conflicts=()
-replaces=()
-backup=()
-options=(!emptydirs)
-install=
+groups=('jax')
+depends=(
+    'python-flax'
+    'python-jax'
+    'python-matplotlib'
+    'python-msgpack'
+    'python-numpy'
+    'python-optax'
+    'python-pyyaml'
+    'python-rich'
+    'python-tensorstore'
+    'python-typing_extensions'
+)
+makedepends=('python-build' 'python-installer' 'python-setuptools')
+optdepends=(
+    'python-orbax: Checkpointing routines for JAX.'
+    'tensorboard: TensorBoard visualization and logging.'
+)
 source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
-sha256sums=(064f33f24f49ecef01c171cc770d22493fb8f9a36ed29db5e75f82d2052682a9)
+sha256sums=('12b921fe16198767d0b662a55024b698f6670b311463fa09d39194661fed1b24')

 build() {
     cd "$srcdir/$_name-$pkgver"
@@ -26,6 +35,6 @@ build() {

 package() {
     cd "$srcdir/$_name-$pkgver"
-    python -m installer --destdir="$pkgdir" dist/*.whl
+    python -m installer --compile-bytecode 1 --destdir="$pkgdir" dist/*.whl
 }

kuehnelth commented on 2022-06-28 21:21 (UTC)

This is missing python-build and python-installer make dependencies.