trak icon indicating copy to clipboard operation
trak copied to clipboard

TRAK and fast-jl use deprecated `setup.py install` method

Open BrunoKM opened this issue 1 year ago • 4 comments

Installig fast-jl with Python 3.11 and setuptools==65.5.0 gives:

> pip install fast-jl
...
  DEPRECATION: fast-jl is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559

This could be linked to the issues with installing traker[fast] and fast-jl with pip>=23 in #69

BrunoKM avatar Aug 20 '24 13:08 BrunoKM

The blocker for this is that fast_jl is a torch cpp_extension which afaik only supports setup.py :/ (see, e.g., https://pytorch.org/docs/stable/cpp_extension.html). If you know a way around this, that would be great.

kristian-georgiev avatar Sep 17 '24 04:09 kristian-georgiev

Same here 😥

enkeejunior1 avatar Jan 22 '25 08:01 enkeejunior1

Since this has bothered me for a quite a while, I've tried setting up binary wheels for fast-jl in this repo. You can install them with pip install fast-jl-binary.

This is probably not going to fix installing TRAK, since it lists fast-jl as a dependency. So, you can try installing my fork of trak, which replaces the fast-jl requirement with fast-jl-binary using

pip install git+https://github.com/dwahdany/trak.git[fast]

Disclaimer: I did run trak.test_install() on a dgx and it worked. That's about all the testing I did.

dwahdany avatar Jul 10 '25 19:07 dwahdany

If you use uv, it will also work if you put this into your pyproject.toml. The crucial part is the [tool.uv.extra-build-dependencies]

[project]
name = "name"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11,<3.14"
dependencies = [
    "traker[fast],
]

[tool.uv.extra-build-dependencies]
fast-jl = ["torch"]

dwahdany avatar Nov 12 '25 13:11 dwahdany