| bundle.cuda_ml_model | R Documentation |
Converts a model with explicit state into a
bundle::bundle() object. KNN and TSVD fits do not currently implement
explicit state.
## S3 method for class 'cuda_ml_model'
bundle(x, ...)
## S3 method for class 'cuda_ml_nvforest'
bundle(x, device = NULL, ...)
x |
A fitted cuda.ml model. |
... |
Unused. |
device |
For an nvForest-backed model, the device on which the bundle
will restore. |
cuda.ml validates the model state and required backend before loading it.
Prepare the backend in the target process with cuda_ml_install() for
GPU operation or cuda_ml_install(device = "cpu") for CPU-only
nvForest inference.
Random-forest and nvForest states contain device-neutral Treelite model
bytes. They retain prediction precision, class labels, preprocessing, and
model semantics, but not the inference device, device identifier, tree
layout, chunk size, or memory alignment. Select those settings while
restoring; omitting device selects GPU inference.
bundle::bundle() stores the same explicit state. For an
nvForest-backed model, the bundle also stores its chosen deployment device
separately from the device-neutral state. A bundle is not required for
deployment; cuda_ml_serialize() returns the complete state artifact
directly.
cuda_ml_serialize,
cuda_ml_unserialize
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.