DAH-2553: pip install lium.io fails on Python 3.13/3.14 and weighs 161 MB - #103
Conversation
arhangel66
left a comment
There was a problem hiding this comment.
Request changes — one real bug.
lium fund --alpha on a slim install tells the user to run pip install "lium.io" — the package they already have. Reproduced on the current head in a clean Python 3.13 venv.
_alpha_fund raises LiumError here, while handle_errors escapes Rich markup only for CliFailure. As a result, Rich consumes [provider] and turns the intended pip install "lium.io[provider]" hint into pip install "lium.io".
Please raise CliFailure("provider_extra_missing", ..., EXIT_CONFIGURATION_ERROR) here, matching _legacy_tao_fund. Escaping the LiumError rendering would fix the displayed text too, but would retain the generic JSON error code and exit status.
The branch also needs rebasing onto current main: lium/cli/utils.py conflicts, and the resolution must preserve the new data parameter on CliFailure and pass e.data into _emit_json_error. Please regenerate uv.lock afterward; pyproject.toml will be 0.0.29, while the current lock records lium-io==0.0.28.
The rest of the code review checks out: bittensor is lazily imported in four files, the removed packages have no imports, and existing pip installations retain bittensor after upgrading.
|
Good catch, reproduced it on a clean 3.13 venv. I had escaped only the |
lium fund --alpha raises LiumError, which handle_errors renders on a different branch, so Rich still ate the brackets and the hint read 'pip install "lium.io"' — the package the caller already has. Every branch escapes now, and both fund paths are pinned by a test. Caught by arhangel66 in review of #103. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ad weight Renting a GPU pulled the whole chain stack: 84 packages and 161 MB, and on Python 3.13/3.14 the install failed outright inside bittensor-drand's Rust build, with a traceback that never mentioned lium. Eight of those dependencies were imported by nothing at all, and bittensor itself is imported lazily by provider commands and lium fund only. Renter install is now 43 packages and 54 MB and works on 3.10 through 3.14. bittensor moves to a provider extra; the binary still bundles it, since one binary serves both audiences. The bare single-file release asset is gone: it existed for pre-onedir self-update, and GitHub counts show zero downloads across the last three releases. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Removing bittensor_cli and async_substrate_interface from collect_submodules changed nothing: both arrive transitively through bittensor, and the binary stayed at 101 MB. Reverted so the diff does not imply a win it does not deliver. The spec change that does matter, dropping the legacy onefile build, stays. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…s absent _read_metagraph swallowed the ImportError and returned (None, []), which the caller renders as 'Registered on subnet: unknown' with nothing explaining why. That branch was unreachable while bittensor was a base dependency and becomes reachable now, so it names the missing extra instead. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Four failure sites printed an error and returned, so the process exited 0: wallet load, wallet registration, amount validation and the transfer itself. Same shape DAH-2556 fixed across exec, rm and up; this path was missed because bittensor was always installed, so nothing reached it in testing. The two remaining bare returns are a user answering no to a confirmation, which is not a failure. Verified live: lium fund with an unusable wallet now exits 2 instead of 0. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…s optional Two tests for the metagraph ImportError path: it names the missing extra instead of returning empty, and provider status surfaces that as a warning. The path cannot be driven by hand without a live portal session, so it is pinned in tests. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Two different situations were getting one message. Absent because nobody installed it: add the extra. Absent because it cannot build on this interpreter: adding the extra changes nothing, so the message has to say to use Python 3.13 or the binary, which ships it prebuilt. The extra is now gated on python_version < 3.14, so the install stops dying inside a Rust build whose traceback never mentions lium; the CLI explains the gap in its own words at the first provider command instead, with a non-zero exit code an agent can act on. Rich was reading lium.io[provider] as a style tag and swallowing it; CliFailure messages are escaped once where they are rendered. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
lium fund --alpha raises LiumError, which handle_errors renders on a different branch, so Rich still ate the brackets and the hint read 'pip install "lium.io"' — the package the caller already has. Every branch escapes now, and both fund paths are pinned by a test. Caught by arhangel66 in review of #103. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Escaping the LiumError rendering fixed the displayed text but left the generic error code and exit status, so a machine caller still could not tell what to install. Both fund paths now report provider_extra_missing with the configuration exit code. Rebased onto 0.0.29, keeping CliFailure's new data parameter and passing it into _emit_json_error; uv.lock regenerated. Review feedback from arhangel66 on #103. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
608da24 to
f9c63c3
Compare
|
All three points done. Error code, not just the text. I kept the escaping as well, since the other three branches in Rebased onto 0.0.29. The uv.lock regenerated — it records 0.0.29 now, and Verified live on a clean 3.12 venv: both paths, text and |
* DAH-2593: stop the CLI Action layer from swallowing errors * DAH-2593: name the rented pod when a post-rent step fails * DAH-2593: render a failure once, and keep a hint under its error * DAH-2593: address review on exit codes, idempotent unset and ssh error matching * DAH-2593: reconcile with #103 — escape permission errors, wallet load is a config error
llms-full.txtline 49 tells a caller to runpip install lium.io. On Python 3.13 and 3.14 that command fails, and it always pulls the whole chain stack.Measured, before and after
The 3.14 failure, from the released 0.0.28:
Nothing in that traceback mentions lium.
This is the SDK audience only. The CLI installs as a standalone binary via
curl -fsSL https://lium.io/install.sh | bashand never touches pip.What changed
Eight dependencies nothing imports are gone. Grepped the whole package:
bittensor-cli,plotly,plotille,fuzzywuzzy,python-Levenshtein,netaddr,async-substrate-interface,GitPythonandJinja2had zero imports.bittensor moves to a
providerextra. It is imported lazily inside functions, in four files, all of them provider commands orlium fund. Renting never touches it, and it is what breaks the install on new Python. The two "not installed" messages now point atpip install "lium.io[provider]", andprovider statussays when subnet registration reads as unknown because the extra is absent instead of leaving it unexplained.The binary still bundles it. One binary serves renters and providers, so the build syncs
--extra provider. Verified locally: the bundle contains bittensor.The bare single-file release asset is gone. Kept for the self-update shipped before the onedir switch in 0.0.25. GitHub download counts: 8 in 0.0.25 against 53 for the tarballs, then zero across 0.0.26, 0.0.27 and 0.0.28.
install.shand the current self-update both fetch the tarball, and older builds already get the reinstall prompt added in DAH-2262.Verification
test/test_renter_install_is_slim.pypins all three properties and fails onmain. One existing test asserted the legacy asset was published and was updated, since that behaviour changed on purpose.Clean venvs on 3.12, 3.13 and 3.14 install and import. On the slim install
lium lsreturns the live board,psworks,provider node listreturns real data, andlium fundexits 2 with the extra hint instead of a traceback. Binary built locally from the changed spec: starts in 0.33 s,--version,lsandprovider --helpall work.Full suite: 349 pass, 11 fail — the same 11 fail on untouched
main.Not in this PR
Publishing the
liumalias fromstubs/. Our own llms.txt and llms-full.txt give the correct install commands, so nobody following the docs guesses the wrong name.🤖 Generated with Claude Code