Skip to content

Commit 7e334e3

Browse files
committed
Add warning about the use of pickle for model deserialization to README.
1 parent 249bd67 commit 7e334e3

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,12 @@ See the build [guide](BUILD.md).
131131

132132
cuML is compatible with scikit-learn version 1.4 or higher.
133133

134+
## Model serialization and security
135+
136+
cuML models can be serialized with `pickle` or `joblib` and loaded later for inference. cuML uses cloudpickle so that models trained with cuml.accel can be loaded and used with scikit-learn.
137+
138+
**Only unpickle or deserialize from trusted sources.** The `pickle` module (and by extension `joblib`) is not secure: malicious payloads can execute arbitrary code during deserialization and compromise your system. **Do not unpickle or load data from untrusted or tampered sources.** This applies to `pickle.load()` / `pickle.loads()`, `joblib.load()`, and any file-based model loading. For details and patterns, see the [Model Serialization and Persistence](docs/source/pickling_cuml_models.ipynb) notebook and the [Python pickle security documentation](https://docs.python.org/3/library/pickle.html).
139+
134140
## Contributing
135141

136142
Please see our [guide for contributing to cuML](CONTRIBUTING.md).

0 commit comments

Comments
 (0)