Skip to content
PiinfraDevOps1 file · +83 −17

Package torch-c-dlpack-ext for conda-forge via rattler-build

Session from conda-forge-agent-traces on Hugging Face by xhochy · BSD-3-Clause · condensed by Coders Talk

20msession
0interventions
GOAL

Create a conda-forge staged-recipes rattler-build recipe for torch-c-dlpack-ext, built from a specific tvm-ffi GitHub commit since no matching git tags exist, targeting linux-aarch64.

  1. Prompt · +0
    Use the conda-forge skill to make a rattler-build recipe for torch-c-dlpack-ext, building from tvm-ffi GitHub source at a specific commit (no matching tags), on linux-aarch64. Commit to git but don't push.
  2. Agent did · +0m
    Read the conda-forge skill docs, fetched the tvm-ffi workflow file, pyproject.toml, build_backend.py and source files at the target commit to understand how the package is built, and pulled license/notice files.
  3. Agent did · +1m
    Looked at example recipes (example-v1, flashinfer-python, mu) in the staged-recipes fork, checked CI support config for linux-aarch64, and searched conda-forge for existing apache-tvm-ffi and pytorch packages to determine version constraints.
  4. Agent did · +5m
    Computed sha256 of the GitHub source tarball, fetched NOTICE/README for licensing, and wrote the initial recipe.yaml (64 lines) in a new recipes/torch-c-dlpack-ext directory.
  5. Fail · +6m
    First rattler-build attempts failed: solver couldn't satisfy python/pytorch/apache-tvm-ffi version constraints together for python_min=3.10 or python_min=3.12.
  6. Agent did · +6m
    Investigated available conda-forge package versions for pytorch and apache-tvm-ffi on linux-aarch64 via conda search, adjusted the recipe's python_min to 3.10 and re-ran the build, tracing through solver output.
  7. Fail · +10m
    Build got further but hit a licensing classifier warning and then a script failure during the build step, traced to a missing helper script needed to compile the .so.
  8. Agent did · +12m
    Tracked down the correct build helper (_build_optional_torch_c_dlpack.py) from a newer branch, fetched PyPI JSON metadata for the release, and edited the recipe's build script and requirements accordingly, then committed the recipe.
  9. Fail · +17m
    Rebuild still failed at the script execution step with a subprocess error, related to a missing cxx compiler and the .so not being forced into the build.
  10. Agent did · +18m
    Added the C++ compiler requirement and forced the library build step, rebuilt successfully producing the .so file in the wheel, and committed the final recipe fix.
  11. Outcome · +20m
    Recipe completed and committed in two commits on the torch-c-dlpack-ext branch; rattler-build succeeded producing the packaged .so, ready for a PR (not pushed per instructions).
VERDICT

Next time I'd give the agent the newer build-helper script location upfront, since a lot of the back-and-forth was chasing down _build_optional_torch_c_dlpack.py and the right compiler/build-step config through trial and error with rattler-build. The fix that actually got the build working was adding the cxx compiler requirement and forcing the .so library build step rather than relying on pip's default packaging.

I tried this · 0

Discussion · 0

How Builds work