Importing a model from file
You can import a model from a file into MLz for deployment and management. The model in the source file can be a previously exported MLz model or a Spark, Scikit-learn, XGBoost, PMML, ARIMA, Seasonal ARIMA, ONNX, Watson Core Time Series forecasting model trained on your distributed system.
Before you begin
For Scikit-learn models, XGBoost models, and models using PySpark that are pre-trained on the local distributed platform, you must use the configured Python utility library to prepare the models for import.
- Verify that the Python environment on your local system supports XGBoost 1.6.2 and Scikit-learn 1.2.1 releases.
- Locate the
wmlz_model_utils-<VERSION>-<PY_VER>-<PLATFORM>.whlpackage in the $IML_INSTALL_ENT_DIR/imlpython/iml-pkgs directory. As its name indicates, the package file contains the ML for IBM z/OSĀ® Python utility library. - Download the package file onto your local system where you run your own Python environment.
- Install the package into the Python
environment by using the pip
command:
pip installwmlz_model_utils-<VERSION>-<PY_VER>-<PLATFORM>.whl - If necessary, create a new Scikit-learn model, XGBoost model, or a new model using PySpark in the Python environment.
- Save the model to the local file system by using the MLz Python model utility. See ML for IBM z/OS model utility API for samples and instructions.
For a Watson Core Time Series forecasting model pretrained on your
local distributed platform, you must use the supplied Java utility library to prepare the model for import:
- Verify that the Java/Scala environment on your local system supports Watson Core Time Series time-series-assembly v2.14.2 releases.
- Locate the scala-model-util_<VERSION>.jar library in the $IML_INSTALL_DIR/iml-library/library/utils directory. As its name indicates, the library file contains the ML for IBM z/OS Java/Scala utility library.
- Download the library file onto your local system where you run your own Java/Scala environment.
- Add the library into the Java/Scala environment with the appropriate configuration.
- If necessary, create a new Watson Core Time Series forecasting model in your Java/Scala environment.
- Save the model to the local file system by using the MLz Java model utility. See ML for IBM z/OS model utility API for samples and instructions.