Skip to content

build: Python distribution for 0.2.0, preflight page path, port-note correction - #80

Merged
jiejingzhangamd merged 2 commits into
mainfrom
docs/preflight-path-and-overlay-version
Aug 3, 2026
Merged

build: Python distribution for 0.2.0, preflight page path, port-note correction#80
jiejingzhangamd merged 2 commits into
mainfrom
docs/preflight-path-and-overlay-version

Conversation

@jiejingzhangamd

@jiejingzhangamd jiejingzhangamd commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Ahead of tagging 0.2.0. Merge this before the tag — the package metadata fixes have to be in the commit the tag points at.

1. Python package

Nothing in this repo ever built or published one — the only pip invocation in release.yml installs Sphinx, and amd-infera has never appeared on PyPI. The new pypi job builds sdist + wheel, checks the metadata, proves the artifact works, and attaches it to the Release. It needs neither the engine images nor the overlay, so it does not depend on those jobs or gate them.

Which pip packages are involved:

to build setuptools>=69, setuptools_scm[toml]>=8, wheel — already in build-system.requires, no action
to publish build + twine — declared nowhere, so the job installs them
the package's own 10 runtime deps plus extras gaie / sglang / vllm / atom / dev

Found by building it before writing the job

fetch-depth: 0 is required. setuptools_scm derives the version from git describe; a shallow clone has no tags, so the wheel comes out 0.0.0 (the fallback_version) instead of the tag. This also means no file needs a version bump — tagging v0.2.0 is what produces 0.2.0.

twine check failed on missing long_description — the PyPI page would have been blank. readme = "README.md" fixes it.

The sdist carried the whole repository. tests (180 files), examples (135), deploy (117), manual (53), bench (45) together outnumbered the source. MANIFEST.in prunes them. The wheel was already clean and is unchanged.

Trial build, with and without this PR

Built twice against a local throwaway v0.2.0 tag (deleted, never pushed):

version twine check sdist
main as-is 0.2.0 2 warnings 2.3 MB
main + this PR 0.2.0 PASSED 0.57 MB

Installed into a clean venv both times: version correct, and infera-preflight / infera-kvd-probe / infera-kvd-l3-bench all run.

The tag must be plain PEP 440. A first attempt with `v0.2.0-trybuild` did not degrade — it **killed the build**:

    UserWarning: tag 'v0.2.0-trybuild' version could not be parsed
    ERROR Backend subprocess exited when trying to invoke get_requires_for_build_sdist

So `v0.2.0`, and for a pre-release `v0.2.0rc1`, not `v0.2.0-rc1`.

PyPI upload is opt-in

Skipped unless PYPI_API_TOKEN is set. amd-infera has never been published, so claiming the name is a deliberate decision rather than a side effect of a tag push — and an absent token must not fail the release.

2. Preflight page path

manual/tools/preflight.md was the only Reference entry not under reference/ — my own inconsistency from filing it as "a tool". Moved, toc and inbound links updated. The remaining infera/tools/ strings on that page are source paths, not links.

3. Port-collision note corrected

The GLM-5.2 header recorded "No Address already in use" from the DP-attention run, worded so it reads as "main has this bug and we did not trip it". The run predates #79, which landed the randomised scan start on main (the same fix #59 carried) — the risk is retired, not untriggered. And the observation proved less than the wording implied anyway: that collision needs two engines on one host, which a cross-node PD pair cannot produce. Recording a clean result from a topology that cannot fail the test reads as evidence when it is not.

Audit of the rest, for the record

No stale mixed/ or pd/ path references after the rename; all 7 images referenced from examples/ resolve 200 on Docker Hub; no dead internal links; manual builds with warnings-as-errors. The two infera-overlay:latest strings in deploy/overlay/README.md are a local docker build -t tag, not a registry pull, so the 404 there is expected.

…ence/

Two things ahead of tagging 0.2.0.

PYTHON PACKAGE. Nothing in this repo ever built or published one -- the
only pip invocation in release.yml installs Sphinx. `amd-infera` has
never appeared on PyPI. The new `pypi` job builds sdist + wheel, checks
the metadata, proves the artifact works, and attaches it to the Release.

It needs no engine image and no overlay, so it does not depend on those
jobs or gate them.

Three things found by building it before writing the job:

  fetch-depth: 0 is required. setuptools_scm derives the version from
  `git describe`, and a shallow clone has no tags -- the wheel would come
  out 0.0.0 (the fallback_version) rather than the tag being released.
  No file needs a version bump: tagging v0.2.0 is what produces 0.2.0.

  twine check failed on missing long_description, so the PyPI page would
  have been blank. The repo has a README; it just was not wired up.
  `readme = "README.md"` fixes it, and twine check now passes clean.

  The sdist carried the whole repository. tests (180 files), examples
  (135), deploy (117), manual (53) and bench (45) together outnumbered
  the source it exists to ship. MANIFEST.in prunes them: 2.3 MB -> 1.2 MB,
  and the sdist top level is now infera plus metadata. The wheel was
  already clean (one top-level package, 162 files) and is unchanged.

The job installs the built wheel into a fresh venv and runs each console
script's --help. A broken entry point or a runtime dependency missing
from `dependencies` is otherwise invisible until someone installs it.

PyPI upload is skipped unless PYPI_API_TOKEN is set. amd-infera has never
been published, so claiming the name is a deliberate decision rather than
something a tag push should do by surprise -- and an absent token must
not fail the release. Set the secret when you want it live.

PREFLIGHT PAGE PATH. manual/tools/preflight.md was the only entry in the
Reference section not under reference/; that was my own inconsistency
from filing it as "a tool". Moved to manual/reference/preflight.md with
its toc entry and inbound links updated. The remaining infera/tools/
strings on that page are source paths, not links, and stay.

Signed-off-by: Zhang, Jiejing <jiejing.zhang@amd.com>
The GLM-5.2 header recorded 'No Address already in use' from the DP
attention run, worded so it reads as 'main has this bug and we did not
trip it'. Two things are wrong with that now.

The run predates #79, which landed the randomised scan start in
free_tcp_port_block on main -- the same fix #59 carried. So the risk is
retired, not merely untriggered.

And the observation proved less than the wording implied even at the
time: that collision needs two engines on ONE host, and a cross-node PD
pair cannot produce it. Recording a clean result from a topology that
cannot fail the test reads as evidence when it is not.

Both the manifest header and the README table now say this.

Signed-off-by: Zhang, Jiejing <jiejing.zhang@amd.com>
@jiejingzhangamd jiejingzhangamd changed the title build: publish the Python distribution, and move preflight into reference/ build: Python distribution for 0.2.0, preflight page path, port-note correction Aug 3, 2026
@jiejingzhangamd
jiejingzhangamd merged commit e387930 into main Aug 3, 2026
26 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant