Bug 2587604 - Review Request: python-compressed-tensors - A safetensors extension to efficiently store sparse quantized tensors on disk
Summary: Review Request: python-compressed-tensors - A safetensors extension to effici...
Keywords:
Status: RELEASE_PENDING
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jan
QA Contact: Fedora Extras Quality Assurance
URL: https://github.com/vllm-project/compr...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-11-30 20:59 UTC by Tom.Rix
Modified: 2026-12-03 13:28 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:
copper_fin: fedora-review+


Attachments (Terms of Use)
The .spec file difference from Copr build 11411476 to 11422720 (1.28 KB, patch)
2026-12-02 16:48 UTC, Fedora Review Service
no flags Details | Diff

Comment 1 Fedora Review Service 2026-11-30 21:12:51 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/11411476
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2587604-python-compressed-tensors/fedora-rawhide-x86_64/11411476-python-compressed-tensors/fedora-review/review.txt

Please take a look if any issues were found.


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 2 Jan 2026-12-01 16:56:49 UTC
Hi Tom, I'm taking this review. Local mock build (rawhide x86_64) and a Koji
scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=152897882

Issues
======
1. [MUST] The Koji scratch build fails: Koji built this noarch package on a
   ppc64le builder, where torch doesn't exist:
     nothing provides python3.15dist(torch) >= 2 needed by
     python3-accelerate-1.13.0-4.fc45.noarch
   torch is built only for x86_64 and aarch64, and the generated runtime
   BuildRequires pull it in even with tests off, so official builds would fail
   whenever Koji picks ppc64le or s390x. Please use the same block as
   python-accelerate:
     # Define our own pytorch_arches macro until we have one system-wide.
     %if %{undefined pytorch_arches}
     %global pytorch_arches %{x86_64} %{arm64}
     %endif
     ExclusiveArch:  %{pytorch_arches} noarch

2. [SHOULD] The test-only BuildRequires (accelerate, datasets, nbconvert,
   pytest, safetensors, tokenizers) are unconditional, but %pytest runs only
   with --with check. Please wrap them in %if %{with check}. pip doesn't look
   needed at all (%pyproject_buildrequires already provides what the build
   backend needs).

3. [Question] src/compressed_tensors/transform/utils/hadamards.safetensors
   (1.4 MB, installed) is precomputed data: 66 int8 Hadamard matrices, with
   metadata names (had.100.will, had.224.pal, ...) that match N. J. A. Sloane's
   Hadamard matrix library. It's plain numeric tensor data (safetensors format
   can't contain code) and is covered by the project's Apache-2.0 license, so
   I'd accept it as content. Mentioning it so it's on record.

Nits (no change needed for approval):
- The comment on the setuptools_scm sed could say why (upstream pins ==8.2.0,
  Fedora has a newer one).
- The code imports safetensors and tqdm directly, but upstream doesn't declare
  them; they currently come in through transformers. Maybe worth an upstream
  issue.
- rpmlint spelling errors (safetensors, quantized) are false positives.

Please post a new Spec/SRPM with (1) fixed; (2) would be nice in the same go.


Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated



===== MUST items =====

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Apache-2.0. licensecheck finds only Apache-2.0 (SPDX headers);
     the 40 files without a header are CI configs, docs, examples json, and
     the hadamards.safetensors data file, all covered by LICENSE.
[x]: Package must own all directories that it creates.
     Note: /usr/lib/python3.15{,/site-packages} are owned by python3-libs.
[x]: Package contains no bundled libraries or specifies bundled libraries
     with Provides: bundled(<libname>) if unbundling is not possible.
     Note: no vendor/third_party dirs, no prebuilt binaries. hadamard.py
     has a small function "adapted from scipy" (BSD-3-Clause origin, a few
     lines, rewritten for torch). Not a bundled library.
[x]: Changelog in prescribed format.
     Note: %autochangelog
[?]: Sources contain only permissible code or content.
     Note: see issue 3 (hadamards.safetensors). I consider it fine.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
     Note: PyPI name compressed-tensors -> python-compressed-tensors /
     python3-compressed-tensors.
[x]: Package does not generate any conflict.
     Note: installs only the compressed_tensors module and its dist-info.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
     Note: generated from upstream metadata (torch>=2.10, transformers>=4.45,
     pydantic>=2, loguru, psutil); all available in rawhide (torch 2.13.0,
     transformers 5.21). Optional triton/accelerate imports are guarded.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[!]: Package is not known to require an ExcludeArch tag.
     Note: needs ExclusiveArch for torch arches, see issue 1.
