Importing a model from file

You can import a model from a file into WMLz for deployment and management. The model in the source file can be a previously exported WMLz model or a Spark, Scikit-learn, XGBoost, PMML, ARIMA, Seasonal ARIMA, or ONNX model trained on your distributed system.

Before you begin

For a Spark, Scikit-learn, or XGBoost model pretrained on your local distributed platform, you must use the supplied Python utility library to prepare the model for import:

  1. Verify that the Python environment on your local system supports XGBoost 0.90 and Scikit-learn 0.23.x releases.
  2. Locate the wmlz_model_utils-2.2.202104190842-py3-none-any.whl package in the $IML_INSTALL_DIR/imlpython/iml-pkgs directory. As its name indicates, the package file contains the WML for 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-2.2.202104190842-py3-none-any.whl
  5. If necessary, create a new Spark, Scikit-learn, or XGBoost model in your Python environment.
  6. Save the model to your local file system by using the WMLz Python model utility. See WML for z/OS model utility API for samples and instructions.

Procedure

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

    See Configuring WML for z/OS for more information about the host IP address and port number of your WMLz.

  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. Import the model from your local file system into WMLz.
    1. Specify a name for the new model and select MLz Model for model type.
    2. Browse, select, and upload a model source file.
    3. Click Import model to import the model.
  7. Click Import to import the model.
  8. Verify that the imported model shows up on the Models page.