NEWS/test cleanup: correct the dontrun count, add a bf16 source check - #55
Merged
Conversation
Review follow-ups, all documentation or test scope. No code changes, so
no version bump.
NEWS.md said nine \dontrun{} examples remain while cran-comments.md said
ten. Ten is right: the 0.2.0 review pass left nine, and resident_load()
added one afterwards. Also drops a doubled blank line left by
consolidating the dev sections under 0.2.2, and a trailing blank line at
the end of test_recommend.R.
The bf16 route had only structural coverage -- that .flux_model_dir()
routes bf16 somewhere other than "<prefix>bf16", and that an unknown
model errors. Nothing checked the thing that actually carries risk:
whether .flux_source_dir() lands on a directory the loader can open.
test_bf16_source.R now asserts the cache layout (config.json plus a
shard), that the router resolves to exactly that directory, that every
tensor in the shard really is BF16 (read from the safetensors JSON
header, so no tensors are materialized), and that
flux_open_checkpoint() opens it and reports no format -- which is what
selects the "full" bf16 path in flux_load_transformer().
Deliberately not a forward pass. bf16 names the storage dtype and
reading it is CPU work, but computing in bf16 is GPU-only here
(txt2img_flux2 upcasts to float32 on cpu), and materializing the 7.8 GB
transformer is not a test-suite job. at_home() gates the file, so check
machines skip it.
Verified GPU-untouched: 11 assertions in 1.6 s with a 0 MiB delta in
nvidia-smi. Full suite with CUDA hidden: 1081 pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Review follow-ups, all documentation or test scope. No code changes, so no
version bump.
Doc fixes
NEWS.mdsaid nine\dontrun{}examples remain whilecran-comments.mdsaid ten. Ten is right: the 0.2.0 review pass left nine, and
resident_load()added one afterwards.0.2.2, and a trailing blank line at the end of
test_recommend.R.git diff --checkis clean.bf16 coverage
The bf16 route had only structural coverage — that
.flux_model_dir()routesbf16 somewhere other than
"<prefix>bf16", and that an unknown model errors.Nothing checked what actually carries risk: whether
.flux_source_dir()landson a directory the loader can open.
test_bf16_source.Rasserts the cache layout (config.jsonplus a shard),that the router resolves to exactly that directory, that every tensor in the
shard really is BF16 — read from the safetensors JSON header, so no tensors
are materialized — and that
flux_open_checkpoint()opens it and reports noformat, which is what selects the"full"bf16 path influx_load_transformer().Deliberately not a forward pass. bf16 names the storage dtype and reading
it is CPU work, but computing in bf16 is GPU-only here (
txt2img_flux2()upcasts to float32 when
device == "cpu"), and materializing the 7.8 GBtransformer is not a test-suite job.
at_home()gates the file so checkmachines skip it.
Verified GPU-untouched: 11 assertions in 1.6 s with a 0 MiB delta in
nvidia-smi. Full suite with CUDA hidden: 1081 pass.