Hello!
In a previous version of RASA, I was able to use the rasa_nlu
pip package (version 0.15.1) in order to train an intent classifier using roughly the following code snippet:
# imports
from rasa_nlu.training_data import load_data
from rasa_nlu.model import Interpreter, Trainer
from rasa_nlu import config
# data loading, training and saving trained model
trainer = Trainer(config.load('config.yaml'))
train_data = load_data('intent-dataset.mdl')
result = trainer.train(train_data, num_threads=32)
model_directory = trainer.persist('project', fixed_model_name='intent-dataset')
# inference
interpreter = Interpreter.load(os.path.join('project', 'default', 'intent-dataset'))
intent_predictions = interpreter.parse('how is the weather today?')
However, once I installed the new pip package version (rasa
version 3.0.8), the code above is no longer working. A similar post on the forums (Intent Classification using NLU) provided code code for loading a trained model and performing inference, however it is not clear to me how to train a model beforehand.
I mention that I was able to perform the initial part with RASA 3.x (config and data loading) using the this code here rasa/importer.py at main · RasaHQ/rasa · GitHub and here rasa/loading.py at main · RasaHQ/rasa · GitHub.
I would like to know if there is any tutorial on how to use RASA 3.x to perform intent classification. Or maybe could someone provide a link to documentation or to the code in the GitHub repository which replaced the functionality of rasa_nlu
?
Thank you!