Search Criteria
Package Details: python-safetensors 0.4.5-3
Package Actions
Git Clone URL: | https://aur.archlinux.org/python-safetensors.git (read-only, click to copy) |
---|---|
Package Base: | python-safetensors |
Description: | Simple, safe way to store and distribute tensors |
Upstream URL: | https://github.com/huggingface/safetensors |
Licenses: | Apache-2.0 |
Submitter: | Henry-ZHR |
Maintainer: | envolution |
Last Packager: | envolution |
Votes: | 6 |
Popularity: | 0.81 |
First Submitted: | 2023-01-08 09:54 (UTC) |
Last Updated: | 2024-12-23 01:01 (UTC) |
Dependencies (28)
- python (python37AUR, python311AUR, python310AUR)
- python-build (make)
- python-installer (make)
- python-maturin (python-maturin-gitAUR) (make)
- python-setuptools-rust (make)
- python-wheel (make)
- flake8 (check)
- python-black (python-black-gitAUR) (check)
- python-click (check)
- python-flaxAUR (check)
- python-h5py (python-h5py-gitAUR, python-h5py-openmpi) (check)
- python-huggingface-hubAUR (python-huggingface-hub-gitAUR) (check)
- python-hypothesis (check)
- python-isort (check)
- python-jaxAUR (python-jax-binAUR) (check)
- python-jaxlibAUR (python-jax-rocmAUR, python-jaxlib-binAUR, python-jaxlib-cudaAUR) (check)
- python-numpy (python-numpy-gitAUR, python-numpy-mkl-tbbAUR, python-numpy-mklAUR, python-numpy1AUR, python-numpy-mkl-binAUR) (check)
- python-pytest (check)
- python-pytest-benchmark (check)
- python-pytorch (python-pytorch-cxx11abiAUR, python-pytorch-cxx11abi-optAUR, python-pytorch-cxx11abi-cudaAUR, python-pytorch-cxx11abi-opt-cudaAUR, python-pytorch-cxx11abi-rocmAUR, python-pytorch-cxx11abi-opt-rocmAUR, python-pytorch-rocm-binAUR, python-pytorch-cuda, python-pytorch-opt, python-pytorch-opt-cuda, python-pytorch-opt-rocm, python-pytorch-rocm) (check)
- Show 8 more dependencies...
Latest Comments
« First ‹ Previous 1 2 3 4 Next › Last »
t3nzor commented on 2023-11-20 02:22 (UTC) (edited on 2023-11-20 02:22 (UTC) by t3nzor)
The built package doesn't seem to install the Python bindings, only the shared library. I was able to work around this as follows:
makepkg -si --nocheck
sudo cp src/safetensors-0.4.0/bindings/python/py_src/safetensors/* /usr/lib/python3.11/site-packages/safetensors
65a commented on 2023-11-18 02:52 (UTC) (edited on 2023-11-18 02:59 (UTC) by 65a)
@phoenix17, I'm glad it works for you, but it doesn't work for me. The result is still failing to import safetensors.torch or crashing in the check() (this depends on which machine I use?!), using a clean git clone of the AUR source then makepkg -si on multiple machines. Here is one failure log: https://pastebin.com/mppuQw0H
phoenix17 commented on 2023-11-16 20:07 (UTC)
In case this helps someone, I was able to build/install this manually via
makepkg -si
without making any changes to the build script here: https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=python-safetensorsI can confirm it also worked with
python-transformers
package on the aur and pytorch (https://archlinux.org/packages/extra/x86_64/python-pytorch/)pulsarGuy commented on 2023-11-16 04:00 (UTC) (edited on 2023-11-16 04:03 (UTC) by pulsarGuy)
I wound up in @tomsod's situation, and their solution worked for me. Skipping checks did allow the package to be installed, but attempting to import it within python failed. Removing
--wheel
caused the checks to be successful, the package to be installed, and allowed importing within python. Unfortunately, I do not use torch, so I can't comment on that aspect.65a commented on 2023-11-14 02:13 (UTC)
This package doesn't properly provide
safetensors.torch
import. If I follow @tomsod's advice, I can't even importsafetensors
. I suspect it's something betweensrc
andpy-src
directories, but I don't understand python packaging well enough to understand why this is isn't working (PKGBUILD changes look reasonable, but maybe something new is needed to support an upstream change? idk)Tomsod commented on 2023-11-08 04:10 (UTC) (edited on 2023-11-08 04:10 (UTC) by Tomsod)
Tests failed for me too, so I skipped them, but the build package didn't work either. Turns out the
--wheel
option inbuild()
somehow prevents these files from being installed. Without it, everything seems to work fine.Henry-ZHR commented on 2023-08-01 05:06 (UTC)
@ruro
AFAIK, you're right.
What I usually do:
yay
, skip these packagesyay -Syu --mflags --nocheck
Maybe someone can issue a feature request to AUR helpers, but not me.
ruro commented on 2023-07-30 15:29 (UTC)
@Henry-ZHR
Huh. Damn, it seems that you are right. I must have been remembering it wrong.
Please, correct me if I am wrong, but there doesn't seem to be a way to permanently disable
check
for a single package? So you either have to disablecheck
globally for all packages inmakepkg.conf
or you have to do it manually each time the package is updated (which doesn't play well with AUR helpers).Henry-ZHR commented on 2023-07-30 15:07 (UTC)
@ruro
That's what you think, but not what arch devs think. See https://man.archlinux.org/man/PKGBUILD.5.
You are right, but I don't have better solution. Maybe we can select/deselect tests according to whether we have the dependency installed? But that's too ugly...
Well, I suggest simply disabling the tests if you don't want those huge packages to be installed.
ruro commented on 2023-07-30 08:06 (UTC)
@Henry-ZHR the responsibility of package maintainers is to ensure that the software is built, installed and configured "correctly". The purpose of the
check
step is to verify some basic assertions about the built software. Stuff like "the built binary runs without immediately SEGFAULTing or complaining about missing.so
files".An exhaustive validation of all possible code paths and functionality combinations is the responsibility of upstream maintainers and is generally beyond the purview of
check
. To put it simply, thecheck
step should test the validity of the PKGBUILD you have written, not the validity of the upstream source code. If the upstream package has an implementation bug that causes failing/flaky unit tests, the PKGBUILDcheck
should still succeed (assuming the package still builds successfully).Additionally, I would argue that validating compatibility with ALL opt-depends is overkill in this case. I'll admit, optional dependencies are a bit of a grey area, but in this case since the opt-depends include huge packages like tensorflow, torch, jax etc, I would argue that installing all of them by default just for some sanity checks is horrible UX.
« First ‹ Previous 1 2 3 4 Next › Last »