Skip to content

Commit

Permalink
version 1.2.8
Browse files Browse the repository at this point in the history
  • Loading branch information
mdancho84 committed Sep 2, 2023
1 parent 0ab9dbf commit 7dddf96
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 21 deletions.
6 changes: 3 additions & 3 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Version: 1.2.4
Date: 2022-11-15 17:20:40 UTC
SHA: f9d9a42f6d76fdbf91fa196909ad51c089af0715
Version: 1.2.8
Date: 2023-09-02 14:32:22 UTC
SHA: 0ab9dbfe2a0dd5eb00355315df20485537ed7b0b
12 changes: 12 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
- Integrate Conformal Predictions. #173
- New Vignette: Conformal Forecast Prediction Intervals in Modeltime


#### Other Changes:

- Reduced test times on CRAN
- CRAN Vignettes & Tests: Enforce no parallel cores `Sys.setenv("OMP_THREAD_LIMIT" = 1)`
- Change the default parallel processing to one (1) core from all available cores (-1):
- `control_refit()`
- `control_fit_workflowset()`
- `control_nested_fit()`
- `control_nested_refit()`
- `control_nested_forecast()`

# modeltime 1.2.7

- Fixes for R4.3+ which returns `lm` models as `pred_res`. #228
Expand Down
18 changes: 9 additions & 9 deletions R/utils-control-par.R
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ get_operator <- function(allow_par = TRUE) {
#'
#' @param allow_par Logical to allow parallel computation. Default: `FALSE` (single threaded).
#' @param cores Number of cores for computation. If -1, uses all available physical cores.
#' Default: `-1`.
#' Default: `1`.
#' @param packages An optional character string of additional R package names that should be loaded
#' during parallel processing.
#'
Expand All @@ -192,8 +192,8 @@ get_operator <- function(allow_par = TRUE) {
#' # No parallel processing by default
#' control_refit()
#'
#' # Allow parallel processing
#' control_refit(allow_par = TRUE)
#' # Allow parallel processing and use all cores
#' control_refit(allow_par = TRUE, cores = -1)
#'
#' # Set verbosity to show additional training information
#' control_refit(verbose = TRUE)
Expand All @@ -212,7 +212,7 @@ get_operator <- function(allow_par = TRUE) {
#' @rdname control_modeltime
control_refit <- function(verbose = FALSE,
allow_par = FALSE,
cores = -1,
cores = 1,
packages = NULL) {

ret <- control_modeltime_objects(
Expand Down Expand Up @@ -240,7 +240,7 @@ print.control_refit <- function(x, ...) {
#' @rdname control_modeltime
control_fit_workflowset <- function(verbose = FALSE,
allow_par = FALSE,
cores = -1,
cores = 1,
packages = NULL) {

ret <- control_modeltime_objects(
Expand Down Expand Up @@ -270,7 +270,7 @@ print.control_fit_workflowset <- function(x, ...) {
#' @rdname control_modeltime
control_nested_fit <- function(verbose = FALSE,
allow_par = FALSE,
cores = -1,
cores = 1,
packages = NULL) {

ret <- control_modeltime_objects(
Expand Down Expand Up @@ -301,7 +301,7 @@ print.control_nested_fit <- function(x, ...) {
#' @rdname control_modeltime
control_nested_refit <- function(verbose = FALSE,
allow_par = FALSE,
cores = -1,
cores = 1,
packages = NULL) {

ret <- control_modeltime_objects(
Expand Down Expand Up @@ -332,7 +332,7 @@ print.control_nested_refit <- function(x, ...) {
#' @rdname control_modeltime
control_nested_forecast <- function(verbose = FALSE,
allow_par = FALSE,
cores = -1,
cores = 1,
packages = NULL) {

ret <- control_modeltime_objects(
Expand Down Expand Up @@ -362,7 +362,7 @@ print.control_nested_refit <- function(x, ...) {
control_modeltime_objects <- function(
verbose = FALSE,
allow_par = FALSE,
cores = -1,
cores = 1,
packages = NULL,
func = NULL
) {
Expand Down
4 changes: 4 additions & 0 deletions R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
# been loaded.

.onLoad <- function(libname, pkgname) {

# CRAN OMP THREAD LIMIT
Sys.setenv("OMP_THREAD_LIMIT" = 1)

# This defines the model database

# Prophet
Expand Down
16 changes: 8 additions & 8 deletions man/control_modeltime.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion tests/testthat/test-tune_workflows.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ test_that("Tuning, arima_boost", {
resamples = resample_spec,
grid = grid_spec,
metrics = metric_set(mae, mape, smape, mase, rmse, rsq),
control = control_grid(verbose = FALSE, allow_par = TRUE)
control = control_grid(
verbose = FALSE,
allow_par = TRUE,
cores = 2
)
)


Expand Down

0 comments on commit 7dddf96

Please sign in to comment.