[!]: Package complies to the Packaging Guidelines
     Note: issue 1.
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: The License field must be a valid SPDX expression.
[x]: Package requires other packages for directories it uses.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package must not depend on deprecated() packages.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 8522 bytes in 1 files.
[x]: Packages must not store files under /srv, /opt or /usr/local

Python:
[x]: Python eggs must not download any dependencies during the build
     process.
[x]: A package which is used by another package via an egg interface should
     provide egg info.
     Note: .dist-info installed by %pyproject_save_files.
[x]: Package meets the Packaging Guidelines::Python
     Note: %pyproject_* macros, %pyproject_save_files -l, import check.
[x]: Package contains BR: python2-devel or python3-devel
[x]: Packages MUST NOT have dependencies (either build-time or runtime) on
     packages named with the unversioned python- prefix unless no properly
     versioned package exists. Dependencies on Python packages instead MUST
     use names beginning with python2- or python3- as appropriate.
[x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files
[x]: Binary eggs must be removed in %prep

===== SHOULD items =====

Generic:
[x]: Reviewer should test that the package builds in mock.
     Note: rawhide x86_64 OK. Koji scratch fails on ppc64le, issue 1.
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[x]: Package functions as described.
     Note: smoke-tested only: %pyproject_check_import imports all 122
     modules. No hardware test.
[x]: Latest version is packaged.
     Note: 0.20.1 = latest on PyPI (GitHub "latest release" still says
     0.20.0, but the 0.20.1 tag exists).
[x]: Package does not include license text files separate from upstream.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: upstream doesn't sign releases.
[!]: Package should compile and build into binary rpms on all supported
     architectures.
     Note: issue 1.
[x]: %check is present and all tests pass.
     Note: import check only. pytest is disabled ("need real hw and network"),
     which is fair for this package. See issue 2 for the test BuildRequires.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: only spelling false positives.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: python3-compressed-tensors-0.20.1-1.fc46.noarch.rpm
          python-compressed-tensors-0.20.1-1.fc46.src.rpm
============================ rpmlint session starts ============================
rpmlint: 2.9.0
configuration:
    /usr/lib/python3.15/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
rpmlintrc: [PosixPath('/tmp/tmp1pc9da2g')]
checks: 32, packages: 2

python-compressed-tensors.src: E: spelling-error ('safetensors', 'Summary(en_US) safetensors -> safe tensors, safe-tensors, TensorFlow')
python-compressed-tensors.src: E: spelling-error ('quantized', 'Summary(en_US) quantized -> quantize, quantize d, quarantined')
python-compressed-tensors.src: E: spelling-error ('safetensors', '%description -l en_US safetensors -> safe tensors, safe-tensors, TensorFlow')
python3-compressed-tensors.noarch: E: spelling-error ('safetensors', 'Summary(en_US) safetensors -> safe tensors, safe-tensors, TensorFlow')
python3-compressed-tensors.noarch: E: spelling-error ('quantized', 'Summary(en_US) quantized -> quantize, quantize d, quarantined')
python3-compressed-tensors.noarch: E: spelling-error ('safetensors', '%description -l en_US safetensors -> safe tensors, safe-tensors, TensorFlow')
 2 packages and 0 specfiles checked; 6 errors, 0 warnings, 24 filtered, 6 badness; has taken 0.7 s 




Rpmlint (installed packages)
----------------------------
============================ rpmlint session starts ============================
rpmlint: 2.10.0
configuration:
    /usr/lib/python3.15/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 33, packages: 1

python3-compressed-tensors.noarch: W: spelling-error ('safetensors', 'Summary(en_US) safetensors -> safe tensors, safe-tensors, TensorFlow')
python3-compressed-tensors.noarch: W: spelling-error ('quantized', 'Summary(en_US) quantized -> quantize, quantize d, quarantined')
python3-compressed-tensors.noarch: W: spelling-error ('safetensors', '%description -l en_US safetensors -> safe tensors, safe-tensors, TensorFlow')
 1 packages and 0 specfiles checked; 0 errors, 3 warnings, 20 filtered, 0 badness; has taken 0.2 s 



Source checksums
----------------
https://github.com/vllm-project/compressed-tensors/archive/refs/tags/0.20.1.tar.gz :
  CHECKSUM(SHA256) this package     : c63e8a4327d88b6209859a7ad9e56cfa84bcba9734936b837c8de329bffb24fa
  CHECKSUM(SHA256) upstream package : c63e8a4327d88b6209859a7ad9e56cfa84bcba9734936b837c8de329bffb24fa


Requires
--------
python3-compressed-tensors (rpmlib, GLIBC filtered):
    python(abi)
    python3.15dist(loguru)
    python3.15dist(psutil)
    python3.15dist(pydantic)
    python3.15dist(torch)
    python3.15dist(transformers)



Provides
--------
python3-compressed-tensors:
    python-compressed-tensors
    python3-compressed-tensors
    python3.15-compressed-tensors
    python3.15dist(compressed-tensors)
    python3dist(compressed-tensors)



Generated by fedora-review 0.12.0 (a08f0fc) last change: 2026-09-18
Command line :/usr/bin/fedora-review -n python-compressed-tensors -m fedora-rawhide-x86_64 --no-colors
Buildroot used: fedora-rawhide-x86_64
Active plugins: Python, Generic, Shell-api
Disabled plugins: R, SugarActivity, PHP, fonts, Ocaml, C/C++, Perl, Haskell, Java
Disabled flags: EXARCH, EPEL6, EPEL7, DISTTAG, BATCH, UNRETIREMENT

Comment 3 Tom.Rix 2026-12-02 15:24:19 UTC
Spec URL: https://trix.fedorapeople.org/python-compressed-tensors.spec
SRPM URL: https://trix.fedorapeople.org/python-compressed-tensors-0.20.1-1.fc46.src.rpm

> 1. [MUST] The Koji scratch build fails: Koji built this noarch package on a
>   ppc64le builder, where torch doesn't exist:
>     nothing provides python3.15dist(torch) >= 2 needed by
>     python3-accelerate-1.13.0-4.fc45.noarch
>   torch is built only for x86_64 and aarch64, and the generated runtime
>   BuildRequires pull it in even with tests off, so official builds would fail
>   whenever Koji picks ppc64le or s390x. Please use the same block as
>   python-accelerate:
>     # Define our own pytorch_arches macro until we have one system-wide.
>     %if %{undefined pytorch_arches}
>     %global pytorch_arches %{x86_64} %{arm64}
>     %endif
>     ExclusiveArch:  %{pytorch_arches} noarch

# compressed-tensors is a noarch package that should only be built/installable on
# arches that are supported by PyTorch
%if %{undefined pytorch_arches}
%global pytorch_arches %{x86_64} %{arm64} noarch
%endif
ExclusiveArch:  %{pytorch_arches}

> 2. [SHOULD] The test-only BuildRequires (accelerate, datasets, nbconvert,
>   pytest, safetensors, tokenizers) are unconditional, but %pytest runs only
>   with --with check. Please wrap them in %if %{with check}. pip doesn't look
>   needed at all (%pyproject_buildrequires already provides what the build
>   backend needs).

%if %{with check}
BuildRequires:  python3dist(accelerate)
BuildRequires:  python3dist(datasets)
BuildRequires:  python3dist(nbconvert)
BuildRequires:  python3dist(pytest)
BuildRequires:  python3dist(safetensors)
BuildRequires:  python3dist(tokenizers)
%endif

- The comment on the setuptools_scm sed could say why (upstream pins ==8.2.0,
  Fedora has a newer one).

# allow fedora's newer setuptools version
sed -i 's/setuptools_scm==8.2.0/setuptools_scm>=8.2.0/' pyproject.toml

Comment 4 Fedora Review Service 2026-12-02 16:48:09 UTC
Created attachment 2164701 [details]
The .spec file difference from Copr build 11411476 to 11422720

Comment 5 Fedora Review Service 2026-12-02 16:48:11 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/11422720
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2587604-python-compressed-tensors/fedora-rawhide-x86_64/11422720-python-compressed-tensors/fedora-review/review.txt

Please take a look if any issues were found.


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 6 Jan 2026-12-02 17:38:59 UTC
Thanks Tom. Re-reviewed the new Spec/SRPM (comment #3):

1. ExclusiveArch for the torch arches: fixed. Koji scratch build:
   https://koji.fedoraproject.org/koji/taskinfo?taskID=152928144
2. Test BuildRequires under %if %{with check}, pip dropped: fixed.
- setuptools_scm sed comment: fixed.

Local mock build (rawhide x86_64): clean, rpmlint only the known spelling
false positives.

Nit, not blocking: python-accelerate keeps noarch outside the %if
  (ExclusiveArch: %{pytorch_arches} noarch). If a system-wide pytorch_arches
  macro ever gets defined without noarch, your version would drop it.

Package APPROVED.

Comment 7 Fedora Admin user for bugzilla script actions 2026-12-03 13:28:27 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/python-compressed-tensors
Monitoring:
Wasn't able to create project in Anitya. You can create it manually on: `https://release-monitoring.org`


Note You need to log in before you can comment on or make changes to this bug.