Skip to content

Commit

Permalink
Use rlang instead of ellipsis for checking dots. (#1180)
Browse files Browse the repository at this point in the history
  • Loading branch information
olivroy authored Jul 13, 2024
1 parent 18ce919 commit fe5020f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Imports:
Rcpp,
R6,
withr,
rlang,
rlang (>= 1.0.0),
methods,
utils,
stats,
Expand All @@ -41,7 +41,6 @@ Imports:
callr,
cli (>= 3.0.0),
glue,
ellipsis,
desc,
safetensors (>= 0.1.1),
jsonlite
Expand Down
2 changes: 1 addition & 1 deletion R/generator.R
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ local_torch_manual_seed <- function(seed, .env = parent.frame()) {
#' @describeIn torch_manual_seed A with context to change the seed during the function execution.
#' @export
with_torch_manual_seed <- function(code, ..., seed) {
ellipsis::check_dots_empty()
rlang::check_dots_empty()
local_torch_manual_seed(seed)
force(code)
}
Expand Down
6 changes: 3 additions & 3 deletions R/linalg.R
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ linalg_cond <- function(A, p = NULL) {
#' @family linalg
#' @export
linalg_matrix_rank <- function(A, ..., atol = NULL, rtol = NULL, tol = NULL, hermitian = FALSE) {
ellipsis::check_dots_empty()
rlang::check_dots_empty()
if (!is.null(tol)) {
warn("`tol` argument is deprecated in favor of `atol` and `rtol`.")
atol <- tol
Expand Down Expand Up @@ -833,7 +833,7 @@ linalg_solve <- function(A, B) {
#' @family linalg
#' @export
linalg_lstsq <- function(A, B, rcond = NULL, ..., driver = NULL) {
ellipsis::check_dots_empty()
rlang::check_dots_empty()

args <- list(
self = A,
Expand Down Expand Up @@ -1246,6 +1246,6 @@ linalg_inv_ex <- function(A, check_errors = FALSE) {
#' @family linalg
#' @export
linalg_solve_triangular <- function(A, B, ..., upper, left = TRUE, unitriangular = FALSE) {
ellipsis::check_dots_empty()
rlang::check_dots_empty()
torch_linalg_solve_triangular(A, B, upper, left, unitriangular)
}
2 changes: 1 addition & 1 deletion R/trace.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
#' @export
jit_trace <- function(func, ..., strict = TRUE) {
tr_fn <- make_traceable_fn(func)
ellipsis::check_dots_unnamed() # we do not support named arguments
rlang::check_dots_unnamed() # we do not support named arguments

if (inherits(func, "nn_module")) {
if (inherits(func, "nn_module_generator")) {
Expand Down

0 comments on commit fe5020f

Please sign in to comment.