TensorRT icon indicating copy to clipboard operation
TensorRT copied to clipboard

Move `onnx-graphsurgeon` into a separate repo

Open KOLANICH opened this issue 3 years ago • 8 comments

Description

onnx-graphsurgeon is an extremily helpful tool used as a dependency in multiple other tools But it is unfortunately not available in pypi. Also I prefer to install pure python deps from source, and it is inconvenient to download whole TensorRT just to get onnx-graphsurgeon.

It is proposed to:

  1. extract graphsurgeon into a separate git repo.
  2. publish it on pypi.
  3. setup CI publishing wheels to pypi

KOLANICH avatar Sep 20 '22 18:09 KOLANICH

P.S. pypi has a package with such a name, but it looks like a stub left by NVidia to reserve the name.

KOLANICH avatar Sep 20 '22 18:09 KOLANICH

You can install it from the NVIDIA PyPI as mentioned in the README:

python3 -m pip install onnx_graphsurgeon --index-url https://pypi.ngc.nvidia.com

pranavm-nvidia avatar Sep 20 '22 18:09 pranavm-nvidia

You can install it from the NVIDIA PyPI as mentioned in the README:

I know, but I prefer to install from git.

KOLANICH avatar Sep 20 '22 19:09 KOLANICH

Also I'm not sure that PEP 508 allows to specify --index-url to use it in package dependencies (not requirements.txt, but PEP 621-compliant pyproject.toml).

KOLANICH avatar Sep 20 '22 19:09 KOLANICH

It surely allows to specify whole this repo (with a subdir within it), but it will result in fetching the whole repo, since neither pip, nor GitHub support partial fetches.

KOLANICH avatar Sep 20 '22 19:09 KOLANICH

Does a URL to the wheel work? https://developer.download.nvidia.com/compute/redist/onnx-graphsurgeon/onnx_graphsurgeon-0.3.20-py2.py3-none-any.whl

pranavm-nvidia avatar Sep 20 '22 20:09 pranavm-nvidia

It should work, but pinning to an exact version is highly undesireable.

KOLANICH avatar Sep 20 '22 23:09 KOLANICH

I guess you can try

python3 -m pip install -U 'git+https://github.com/NVIDIA/TensorRT.git#subdirectory=tools/onnx-graphsurgeon'

But second on move onnx-graphsurgeon into a separate repo.

zhiqwang avatar Sep 21 '22 06:09 zhiqwang

closing since there is already solution, thanks all!

ttyio avatar Jul 13 '23 03:07 ttyio