Skip to content

Add R4.6 snapshot variants for BPE tests - #310

Merged
EmilHvitfeldt merged 2 commits into
mainfrom
add-r4.6-snapshots
Jun 18, 2026
Merged

Add R4.6 snapshot variants for BPE tests#310
EmilHvitfeldt merged 2 commits into
mainfrom
add-r4.6-snapshots

Conversation

@EmilHvitfeldt

Copy link
Copy Markdown
Member

Problem

The GHA checks on #309 (and any current PR) fail on Windows R CMD check with two test failures, unrelated to that PR's step_word_embeddings() work:

── Failure ('test-tokenize_bpe.R:169:3'): Errors if vocabulary size is set to low. ──
Adding new snapshot for variant 'R4.6'
── Failure ('test-tokenizer-tokenizersbpe.R:198:3'): Errors if vocabulary size is set to low. ──
Adding new snapshot for variant 'R4.6'

Cause

Both tests use expect_snapshot(variant = r_version()), where r_version() is paste0("R", getRversion()[, 1:2]). The CI runners were bumped to R 4.6.0, so r_version() now returns "R4.6". There were variant snapshot directories for R4.3, R4.4, and R4.5 but none for R4.6, so testthat treats it as a brand-new snapshot, which is a failure under CI.

Fix

The expected error messages here are generated by textrecipes itself and are byte-identical across R 4.3-4.5, so this adds an R4.6 variant directory copied from the existing R4.5 snapshots.

(The macOS R-CMD-check failure on #309 is separate: recipes failed to dyn.load on the R 4.6.0 arm64 runner, a transient upstream binary issue not addressed here.)

CI runners were bumped to R 4.6.0, so the variant-aware snapshot
tests in test-tokenize_bpe.R and test-tokenizer-tokenizersbpe.R
(which key snapshots on r_version()) had no R4.6 variant and reported
'Adding new snapshot for variant R4.6', failing R CMD check on Windows.

The error messages are produced by textrecipes itself and are
identical across R 4.3-4.5, so copy the existing R4.5 snapshots into a
new R4.6 variant directory.
The Windows oldrel-4 runner uses R 4.2.3, so r_version() returns
'R4.2', which likewise had no variant snapshot directory. Copy the
identical R4.3 snapshots into an R4.2 variant.
@EmilHvitfeldt
EmilHvitfeldt merged commit bd27038 into main Jun 18, 2026
12 of 14 checks passed
@EmilHvitfeldt
EmilHvitfeldt deleted the add-r4.6-snapshots branch June 18, 2026 21:34
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