Conversation
There was a problem hiding this comment.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
air
[air] reported by reviewdog 🐶
brulee/tests/testthat/test-chronos2-predict.R
Lines 788 to 794 in 258f57a
[air] reported by reviewdog 🐶
brulee/tests/testthat/test-chronos2-predict.R
Lines 829 to 835 in 258f57a
[air] reported by reviewdog 🐶
brulee/tests/testthat/test-chronos2-predict.R
Lines 863 to 869 in 258f57a
[air] reported by reviewdog 🐶
brulee/tests/testthat/test-chronos2-predict.R
Lines 898 to 904 in 258f57a
[air] reported by reviewdog 🐶
brulee/tests/testthat/test-chronos2-predict.R
Lines 931 to 937 in 258f57a
[air] reported by reviewdog 🐶
brulee/tests/testthat/test-chronos2-predict.R
Line 951 in 258f57a
[air] reported by reviewdog 🐶
brulee/tests/testthat/test-chronos2-predict.R
Lines 965 to 971 in 258f57a
[air] reported by reviewdog 🐶
brulee/tests/testthat/test-chronos2-predict.R
Lines 1000 to 1006 in 258f57a
[air] reported by reviewdog 🐶
brulee/tests/testthat/test-chronos2-predict.R
Lines 1022 to 1023 in 258f57a
[air] reported by reviewdog 🐶
brulee/tests/testthat/test-chronos2-predict.R
Lines 1035 to 1041 in 258f57a
| # Pinned default revision for `amazon/chronos-2`. Bump this deliberately | ||
| # when we're ready to ship a new set of weights -- never let users silently | ||
| # track a moving HuggingFace branch. | ||
| chronos2_default_revision <- function() { |
There was a problem hiding this comment.
Maybe we change this along the way as more versions are populated. For now, it's keyed to this particular version.
| cli::cli_progress_step("Downloading {.url {url}}") | ||
| err <- tryCatch( | ||
| { | ||
| curl::curl_download(url, dest, mode = "wb", quiet = TRUE) |
There was a problem hiding this comment.
R's internal file.download() had a lot of issues with downloading this file, so we went with curl.
| chronos2_download <- function( | ||
| model_id = "amazon/chronos-2", | ||
| revision = chronos2_default_revision(), | ||
| cache_dir = file.path(Sys.getenv("HOME"), ".cache", "chronos-r") |
There was a problem hiding this comment.
This seems like a good place to put the weights. I'm not aware of there is a canonical location for cached objects related to R.
This is a pure R torch version of Chronos version 2. It is a pre-trained model; weights are downloaded and cached on first use.
A GPU is not required, but extremely helpful at prediction time. Unlike most other models, this implementation appears to achieve good speedups on Apple GPUs (aka MPS devices).