ml

Important: IBM Cloud Pak® for Data Version 4.7 will reach end of support (EOS) on 31 July, 2025. For more information, see the Discontinuance of service announcement for IBM Cloud Pak for Data Version 4.X.

Upgrade to IBM Software Hub Version 5.1 before IBM Cloud Pak for Data Version 4.7 reaches end of support. For more information, see Upgrading IBM Software Hub in the IBM Software Hub Version 5.1 documentation.

Manage Watson Machine Learning.

Extended description

You can manage AI lifecycle configuration settings and automate the end-to-end flow.

  • Manage all aspects of a project, including creating or deleting projects, changing project hardware and software specifications, updating package extensions, and managing project members.
  • Prepare and manage data assets and connections.
  • Run experiments to perform actions such as creating and training models, managing models and model pipelines, promoting models to space, or creating new model revisions.
  • Manage all aspects of a deployment space, including creating and deleting deployment spaces, changing space hardware and software specifications, package extensions, and managing space members.
  • Deploy and score models and functions.
  • Create, manage, run, update, and delete deployment jobs.
  • Create a code package (*.zip archive file) and promote it to a space.

Prerequisites

cpd-cli
Before you run any cpd-cli commands, ensure that you downloaded the cpd-cli 13.0.4 command-line utility for your operating system and Cloud Pak for Data edition. For more information, see Installing the Cloud Pak for Data command-line interface (cpd-cli).
Common core services
The ml commands are relevant only when common core services are installed.

Required permissions

The ml command requires cluster administrator or similar roles.

Commands

