Skip to content

Commit

Permalink
Some small improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
dfalbel committed Feb 9, 2023
1 parent a9705b9 commit b8fe6a2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ jobs:
uses: actions/download-artifact@v3
with:
name: lantern
path: ~/Downloads/
path: '${{ env.RUNNER_TEMP }}/lantern/'

- name: Set base URL for downloading
if: ${{ needs.lantern.result != 'skipped' }}
run: |
echo "LANTERN_BASE_URL=~/Downloads/" >> $GITHUB_ENV
echo "LANTERN_BASE_URL=$RUNNER_TEMP/lantern/" >> $GITHUB_ENV
shell: bash

- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion R/install.R
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ get_install_libs_url <- function(version = NA, type = NA) {
#' @export
install_torch_from_file <- function(version = NA, type = NA, libtorch, liblantern, ...) {
cli::cli_abort(c(
"This function is now deprecated. The same results can be achieved with {.fn install_torch()}.",
"This function is now deprecated. The same results can be achieved with {.fn install_torch}.",
i = "Use the envvars {.envvar TORCH_URL} and {.envvar LANTERN_URL} to set the file locations."
))
}
Expand Down
10 changes: 5 additions & 5 deletions R/package.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ globalVariables(c("..", "self", "private", "N"))
TRUE
},
error = function(e) {
message <- if (is.character(e$message)) e$message else "Unknown error."
msg <- if (is.character(e$message)) e$message else "Unknown error."
cli::cli_warn(c(
i = "Failed to install torch, manually run install_torch()",
x = message
i = "Failed to install torch, manually run {.fn install_torch}",
x = msg
), parent = e)
FALSE
}
Expand All @@ -74,11 +74,11 @@ globalVariables(c("..", "self", "private", "N"))
.compilation_unit <<- cpp_jit_compilation_unit()
},
error = function(e) {
message <- if (is.character(e$message)) e$message else "Unknown error."
msg <- if (is.character(e$message)) e$message else "Unknown error."
cli::cli_warn(c(
i = "torch failed to start, restart your R session to try again.",
i = "You might need to reinstall torch using {.fn install_torch}",
x = message
x = msg
), parent = e)
FALSE
}
Expand Down

0 comments on commit b8fe6a2

Please sign in to comment.