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.
Deploying Natural Language Processing models in Watson Machine Learning
You can deploy a Natural Language Processing model by using Python functions or Python scripts. Both online and batch deployments are supported.
- The prediction output returned from
<model>.run()is an object of a class specific to the concerned data model's prediction class (for example,watson_nlp.data_model.syntax.SyntaxPrediction). Such objects cannot be serialized into JSON format so the prediction output must be converted to either the Python dictionary type or JSON by using the<prediction output>.to_dict()(recommended) or<prediction output>.to_json()methods. If you don't convert the output, scoring API requests will return an error. - If the
Watson NLPadd-on is installed, you can access the location of pre-trained models in the Python function code by using theLOAD_PATHenvironment variable. - Prediction input payload and prediction response returned from
score()must meet the requirements listed in online scoring and jobs API documentation. - Scoring requests for NLP models may fail with an
Out of Memoryerror reported by the underlying JVM runtime. If this happens, patch the deployment to use a hardware specification with more available memory.
Supported Platforms:
List of platforms supporting the deployment of NLP models:
- x86-64
Supported Software Specifications
List of software specifications supporting the deployment of NLP models:
runtime-22.1-py3.9- Custom software specifications based on
runtime-22.1-py3.9 runtime-22.2-py3.10- Custom software specifications based on
runtime-22.2-py3.10
NLP model deployment examples
For examples, refer to these Jupyter notebooks:
- Car complaint analysis
- Complaint classification
- Deploying a pretrained sentiment model
- Entity extraction on financial complaints
- Financial complaint analysis
Parent topic: Managing predictive deployments