Skip to content

Commit 689e36e

Browse files
committed
fix import
1 parent 5e14ee4 commit 689e36e

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

NAMESPACE

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ importFrom(mlr3,TaskClassif)
1818
importFrom(mlr3,TaskRegr)
1919
importFrom(mlr3,as_data_backend)
2020
importFrom(mlr3,as_task)
21+
importFrom(stats,rnorm)
2122
importFrom(utils,bibentry)
2223
useDynLib(mlr3oml,c_parse_arff_levels)
2324
useDynLib(mlr3oml,c_remove_comment)

R/helper_download.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ get_json = function(url, ..., simplify_vector = TRUE, simplify_data_frame = TRUE
7373
return(json)
7474
} else if (retry < retries) {
7575
if (response$oml_code %in% c(107L)) {
76-
delay = abs(rnorm(1L, mean = 10))
76+
delay = max(rnorm(1L, mean = 10), 0)
7777
lg$debug("Server busy, retrying in %.2f seconds", delay, try = retry)
7878
Sys.sleep(delay)
7979
} else {
@@ -123,7 +123,7 @@ get_arff = function(url, ..., sparse = FALSE, api_key = get_api_key(), retries =
123123

124124
return(tab)
125125
} else if (retry < retries && response$http_code >= 500L) {
126-
delay = abs(rnorm(1L, mean = 10))
126+
delay = max(rnorm(1L, mean = 10), 0)
127127
lg$debug("Server busy, retrying in %.2f seconds", delay, try = retry)
128128
Sys.sleep(delay)
129129
}

R/zzz.R

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#' @import checkmate
22
#' @import data.table
33
#' @import mlr3misc
4+
#' @importFrom stats rnorm
45
#' @importFrom mlr3 as_data_backend TaskClassif TaskRegr
56
#' @importFrom R6 R6Class
67
#'

0 commit comments

Comments
 (0)