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.

  1. Verify that the Python environment on your local system supports XGBoost 1.6.2 and Scikit-learn 1.2.1 releases.
  2. Locate the wmlz_model_utils-<VERSION>-<PY_VER>-<PLATFORM>.whl package 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.
  3. Download the package file onto your local system where you run your own Python environment.
  4. Install the package into the Python environment by using the pip command:
    pip install wmlz_model_utils-<VERSION>-<PY_VER>-<PLATFORM>.whl
  5. If necessary, create a new Scikit-learn model, XGBoost model, or a new model using PySpark in the Python environment.
  6. 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:
  1. Verify that the Java/Scala environment on your local system supports Watson Core Time Series time-series-assembly v2.14.2 releases.
  2. 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.
  3. Download the library file onto your local system where you run your own Java/Scala environment.
  4. Add the library into the Java/Scala environment with the appropriate configuration.
  5. If necessary, create a new Watson Core Time Series forecasting model in your Java/Scala environment.
  6. 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.

Procedure

  1. Sign in to the ML for IBM z/OS user interface at https://<yourMLzUI-URL> with your username and password, where <yourWMLzUI-URL> is the host IP address and port number for your MLz UI.

    See Configuring MLz for more information about the host IP address and port number of your MLz.

  2. Go to the Models tab and click Import model.
  3. On the Import model page, select the From file tab (if not already opened by default).
  4. Enter a name, select MLz Model for model type, and upload the source file of your model (in .gz, .tar.gz, or .zip format).
  5. Optionally, select a custom runtime for the model.
  6. Click Import to import the model.
  7. Verify that the imported model shows up on the Models page.