Table of Contents

Article

Tutorial: Uploading JAR files that contain models to Decision Data rules

You can manage machine-learning resources in your application by uploading .jar extension files to Decision Data rules. For example, you can replace a model directly in a Decision Data rule, without the need to create multiple similar Decision Data rules every time you want to update a model.

This tutorial covers the following topics:

  1. Use case
  2. Prerequisites
  3. Uploading models to Decision Data rules
  4. Clearing the application cache for natural language processing models
  5. Conclusions

Use case

Replace the current topic detection model with an improved model that better addresses your company's business use case. 

Prerequisites

Build a machine-learning model for topic detection and export that model to your directory as a .jar file. For more information, see Creating machine-learning topic detection models.

Uploading models to Decision Data rules

To replace models, open a Text Analyzer rule and access the Decision Data rule that contains the categorization analysis model that you want to update.

  1. In Dev Studio, view the list of Text Analyzer rules in your application by clicking Records > Decision > Text Analyzer.
  2. Click a Text Analyzer rule instance to edit it.
  3. On the Select Analysis tab, open a Decision Data rule that contains the model that you want to replace by clicking the Open icon. For example, you can upload a new model file to a Decision Data rule that contains a categorization model.
    Thumbnail

    Open icon

  4. On the Decision Data rule form, on the Data tab, click Download model.
  5. In the File controls section, click Upload file, as shown in the following example:
    Thumbnail

    Uploading a model file to a Decision Data rule

  6. In the Upload file window, select a file from your directory by clicking Choose file.
  7. Confirm your selection by clicking Upload file.

Clearing the application cache for natural language processing models

After uploading the .jar file with the model, run the pxClearNLPCache activity. Running the activity ensures that your application uses the new model immediately during the next run of the Text Analyzer rule that references that model.

  1. In Dev Studio, in the search bar, enter pxClearNLPCache.
    Thumbnail

    Searching for an activity in Dev Studio

  2. Click the activity name.
  3. On the Activity rule form, click Actions > Run.
  4. In the Run Activity window, click Run.
    Thumbnail

    Running an activity in Dev Studio

Conclusions

You updated a text analysis model by uploading a .jar file in a Decision Data rule. 

Published October 12, 2018 — Updated October 31, 2018


100% found this useful

Related Content

Have a question? Get answers now.

Visit the Pega Support Community to ask questions, engage in discussions, and help others.