Skip to content

Commit 8070dec

Browse files
Use runs-on GPU runners for CI (#212)
* Use runs-on GPU runners for CI Replace self-hosted GPU runners with runs-on g4dn.xlarge spot instances, matching the approach in mlverse/torch#1439. Also modernizes the workflow: - Action versions: checkout@v4, setup-python@v5, setup-r@v2, etc. - Fix deprecated ::set-output → $GITHUB_OUTPUT - Container: ubuntu18.04 → ubuntu20.04 (18.04 is EOL) - Add --runtime=nvidia to container options - Add concurrency groups with cancel-in-progress - Simplify matrix to single config (CUDA 11.2.1, cuML 21.12, R release) - Drop ASAN matrix dimension * Revert container to ubuntu18.04 for CUDA 11.2 compatibility * Use CUDA 11.2.2 container (11.2.1 removed from Docker Hub) * Bump container to ubuntu20.04 (18.04 glibc too old for Node 20 actions) * Split CI into build-image (free runner) and test-gpu (GPU runner) - Build Docker image with cuda.ml pre-installed on ubuntu-latest (free) - Run tests on runs-on g4dn.xlarge GPU runner using the pre-built image - Add .github/docker/Dockerfile following the same pattern as mlverse/torch - Make CMAKE_CUDA_ARCHITECTURES configurable via env var (defaults to NATIVE) so cross-compilation works on runners without a GPU (targets T4 = SM 75) - Remove miniconda install (no longer needed for reticulate tests) * Fix sklearn install: use scikit-learn package name and py_require() The 'sklearn' PyPI package is deprecated in favor of 'scikit-learn'. Also switch from py_install() to py_require() which is the modern reticulate API for declaring Python dependencies. * Fix configure warnings: normalizePath ordering and cmake unused variable - Move download_libcuml() before normalizePath() so the directory exists - Reference CUML_STUB_HEADERS_DIR in both Treelite found/not-found branches so cmake doesn't warn about unused variable * Fix TSVD tests for SVD sign ambiguity between cuML and sklearn SVD components are only defined up to sign, so different implementations can produce sign-flipped vectors that are mathematically equivalent. Align signs before comparing components and transformed data. * Fix sklearn max_iter type: use integer (10000L) not float (10000.0) Modern sklearn strictly validates that max_iter is an int. R's default numeric type is double, which reticulate passes as a Python float. Using 10000L ensures it's passed as a Python int. * Add CRAN-like check job (no CUDA, stub headers, ubuntu-latest) Runs R CMD check --as-cran on ubuntu-latest with R release and devel. No nvcc/CUDA available, so the package builds with stub headers — matching what CRAN would see. * Update roxygen * export S3 methods * roxygen updates * Fix CRAN check: escape Rd braces, skip tests without cuML - Escape literal braces in roxygen comments across R source files and templates (e.g. {cuda.ml} -> \{cuda.ml\}, {"opt1",...} -> \{"opt1",...\}) - Regenerate all affected Rd files via devtools::document() - Skip test_check() when cuML is not linked (CRAN-like environments) - Use R CMD check directly in CRAN job (avoids rcmdcheck NOT_CRAN=true) * Fix examples brace escaping and register S3 methods - Revert brace escaping inside @examples blocks (R code, not Rd markup) - Define cuda_ml_can_predict_class_probabilities methods as proper functions so roxygen registers them as S3method() in NAMESPACE * Add RAPIDS cuML 26.04 + CUDA 12 support Build infrastructure: - Dockerfile: CUDA 12.8.1 + Ubuntu 22.04 base image - libcuml_versions.R: add 26.04 entry pointing to PyPI libcuml-cu12 wheel - cuml.R: handle pip wheel extraction (lib64/ layout, .whl extension) - configure.R: handle lib64/ vs lib/ for pip wheels - CMakeLists.txt.in: C++17, rapids-cmake branch-26.04 - Workflow: target cuML 26.04 C++ API changes for cuML 26.04: - svm_serde.h: namespace alias MLCommon::Matrix -> ML::matrix for KernelParams and KernelType (header renamed kernelparams.h -> kernel_params.hpp) - fil.cu, fil_utils.h, fil_utils.cu: disable FIL on 26.04 with stubs (fil.h replaced by modular headers; full adaptation TODO) - random_projection.cu: disable on 26.04 with stubs (C++ API removed) - knn.cu: disable on 26.04 with stubs (raft::spatial::knn types removed) - random_forest_classifier.cu, random_forest_regressor.cu: guard FIL prediction paths for 26.04 Backward compatible: cuML 21.x with CUDA 11 still works. * Test both cuML 21.12 and 26.04 in CI - Dockerfile: accept CUDA_IMAGE as build arg for different base images - Workflow: matrix over cuML 21.12 (CUDA 11.2) and 26.04 (CUDA 12.8) - Each version gets its own build-image and test-gpu job * Fix rapids-cmake version and lib symlink for dual cuML support - CMakeLists.txt.in: template RAPIDS_CMAKE_TAG and CMAKE_CXX_STANDARD so they adapt to the cuML version being built against - configure.R: set rapids-cmake tag (v26.04.00 for 26.x, branch-21.10 for 21.x) and C++ standard (17 for 26.x, 14 for 21.x) - cuml.R: don't create premature lib symlink in download_libcuml() * Derive rapids-cmake tag from cuML version instead of hardcoding Use vYY.MM.00 for cuML >= 23.02 (stable tags), vYY.MM.00a for older versions (only alpha tags available). * Require cmake 3.30.4+ for cuML 26.04 (auto-downloaded if missing) rapids-cmake v26.04 needs cmake >= 3.30.4. The existing auto-download logic handles this, but the min version threshold was hardcoded to 3.21.1. Now it's 3.30.4 for cuML >= 23.02, 3.21.1 for older versions. * Fix cuML 26.04 build: raft/rmm deps, static_assert, device_allocator - Download libraft-cu12 and librmm-cu12 wheels alongside libcuml-cu12 (cuml headers include raft/rmm headers which are in separate packages) - Merge raft/rmm headers into libcuml/include/ during download - Remove static_assert(CUML_VERSION_MAJOR == 21) — allow 26+ - Guard raft::mr::device::allocator (removed in raft 26.x) with version conditionals in device_allocator.cu/.h and stream_allocator.cu - Use raft/core/handle.hpp instead of raft/handle.hpp for v26+ * Resolve cuML PyPI deps dynamically instead of hardcoding URLs - Add tools/config/utils/pypi.R with resolve_native_deps() that walks the PyPI dependency tree for a package and returns download URLs for all native C++ dependencies (libraft, librmm, rapids-logger, cccl, etc.) - libcuml_versions.R: cuML 26.04 entry is now just "libcuml-cu12" (the PyPI package name), not a hardcoded URL - cuml.R: download_libcuml() detects PyPI package names vs direct URLs, resolves the full dep tree, downloads all wheels, and merges their include/ directories into libcuml/include/ - configure.R: load pypi.R utility - Uses jsonlite for PyPI JSON API parsing * Download CCCL 3.3 headers for cuML 26.04 builds RMM 26.04 headers require CCCL >= 3.3 at compile time, but CCCL is not a pip dependency (it's normally bundled with the CUDA toolkit). CUDA 12.x ships CCCL 2.x which is too old. Download CCCL v3.3.0 from GitHub releases (header-only, ~2MB) and merge into libcuml/include/. Also handle pip wheels that extract to nested dirs like nvidia/<subpackage>/include/. * Put CUML_INCLUDE_DIR before CUDA toolkit includes CCCL 3.3 headers (bundled in libcuml/include/) must take precedence over the CUDA 12 toolkit's older CCCL 2.x headers. Swap include order so cuml/raft/rmm/cccl headers are found first. * Fix CCCL compat, pinned_allocator removal, and raft handle API - Use RAPIDS-pinned CCCL commit (CUDA 12 compatible) instead of v3.3.0 release tag which includes CUDA 13-only code - pinned_host_vector.h: guard thrust::cuda::experimental::pinned_allocator (removed in CCCL 3.x); use plain host_vector on v26+ - handle_utils.cu: raft::handle_t no longer has set_stream(); reconstruct with stream_view via constructor on v26+ * Switch to cuML 25.12 (no CCCL 3.x requirement) cuML 26.04's rmm headers require CCCL >= 3.3 which conflicts with CUDA 12.x toolkit's CCCL 2.x. cuML 25.12 vendors its own CCCL in librmm/include/rapids/ and has no CCCL version check — clean CUDA 12 compatibility. - Target cuML 25.12 instead of 26.04 - Version guards: >= 26 -> >= 25 (same API changes apply) - Re-enable KNN (knn.hpp exists in 25.12 with same API) - Remove CCCL GitHub download (not needed) - Update PyPI resolver to handle version pins (==25.12.*) * Define LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE for RMM RMM headers require this define (normally set automatically by RMM's cmake config, but we're using headers directly from the pip wheel). * Revert cuML 25.x/26.x support (CCCL 3.x incompatible with CUDA 12) All RAPIDS 25.x+ pip wheels require CCCL 3.x headers which are incompatible with CUDA 12's bundled CCCL 2.x. No version of libcuml-cu12 can be compiled against a stock CUDA 12 toolkit. Revert to cuML 21.12 as the default for now. Supporting newer cuML will require either CUDA 13 or a custom build environment. --------- Co-authored-by: Tomasz Kalinowski <kalinowskit@gmail.com>
1 parent 54fc957 commit 8070dec

51 files changed

Lines changed: 312 additions & 208 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.Rbuildignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,6 @@
3131
^libcuml/*
3232
^\.github$
3333
^\.lsan-suppressions\.txt$
34+
^\.positai$
35+
^\.claude$
36+
^\.codex$

.github/docker/Dockerfile

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
FROM nvidia/cuda:11.2.2-devel-ubuntu20.04
2+
3+
ENV DEBIAN_FRONTEND=noninteractive
4+
5+
# System dependencies
6+
RUN apt-get update -y && apt-get install -y \
7+
sudo software-properties-common dialog apt-utils \
8+
tzdata locales curl wget git \
9+
libcurl4-openssl-dev libssl-dev libxml2-dev \
10+
libfontconfig1-dev libfreetype6-dev libpng-dev \
11+
libharfbuzz-dev libfribidi-dev libtiff5-dev libjpeg-dev \
12+
make gcc g++ pandoc python3 python3-pip
13+
14+
# Install R via rig
15+
RUN curl -L https://rig.r-pkg.org/deb/rig.gpg -o /etc/apt/trusted.gpg.d/rig.gpg \
16+
&& echo "deb http://rig.r-pkg.org/deb rig main" > /etc/apt/sources.list.d/rig.list \
17+
&& apt-get update \
18+
&& apt-get install -y r-rig \
19+
&& rig add release \
20+
&& rig default release \
21+
&& rm -rf /var/lib/apt/lists/*
22+
23+
# Use a fixed library path (not HOME-dependent) so packages are found
24+
# regardless of what HOME is set to at runtime (GitHub Actions sets HOME=/github/home)
25+
ENV R_LIBS_USER=/opt/R/library
26+
RUN mkdir -p /opt/R/library
27+
28+
# Parallel compilation
29+
RUN echo "MAKEFLAGS=-j$(nproc)" >> "$(R RHOME)/etc/Renviron.site"
30+
31+
# Copy source
32+
COPY . /build
33+
34+
ARG CUML_VERSION=21.12
35+
ENV CUML_VERSION=${CUML_VERSION}
36+
37+
# Cross-compile for T4 GPU (compute capability 7.5) since build runner has no GPU
38+
ARG CMAKE_CUDA_ARCHITECTURES=75
39+
ENV CMAKE_CUDA_ARCHITECTURES=${CMAKE_CUDA_ARCHITECTURES}
40+
41+
ENV NOT_CRAN=true
42+
43+
# Install R dependencies
44+
RUN Rscript -e "\
45+
install.packages('pak', repos = 'https://r-lib.github.io/p/pak/devel/'); \
46+
pak::local_install_deps('/build', dependencies = TRUE)" \
47+
&& rm -rf /tmp/* /root/.cache
48+
49+
# Install cuda.ml with tests
50+
RUN R CMD INSTALL --install-tests /build
51+
52+
# Clean up
53+
RUN rm -rf /tmp/* /build

.github/workflows/R-CMD-check.yaml

Lines changed: 72 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
2-
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
31
on:
42
push:
53
branches: [main]
@@ -9,117 +7,99 @@ on:
97
name: R-CMD-check
108

119
jobs:
12-
R-CMD-check:
13-
10+
check-cran:
1411
strategy:
1512
fail-fast: false
1613
matrix:
17-
cuda: ['11.2.1']
18-
cuml: ['21.08', '21.10', '21.12']
1914
r: ['release', 'devel']
20-
asan: ['false', 'true']
21-
22-
runs-on: ['self-hosted', 'gpu']
23-
container:
24-
image: nvidia/cuda:${{ matrix.cuda }}-devel-ubuntu18.04
25-
options: --gpus all
2615

27-
name: 'R: ${{ matrix.r }}, CUDA: ${{ matrix.cuda }}, CUML: ${{ matrix.cuml }}, ASAN: ${{ matrix.asan }}'
16+
runs-on: ubuntu-latest
17+
name: 'CRAN (R: ${{ matrix.r }})'
2818

2919
env:
30-
NOT_CRAN: true
3120
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
3221
R_KEEP_PKG_SOURCE: yes
33-
CUML_VERSION: ${{ matrix.cuml }}
34-
CUML4R_ENABLE_ASAN: ${{ matrix.asan }}
35-
DEBIAN_FRONTEND: 'noninteractive'
3622

3723
steps:
38-
- run: |
39-
apt-get update -y
40-
apt-get install -y sudo software-properties-common dialog apt-utils tzdata
41-
if [[ $CUML4R_ENABLE_ASAN == 'true' ]]; then
42-
apt-get install -y libasan5
43-
fi
44-
shell: bash
45-
46-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v4
4725

48-
- uses: r-lib/actions/setup-pandoc@v1
26+
- uses: r-lib/actions/setup-pandoc@v2
4927

50-
- uses: actions/setup-python@v2
51-
with:
52-
python-version: '3.x'
53-
architecture: 'x64'
54-
55-
- uses: r-lib/actions/setup-r@master
28+
- uses: r-lib/actions/setup-r@v2
5629
with:
5730
r-version: ${{ matrix.r }}
58-
http-user-agent: ${{ matrix.config.http-user-agent }}
5931
use-public-rspm: true
6032

61-
- uses: r-lib/actions/setup-r-dependencies@v1
33+
- uses: r-lib/actions/setup-r-dependencies@v2
6234
with:
63-
extra-packages: rcmdcheck
35+
needs: check
36+
37+
- name: Build
38+
run: R CMD build .
39+
40+
- name: Check
41+
run: R CMD check --no-manual --as-cran cuda.ml_*.tar.gz
42+
env:
43+
_R_CHECK_CRAN_INCOMING_: false
44+
45+
build-image:
46+
runs-on: ubuntu-latest
47+
permissions:
48+
contents: read
49+
packages: write
50+
timeout-minutes: 120
51+
outputs:
52+
image: ghcr.io/${{ github.repository }}-ci:${{ github.sha }}
53+
steps:
54+
- uses: actions/checkout@v4
6455

65-
- name: Build {cuda.ml}
66-
id: build-pkg
67-
run: |
68-
cd ..
69-
ls -a
70-
rm -v cuda.ml_*.tar.gz
71-
R CMD build cuda.ml
72-
ls -a
73-
echo "::set-output name=pkg-dir::$(pwd)"
56+
- name: Set up Docker Buildx
57+
uses: docker/setup-buildx-action@v3
58+
59+
- name: Login to GitHub Container Registry
60+
uses: docker/login-action@v3
61+
with:
62+
registry: ghcr.io
63+
username: ${{ github.actor }}
64+
password: ${{ secrets.GITHUB_TOKEN }}
65+
66+
- name: Build and push
67+
uses: docker/build-push-action@v6
68+
with:
69+
context: .
70+
file: .github/docker/Dockerfile
71+
push: true
72+
tags: ghcr.io/${{ github.repository }}-ci:${{ github.sha }}
73+
build-args: |
74+
CUML_VERSION=21.12
75+
CMAKE_CUDA_ARCHITECTURES=75
76+
77+
test-gpu:
78+
needs: build-image
79+
if: ${{ always() && needs.build-image.result == 'success' }}
80+
concurrency:
81+
group: gpu-tests
82+
runs-on:
83+
- "runs-on=${{ github.run_id }}/family=g4dn.xlarge/image=ubuntu24-gpu-x64/spot=true"
84+
container:
85+
image: ${{ needs.build-image.outputs.image }}
86+
credentials:
87+
username: ${{ github.actor }}
88+
password: ${{ secrets.GITHUB_TOKEN }}
89+
options: --gpus all --runtime=nvidia
90+
timeout-minutes: 60
91+
env:
92+
NOT_CRAN: true
7493

75-
- run: cp -v cuda.ml/.lsan-suppressions.txt /tmp
76-
working-directory: ${{ steps.build-pkg.outputs.pkg-dir }}
94+
steps:
95+
- name: Verify GPU access
96+
run: nvidia-smi
7797

78-
- name: Check {cuda.ml} package
79-
run: |
80-
print(list.files("."))
81-
pkg <- list.files(".", pattern = "cuda\\.ml_.*\\.tar\\.gz")
82-
stopifnot(length(pkg) == 1)
83-
84-
reticulate::install_miniconda(force = TRUE)
85-
86-
rcmdcheck_env <- (
87-
if (identical(Sys.getenv("CUML4R_ENABLE_ASAN"), "true")) {
88-
c(
89-
LD_PRELOAD = "/usr/lib/x86_64-linux-gnu/libasan.so.5",
90-
ASAN_OPTIONS = "halt_on_error=0,new_delete_type_mismatch=0,alloc_dealloc_mismatch=0,protect_shadow_gap=0",
91-
LSAN_OPTIONS = "suppressions=/tmp/.lsan-suppressions.txt"
92-
)
93-
} else {
94-
character()
95-
}
96-
)
97-
rcmdcheck::rcmdcheck(
98-
path = pkg[[1]],
99-
args = c("--no-manual", "--as-cran"),
100-
check_dir="check",
101-
env = rcmdcheck_env
102-
)
103-
shell: Rscript {0}
104-
working-directory: ${{ steps.build-pkg.outputs.pkg-dir }}
105-
106-
- name: Show testthat output
107-
if: ${{ always() }}
98+
- name: Session info
10899
run: |
109-
find check -name 'testthat.Rout*' -type f -exec cat '{}' \; || :
110-
shell: bash
111-
working-directory: ${{ steps.build-pkg.outputs.pkg-dir }}
100+
Rscript -e "sessionInfo()"
101+
Rscript -e "library(cuda.ml)"
112102
113-
- name: Check for sanitizer error(s)
114-
if: ${{ always() }}
103+
- name: Run tests
115104
run: |
116-
! find check -name 'testthat.Rout*' -type f -exec egrep -C 50 'ERROR: .*Sanitizer:' '{}' +
117-
shell: bash
118-
working-directory: ${{ steps.build-pkg.outputs.pkg-dir }}
119-
120-
- name: Upload check results
121-
if: ${{ failure() }}
122-
uses: actions/upload-artifact@main
123-
with:
124-
name: ${{ runner.os }}-r${{ matrix.r }}-results
125-
path: ${{ steps.build-pkg.outputs.pkg-dir }}/check
105+
Rscript -e "testthat::test_package('cuda.ml', reporter = 'progress')"

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ cuda.ml.Rcheck
1212
*.cmake
1313
*.a
1414
00check.log
15+
.positai
16+
.codex

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Suggests:
4545
xgboost
4646
LinkingTo: Rcpp
4747
Encoding: UTF-8
48-
RoxygenNote: 7.1.2
48+
RoxygenNote: 7.3.3
4949
OS_type: unix
5050
SystemRequirements: RAPIDS cuML (see https://rapids.ai/start.html)
5151
NeedsCompilation: yes

NAMESPACE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
11
# Generated by roxygen2: do not edit by hand
22

3+
S3method(cuda_ml_can_predict_class_probabilities,cuda_ml_fil)
4+
S3method(cuda_ml_can_predict_class_probabilities,cuda_ml_knn)
35
S3method(cuda_ml_can_predict_class_probabilities,cuda_ml_model)
6+
S3method(cuda_ml_can_predict_class_probabilities,cuda_ml_rand_forest)
47
S3method(cuda_ml_can_predict_class_probabilities,default)
58
S3method(cuda_ml_elastic_net,data.frame)
69
S3method(cuda_ml_elastic_net,default)
710
S3method(cuda_ml_elastic_net,formula)
811
S3method(cuda_ml_elastic_net,matrix)
912
S3method(cuda_ml_elastic_net,recipe)
13+
S3method(cuda_ml_get_state,cuda_ml_model)
14+
S3method(cuda_ml_get_state,cuda_ml_pca)
15+
S3method(cuda_ml_get_state,cuda_ml_rand_forest)
16+
S3method(cuda_ml_get_state,cuda_ml_rand_proj_model)
17+
S3method(cuda_ml_get_state,cuda_ml_svc)
18+
S3method(cuda_ml_get_state,cuda_ml_svc_ovr)
19+
S3method(cuda_ml_get_state,cuda_ml_svr)
20+
S3method(cuda_ml_get_state,cuda_ml_umap)
21+
S3method(cuda_ml_get_state,default)
1022
S3method(cuda_ml_inverse_transform,cuda_ml_pca)
1123
S3method(cuda_ml_inverse_transform,cuda_ml_tsvd)
1224
S3method(cuda_ml_is_classifier,cuda_ml_model)
@@ -43,6 +55,15 @@ S3method(cuda_ml_ridge,matrix)
4355
S3method(cuda_ml_ridge,recipe)
4456
S3method(cuda_ml_serialize,cuda_ml_model)
4557
S3method(cuda_ml_serialize,default)
58+
S3method(cuda_ml_set_state,cuda_ml_model_state)
59+
S3method(cuda_ml_set_state,cuda_ml_pca_model_state)
60+
S3method(cuda_ml_set_state,cuda_ml_rand_forest_model_state)
61+
S3method(cuda_ml_set_state,cuda_ml_rand_proj_model_state)
62+
S3method(cuda_ml_set_state,cuda_ml_svc_model_state)
63+
S3method(cuda_ml_set_state,cuda_ml_svc_ovr_model_state)
64+
S3method(cuda_ml_set_state,cuda_ml_svr_model_state)
65+
S3method(cuda_ml_set_state,cuda_ml_umap_model_state)
66+
S3method(cuda_ml_set_state,default)
4667
S3method(cuda_ml_sgd,data.frame)
4768
S3method(cuda_ml_sgd,default)
4869
S3method(cuda_ml_sgd,formula)

R/agglomerative.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ agglomerative_clustering_match_metric <- function(metric = c("euclidean", "l1",
1818
#' @template model-with-numeric-input
1919
#' @param n_clusters The number of clusters to find. Default: 2L.
2020
#' @param metric Metric used for linkage computation. Must be one of
21-
#' {"euclidean", "l1", "l2", "manhattan", "cosine"}. If connectivity is
21+
#' \{"euclidean", "l1", "l2", "manhattan", "cosine"\}. If connectivity is
2222
#' "knn" then only "euclidean" is accepted. Default: "euclidean".
2323
#' @param connectivity The type of connectivity matrix to compute. Must be one
24-
#' of {"pairwise", "knn"}. Default: "pairwise".
24+
#' of \{"pairwise", "knn"\}. Default: "pairwise".
2525
#' - 'pairwise' will compute the entire fully-connected graph of pairwise
2626
#' distances between each set of points. This is the fastest to compute
2727
#' and can be very fast for smaller datasets but requires O(n^2) space.

R/cuml_utils.R

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#' Determine whether {cuda.ml} was linked to a valid version of the RAPIDS cuML
1+
#' Determine whether \{cuda.ml\} was linked to a valid version of the RAPIDS cuML
22
#' shared library.
33
#'
4-
#' @return A logical value indicating whether the current installation {cuda.ml}
4+
#' @return A logical value indicating whether the current installation \{cuda.ml\}
55
#' was linked to a valid version of the RAPIDS cuML shared library.
66
#'
77
#' @examples
@@ -17,11 +17,11 @@
1717
#' @export
1818
has_cuML <- .has_cuML
1919

20-
#' Get the major version of the RAPIDS cuML shared library {cuda.ml} was linked
20+
#' Get the major version of the RAPIDS cuML shared library \{cuda.ml\} was linked
2121
#' to.
2222
#'
23-
#' @return The major version of the RAPIDS cuML shared library {cuda.ml} was
24-
#' linked to in a character vector, or \code{NA_character_} if {cuda.ml} was not
23+
#' @return The major version of the RAPIDS cuML shared library \{cuda.ml\} was
24+
#' linked to in a character vector, or \code{NA_character_} if \{cuda.ml\} was not
2525
#' linked to any version of RAPIDS cuML.
2626
#'
2727
#' @examples
@@ -32,11 +32,11 @@ has_cuML <- .has_cuML
3232
#' @export
3333
cuML_major_version <- .cuML_major_version
3434

35-
#' Get the minor version of the RAPIDS cuML shared library {cuda.ml} was linked
35+
#' Get the minor version of the RAPIDS cuML shared library \{cuda.ml\} was linked
3636
#' to.
3737
#'
38-
#' @return The minor version of the RAPIDS cuML shared library {cuda.ml} was
39-
#' linked to in a character vector, or \code{NA_character_} if {cuda.ml} was not
38+
#' @return The minor version of the RAPIDS cuML shared library \{cuda.ml\} was
39+
#' linked to in a character vector, or \code{NA_character_} if \{cuda.ml\} was not
4040
#' linked to any version of RAPIDS cuML.
4141
#'
4242
#' @examples

R/fil.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#' Determine whether Forest Inference Library (FIL) functionalities are enabled
2-
#' in the current installation of {cuda.ml}.
2+
#' in the current installation of \{cuda.ml\}.
33
#'
44
#' CuML Forest Inference Library (FIL) functionalities (see
55
#' https://github.com/rapidsai/cuml/tree/main/python/cuml/fil#readme) will
66
#' require Treelite C API. If you need FIL to run tree-based model ensemble on
77
#' GPU, and \code{fil_enabled()} returns FALSE, then please consider installing
8-
#' Treelite and then re-installing {cuda.ml}.
8+
#' Treelite and then re-installing \{cuda.ml\}.
99
#'
1010
#' @return A logical value indicating whether the Forest Inference Library (FIL)
1111
#' functionalities are enabled.
@@ -62,9 +62,9 @@ file_match_storage_type <- function(storage_type = c("auto", "dense", "sparse"))
6262
#'
6363
#' @param filename Path to the saved model file.
6464
#' @param mode Type of task to be performed by the model. Must be one of
65-
#' {"classification", "regression"}.
65+
#' \{"classification", "regression"\}.
6666
#' @param model_type Format of the saved model file. Notice if \code{filename}
67-
#' ends with ".json" and \code{model_type} is "xgboost", then {cuda.ml} will
67+
#' ends with ".json" and \code{model_type} is "xgboost", then \{cuda.ml\} will
6868
#' assume the model file is in XGBoost JSON (instead of binary) format.
6969
#' Default: "xgboost".
7070
#' @param algo Type of the algorithm for inference, must be one of the

0 commit comments

Comments
 (0)