Skip to content

forge is not installable: the wheel contains no kernels and import fails outside the repo #15

Description

@Shaurya-M002

pip install ./forge produces a package that cannot be imported anywhere except from inside a checkout of this repository. This is the single blocker between what exists and a usable library.

Reproduced 2026-08-14:

$ uv build forge/ -o /tmp/forge_build          # builds fine
$ python -c "import zipfile; print(sorted({n.split(chr(47))[0] for n in zipfile.ZipFile(WHL).namelist()}))"
[forge, forge-0.0.1.dev1.dist-info]            # files under kernels/ : 0

$ cd /tmp && PYTHONPATH=/tmp/forge_site python -c "import forge"
  File "/tmp/forge_site/forge/kernels/rope.py", line 12, in <module>
    from kernels.rope.forge_rope_v3 import (
ModuleNotFoundError: No module named kernels

Two causes, both known:

  1. forge/forge/kernels/*.py are thin re-export shims that do absolute imports of the top-level kernels package (from kernels.rope.forge_rope_v3 import ...), and kernels/ lives at the repo root, outside the distribution.
  2. forge/forge/__init__.py compensates with a sys.path.insert of ../.. relative to the package file. That works from a checkout and cannot work from site-packages. Its own comment says so: "Post-hackathon clean-up: copy each kernel file into forge/kernels/ and drop this block."

The fix is that clean-up: the kernels have to live inside the distributed package. That means deciding what the package actually contains, because kernels/<name>/experiments/v1..v6/ exists to preserve the performance history and should not all ship — only the version each kernel currently dispatches to.

Suggested shape:

forge/forge/kernels/rope.py        # the real implementation, vendored
forge/forge/kernels/rmsnorm.py
...
kernels/<name>/experiments/        # stays in the repo as the research record

with the repo-root benchmarks importing from forge.kernels so there is exactly one copy of each kernel being measured and shipped. Interacts with the experiments/ sys.path collision issue — worth sequencing them together.

Until this is fixed, no release, PyPI or otherwise, is meaningful. A CI job that installs the built wheel into a clean venv and runs import forge would have caught this on day one.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions