Skip to content

Update weight downloading and caching (#130) - #132

Merged
topepo merged 10 commits into
mainfrom
fix-130
Jul 12, 2026
Merged

Update weight downloading and caching (#130)#132
topepo merged 10 commits into
mainfrom
fix-130

Conversation

@edgararuiz

Copy link
Copy Markdown
Contributor

Fixes #130

  • Removed the auto-download hook from .onAttach(); attaching brulee now has no side effects. TabICL weights download only via tab_icl_download_weights(), and brulee_tab_icl() errors with instructions if they're missing.

  • TabICL and Chronos weights now cache under tools::R_user_dir("brulee", "cache") instead of ~/.cache.

  • Updated docs, NEWS, and the "not cached" error message.

@edgararuiz
edgararuiz requested a review from topepo July 7, 2026 22:10

@topepo topepo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For TabICL, there is just an error the first time:

Error in `brulee_tab_icl()`:
! No cached regression TabICL checkpoint found in
  /Users/max/Library/Caches/org.R-project.R/R/brulee.
ℹ Download them with `tab_icl_download_weights()`.
Run `rlang::last_trace()` to see where the error occurred.

for Chronos, it just gets them:

> brulee_chronos(ridership ~ Belmont + Clark_Lake, data = modeldata::Chicago)
✔ Downloading <https://huggingface.co/amazon/chronos-2/resolve/0f8a440441931157957e2b…
✔ Downloading <https://huggingface.co/amazon/chronos-2/resolve/0f8a440441931157957e2b…
Chronos-2 Pretrained Forecasting Model

Can you update this PR to,

  • if interactive, prompt the user if they want to download them.
  • if not interactive, throw an error like what TabICL currently sends

@edgararuiz
edgararuiz requested a review from topepo July 9, 2026 18:55
@topepo
topepo merged commit dbbb2e1 into main Jul 12, 2026
13 checks passed
@topepo
topepo deleted the fix-130 branch July 12, 2026 17:31
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.

Update downloading and caching system

2 participants