You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MAT_VIS_HF_BASE env var (client.py:56) already routes the entire base URL — confirmed working end-to-end against gerchowl/mat-vis-tst@v2026.04.99-tst-full-369 (returns the post-#294 neutral-multiplier scalar blocks for ambientcg). So the primary substrate-routing problem is solved by the existing env var.
What this issue actually addresses:
Ergonomics — env vars are hidden state and orchestrators (bake/preview/run.py) don't surface them. A --repo flag + constructor arg is the right shape for first-class API support.
Hidden gap in the standalone client — mat_vis_client_standalone.py:518 builds the HF tree-listing URL using the raw HF_DATASET constant, notHF_BASE-derived. So MAT_VIS_HF_BASE partially routes the standalone client (resolve URLs route correctly, tree-listing routes to prod) → Frankenstein behavior.
Smell in the e2e suite — tests/e2e/test_per_file_roundtrip.py:181-182 monkey-patches _mvc.HF_DATASET directly instead of using the env var, presumably as a workaround for (2).
The original bug-cascade (thumb-bake produced 3 byte-identical PNGs) turned out not to be substrate routing after all — see #385 for the actual culprit (renderer doesn't wait for async texture decode before screenshot). #384 stays valuable for the items above; downgrading priority from priority:high to priority:medium.
Proposed approach (unchanged)
Two layered overrides, both honouring the existing tag semantics:
# explicitMatVisClient(repo="gerchowl/mat-vis-tst", tag="v2026.04.99-tst-full-369")
# implicit (CI / dispatch parity) — already works for resolve URLs;# this issue makes it work for ALL HF endpoints the client touches.os.environ["MAT_VIS_DATASET_REPO"] ="gerchowl/mat-vis-tst"
Motivation
MAT_VIS_HF_BASEenv var (client.py:56) already routes the entire base URL — confirmed working end-to-end againstgerchowl/mat-vis-tst@v2026.04.99-tst-full-369(returns the post-#294 neutral-multiplier scalar blocks for ambientcg). So the primary substrate-routing problem is solved by the existing env var.What this issue actually addresses:
bake/preview/run.py) don't surface them. A--repoflag + constructor arg is the right shape for first-class API support.mat_vis_client_standalone.py:518builds the HF tree-listing URL using the rawHF_DATASETconstant, notHF_BASE-derived. SoMAT_VIS_HF_BASEpartially routes the standalone client (resolve URLs route correctly, tree-listing routes to prod) → Frankenstein behavior.tests/e2e/test_per_file_roundtrip.py:181-182monkey-patches_mvc.HF_DATASETdirectly instead of using the env var, presumably as a workaround for (2).The original bug-cascade (thumb-bake produced 3 byte-identical PNGs) turned out not to be substrate routing after all — see #385 for the actual culprit (renderer doesn't wait for async texture decode before screenshot). #384 stays valuable for the items above; downgrading priority from
priority:hightopriority:medium.Proposed approach (unchanged)
Two layered overrides, both honouring the existing
tagsemantics:Precedence: explicit kwarg >
MAT_VIS_DATASET_REPOenv var >MAT_VIS_HF_BASE(legacy, full-URL form) >HF_DATASETconstant default.What already exists / known sites
clients/python/src/mat_vis_client/client.py:55-58— main client constants. Fully overridable today viaMAT_VIS_HF_BASE(no tree-URL code path here).clients/python/mat_vis_client_standalone.py:46-49— standalone client constants. Tree-URL gap at line 518.clients/python/mat_vis_client_standalone.py:518—tree_url = f"https://huggingface.co/api/datasets/{HF_DATASET}/tree/{rev}?recursive=true"— bypasses env routing.clients/rust/src/main.rs:19,37-38— Rust client. Already env-overridable.clients/mat-vis.sh:20-21— Bash client. Already env-overridable.tests/e2e/test_per_file_roundtrip.py:181-182— monkey-patches both_mvc.HF_DATASETand_mvc.HF_BASE. Replace with constructor-arg once available.scripts/proof_hf_fetch.py:29-30— hardcoded REPO + BASE, no env honoring. Low-impact (proof script).bake/preview/run.py(feat(bake): dedicated "thumb" tier — sphere-rendered material previews #361 orchestrator) — no--repoflag. P1 add.Scope
P0 (medium-priority, no longer blocking)
repo: str | None = NoneonMatVisClientMAT_VIS_DATASET_REPO(precedence above)HF_DATASETdirectly — including_build_manifest_from_treein standalone (line 518)MatVisClient(repo="…")produces tree-URLs against that repo (regression test for the standalone gap)P1
--repoonpython -m mat_vis_clientbake/preview/run.py(feat(bake): dedicated "thumb" tier — sphere-rendered material previews #361) plumbs--repothrough toMatVisClienttests/e2e/test_per_file_roundtrip.pywith the new kwargscripts/proof_hf_fetch.pyhonors env or accepts--repoPitfalls
gerchowl/mat-vis@v1andgerchowl/mat-vis-tst@v1must not collide on disk.MAT_VIS_HF_BASE(full-URL form): document precedence (explicit args win, thenMAT_VIS_DATASET_REPO, thenMAT_VIS_HF_BASE).HF_DATASETsymbol may be re-exported elsewhere in the package; replace at all read sites including the standalone tree-URL builder.Acceptance criteria
MatVisClient(repo="gerchowl/mat-vis-tst", tag="v2026.04.99-tst-full-369").index("ambientcg")returns 1949 entries with the post-feat(baker): extract gpuopen MaterialX standard_surface scalars (#290) #294 neutral-multiplier pbr blocks (currently works via env; this asserts the kwarg path).MAT_VIS_DATASET_REPO=gerchowl/mat-vis-tstproduces the same result without a kwarg._build_manifest_from_treehonours the resolved repo (regression test against the line-518 gap).(repo, tag).References