mlcommons / mlcommons/storage

mlpstorage error with proxy, needs httpx[socks]

Open
#332 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement Future
Dominant language
Python
Stars
203
Forks
67
Avg merge
20m
Merged PRs (30d)
8

Description

After successfully installing uv, when running the mlpstorage --help command, I get an error installing rust due to the lack of the socksio library.

I tried both uv add socksio and uv add "httpx[socks]", but these commands fail with the same error:

  × Failed to build `dgen-py==0.2.2`
  ├─▶ The build backend returned an error
  ╰─▶ Call to `maturin.build_wheel` failed (exit status: 1)

      [stdout]
      Rust not found, installing into a temporary directory

      [stderr]
      Python reports SOABI: cpython-312-x86_64-linux-gnu
      Computed rustc target triple: x86_64-unknown-linux-gnu
      Installation directory: /home/dslik/.cache/puccinialin
      Downloading rustup-init from https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init
      Traceback (most recent call last):
        File "<string>", line 11, in <module>
        File "/home/dslik/.cache/uv/builds-v0/.tmpw57uzG/lib/python3.12/site-packages/maturin/__init__.py", line 138, in
      build_wheel
          return _build_wheel(wheel_directory, config_settings, metadata_directory)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/dslik/.cache/uv/builds-v0/.tmpw57uzG/lib/python3.12/site-packages/maturin/__init__.py", line 111, in
      _build_wheel
          env = _get_env()
                ^^^^^^^^^^
        File "/home/dslik/.cache/uv/builds-v0/.tmpw57uzG/lib/python3.12/site-packages/maturin/__init__.py", line 75, in _get_env
          extra_env = setup_rust()
                      ^^^^^^^^^^^^
        File "/home/dslik/.cache/uv/builds-v0/.tmpw57uzG/lib/python3.12/site-packages/puccinialin/_setup_rust.py", line 124, in
      setup_rust
          rustup_init = download_rustup(url, rustup_init, target, file)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/dslik/.cache/uv/builds-v0/.tmpw57uzG/lib/python3.12/site-packages/puccinialin/_setup_rust.py", line 33, in
      download_rustup
          client = httpx.Client(timeout=60)
                   ^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/dslik/.cache/uv/builds-v0/.tmpw57uzG/lib/python3.12/site-packages/httpx/_client.py", line 700, in __init__
          else self._init_proxy_transport(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/dslik/.cache/uv/builds-v0/.tmpw57uzG/lib/python3.12/site-packages/httpx/_client.py", line 750, in
      _init_proxy_transport
          return HTTPTransport(
                 ^^^^^^^^^^^^^^
        File "/home/dslik/.cache/uv/builds-v0/.tmpw57uzG/lib/python3.12/site-packages/httpx/_transports/default.py", line 191,
      in __init__
          raise ImportError(
      ImportError: Using SOCKS proxy, but the 'socksio' package is not installed. Make sure to install httpx using `pip install
      httpx[socks]`.

      hint: This usually indicates a problem with the package or the build environment.
  help: `dgen-py` (v0.2.2) was included because `mlpstorage` (v2.0.0b1) depends on `dlio-benchmark` (v3.0.0) which depends on
        `dgen-py`

I added httpx[socks] to pyproject.toml and re-ran uv lock to try to add it to the uv environment:

Resolved 104 packages in 3.87s
Added anyio v4.13.0
Added h11 v0.16.0
Added httpcore v1.0.9
Added httpx v0.28.1
Added socksio v1.0.0

However, when I try to run mlpstorage, I still get the same error. I tried manually changing the order of the dependencies in the uv.lock file, no luck with that either.

Is there something specific that I need to do to get these newly added dependencies to persist?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with pyproject.toml and uv.lock, then reproduce the failure by running mlpstorage --help in a clean environment. Trace how the build-isolated dgen-py dependency obtains httpx and socksio; done means the command no longer fails with the missing socksio error without manual lockfile edits.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.