[Doc] Warn against loading JSON from external source (#7918)

This commit is contained in:
Philip Hyunsu Cho 2022-05-18 17:02:36 -07:00 committed by GitHub
parent f93a727869
commit 6f424d8d6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,6 +68,12 @@ a filename with ``.json`` or ``.ubj`` as file extension, the latter is the exten
xgb.save(bst, 'model_file_name.json')
.. note::
Only load models from JSON files that were produced by XGBoost. Attempting to load
JSON files that were produced by an external source may lead to undefined behaviors
and crashes.
While for memory snapshot, UBJSON is the default starting with xgboost 1.6.
***************************************************************