Configuring the ONNX compiler service for your WML for z/OS

If you plan to import, deploy, and manage your ONNX models with WML for z/OS, you must first configure the required ONNX compiler service. With the service, your ONNX models are compiled into an executable format during import, uploaded into the WMLz repository, and readied for deployment and scoring.

Before you begin

Only one ONNX compiler service is required for each installation of the WMLz. Before you start, make sure that you have completed the following tasks:

Procedure

  1. Start an USS session as <mlz_setup_userid>.
  2. Locate the onnx-compiler.sh script in the $IML_INSTALL_ENT_DIR/iml-onnx/onnx-compiler directory on the system where your WMLz runs.

    You can use this script to create, configure, and manage the ONNX compiler service within a zCX instance or a Linux on Z server.

  3. Create the compiler service by issuing the following command:
    ./onnx-compiler.sh create
  4. When prompted, respond by entering the requested information or accepting the default value for each question:
    • Enter the IP address or hostname of the zCX instance or the Linux on Z server.
    • Enter the SSH port number of the zCX instance or the Linux on Z server.
    • Enter the SSH username <docker_user> of the zCX instance or the Linux on Z server.

      The <docker_user> will be used to connect to the zCX instance or the Linux on Z server, and start the docker container of the ONNX compiler service.

    • Select the authentication type for zCX or Linux on Z server SSH login by the <docker_user>:
      • If you select password, enter the SSH password.
      • If you select passphrase, enter the full path of the private ssh key file and optionally the SSH passphrase.
    • Enter the port number of the ONNX compiler service on zCX or Linux on Z server or press Enter to use default port 18080.

    After collecting all required information, the script loads the ONNX compiler service image and related assets into the zCX instance or the Linux on Z server. It returns a message similar to the following example when the service is successfully created:

    ONNX compiler service created successfully.
  5. Start the ONNX compiler service by entering Y when prompted.

    If you prefer, you can start the service at a later time by running the following command by using SSH:

    ./onnx-compiler.sh start
  6. Verify that the ONNX compiler service is successfully started.

    The onnx-compiler.sh script returns a message similar to the following example when the service is successfully started:

    onnx-compiler-service container <onnx-compiler-service-containerID> started successfully on zCX.
    Onnx compiler service started successfully. See details in the log /media/azd_shared_volume/iml-home/
               onnx-compiler/logs/onnx-compiler-service.log on zCX.

    If needed, log in the zCX instance or the Linux on Z server via SSH and review onnx-compiler-service.log for details.

  7. Restart the UI service of your WMLz.

    After the initial configuration of the ONNX compiler service, you must restart your WMLz UI service to activate the ONNX support. See Stopping and starting services running on WML for z/OS for instructions.

  8. If necessary, update the compiler service by issuing the following command:
    ./onnx-compiler.sh update

    If you changed the port number of the ONNX compiler service and the IP address (or hostname) of the zCX instance or the Linux on Z server where the compiler service runs, you must restart your WMLz UI service to reactivate the ONNX support. See Stopping and starting services running on WML for z/OS for instructions.

  9. If necessary, stop the compiler service by issuing the following command:
    ./onnx-compiler.sh stop