Skip to content

Commit

Permalink
allow n_sgd_threads = "auto" for transform
Browse files Browse the repository at this point in the history
  • Loading branch information
jlmelville authored Mar 25, 2024
1 parent 0fb7ae9 commit 889936f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions R/transform.R
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,13 @@ umap_transform <- function(X = NULL, model = NULL,
if (is.null(n_threads)) {
n_threads <- default_num_threads()
}
if (is.character(n_sgd_threads) && n_sgd_threads == "auto") {
n_sgd_threads <- n_threads
}
if (!is.numeric(n_sgd_threads)) {
stop("Unknown n_sgd_threads value: ", n_sgd_threads, " should be a positive
integer or 'auto'")
}
if (is.null(nn_method)) {
if (is.null(X)) {
stop('argument "X" is missing, with no default')
Expand Down

0 comments on commit 889936f

Please sign in to comment.