Table 1. ml commands
Command Description
ml deployment compute-predictions Run a synchronous deployment prediction with the specified identifier. If a 'serving_name' is used, it must match the 'serving_name' that is returned in the 'serving_urls'.
ml deployment create Create a deployment. The parameters that specify the deployment type are online, r_shiny, and batch. The parameters are mutually exclusive (specify only one parameter when you create a deployment).
ml deployment delete Delete the deployment with the specified identifier.
ml deployment get Retrieve the deployment details with the specified identifier.
ml deployment list Retrieve the list of deployments for the specified space.
ml deployment update Update the deployment metadata.
ml deployment wait Wait until the deployment is ready or fails.
ml deployment-job create Start a deployment job asynchronously. The job can perform batch scoring, streaming, or other types of batch operations such as solving a Decision Optimization problem.
ml deployment-job delete Cancel a specific deployment job.
ml deployment-job get Retrieve the deployment job. The predicted data that is bound to the job_id is retained for a limited time based on the service configuration.
ml deployment-job list Retrieve the current job status. The system applies a maximum limit of jobs that are retained by the system. Only most recent 300 jobs (system configurable) are preserved. The system purges older jobs.
ml deployment-job-definition create Create a deployment job definition with the payload. A deployment job definition represents the deployment metadata information to create a batch job in Watson Machine Learning.
ml deployment-job-definition create-revision Create a deployment job definition revision. The current metadata and content for job_definition_id is taken and a revision is created.
ml deployment-job-definition delete Delete the deployment job definition with the specified identifier. The command deletes all revisions of the deployment job definition. For each revision, all attachments will also be deleted.
ml deployment-job-definition get Retrieve the deployment job definition with the specified identifier. When a rev query parameter is provided, rev=latest fetches the latest revision. A call with rev={revision_number} fetches the specified revision_number record.
ml deployment-job-definition list Retrieve the deployment job definitions for a specific space.
ml deployment-job-definition list-revisions Retrieve the deployment job definition revisions.
ml deployment-job-definition update Update the deployment job definition with the specified patch data.
ml experiment create Create an experiment with the specified payload. An experiment represents an asset that captures a set of pipeline or model definition assets that are trained at the same time on the same data set.
ml experiment create-revision Create an experiment revision. The current metadata and content for experiment_id are taken and a revision is created. You must provide either space_id or project_id.
ml experiment delete Delete the experiment with the specified identifier. The command deletes all experiment revisions. All attachments are also deleted for each revision.
ml experiment get Retrieve the experiment with the specified identifier. When a rev query parameter is provided, rev=latest fetches the latest revision. A call with rev={revision_number} fetches the specified revision_number record. You must provide either space_id or project_id.
ml experiment list Retrieve the experiments for a specific space or project.
ml experiment list-revisions Retrieve the experiment revisions.
ml experiment update Update the experiment with the provided patch data.
ml function create Create a function with the defined payload. A function is code that can be deployed as an online or batch deployment.
ml function create-revision Create a function revision. The current metadata and content for function_id are taken and a revision is created. You must provide either space_id or project_id.
ml function delete Delete the function with the specified identifier. The command deletes all function revisions (all attachments are deleted for each revision).
ml function download-code Download the function code.
ml function get Retrieve the function with the specified identifier. When a rev query parameter is provided, rev=latest fetches the latest revision. A call with rev={revision_number} fetches the specified revision_number record. You must provide either space_id or project_id.
ml function list Retrieve the functions for the specified space or project.
ml function list-revisions Retrieve the function revisions.
ml function update Update the function with the provided patch data.
ml function upload-code Upload the function code.
ml model create Create a model with the defined payload. A model represents a machine learning model asset.
ml model create-revision Create a model revision. The current metadata and content for model_id are taken and a revision is created. You must provide either space_id or project_id.
ml model delete Delete the model with the specified identifier. The command deletes all model revisions. All attachments are also deleted for each revision.
ml model delete-content Delete content for a specific model.
ml model download-content Download the model content.
ml model filtered-download Download the model content that is identified by the defined criteria.
ml model get Retrieve the model with the specified identifier. When a rev query parameter is provided, rev=latest fetches the latest revision. A call with rev={revision_number} fetches the defined revision_number record. You must provide either space_id or project_id.
ml model list Retrieve the models for a specific space or project.
ml model list-attachments Retrieve the content metadata list for the specified model attachments.
ml model list-revisions Retrieve the model revisions.
ml model update Update the model with the provided patch data.
ml model upload-content Upload content for a specific model.
ml model wait Wait until the model upload completes or fails.
ml model-definition create Create a model definition with the specified payload. A model definition represents code that is used to train one or more models.
ml model-definition create-revision Create a model definition revision. The current metadata and content for model_definition_id are taken and a revision is created. You must provide either space_id or project_id.
ml model-definition delete Delete the model definition with the specified identifier. The command deletes all model definition revisions. All attachments are also deleted for each revision.
ml model-definition download-model Download the model definition model. It is possible to retrieve the model for a specific model definition revision.
ml model-definition get Retrieve the model definition with the specified identifier. When a rev query parameter is provided, rev=latest fetches the latest revision. A call with rev={revision_number} fetches the defined revision_number record. You must provide either space_id or project_id.
ml model-definition list Retrieve the model definitions for a specific space or project.
ml model-definition list-revisions Retrieve the model definition revisions.
ml model-definition update Update the model definition with the provided patch data.
ml model-definition upload-model Upload the model definition model. Model definitions for Deep Learning accept compressed files (*.zip) that contain one or more Python files that are organized in any directory structure.
ml pipeline create Create a pipeline with the defined payload. A pipeline represents a hybrid-pipeline as a JSON document, which is used to train one or more models.
ml pipeline create-revision Create a pipeline revision. The current metadata and content for pipeline_id are taken and a revision is created. You must provide either space_id or project_id.
ml pipeline delete Delete the pipeline with the specified identifier. The command deletes all pipeline revisions. All attachments are also deleted for each revision.
ml pipeline get Retrieve the pipeline with the specified identifier. When a rev query parameter is provided, rev=latest fetches the latest revision. A call with rev={revision_number} fetches the defined revision_number record. You must provide either space_id or project_id.
ml pipeline list Retrieve the pipelines for a specified space or project.
ml pipeline list-revisions Retrieve the pipeline revisions.
ml pipeline update Update the pipeline with the provided patch data.
ml training create Create a Watson Machine Learning training.
ml training delete Cancel the specified training and remove it.
ml training get Retrieve the training with the specified identifier. The command supports Web-Socket upgrade.
ml training list Retrieve the list of trainings for a specific space or project.
ml training wait Wait until the training completes, fails, or is canceled.
ml training-definition create Create a training definition with the defined payload. A training definition represents the training metadata that is necessary to start a training job.
ml training-definition create-revision Create a training definition revision. The current metadata and content for training_definition_id are taken and a revision is created. You must provide either space_id or project_id.
ml training-definition delete ml training-definition delete
ml training-definition get Retrieve the training definition with the specified identifier. When a rev query parameter is provided, rev=latest fetches the latest revision. A call with rev={revision_number} fetches the defined revision_number record. You must provide either space_id or project_id.
ml training-definition list Retrieve the training definitions for a specific space or project.
ml training-definition list-revisions Retrieve the training definition revisions.
ml training-definition update Update the training definition with the provided patch data.