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:
- Use case
- Uploading models to Decision Data rules
- Clearing the application cache for natural language processing models
Replace the current topic detection model with an improved model that better addresses your company's business use case.
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.
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.
- In Dev Studio, view the list of Text Analyzer rules in your application by clicking Records > Decision > Text Analyzer.
- Click a Text Analyzer rule instance to edit it.
- 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.
- On the Decision Data rule form, on the Data tab, click Download model.
- In the File controls section, click Upload file, as shown in the following example:
Uploading a model file to a Decision Data rule
- In the Upload file window, select a file from your directory by clicking Choose file.
- Confirm your selection by clicking Upload file.
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.
- In Dev Studio, in the search bar, enter pxClearNLPCache.
Searching for an activity in Dev Studio
- Click the activity name.
- On the Activity rule form, click Actions > Run.
- In the Run Activity window, click Run.
Running an activity in Dev Studio
You updated a text analysis model by uploading a .jar file in a Decision Data rule.