Set num_threads while training rasa_nlu

I need help setting the num_threads while training the Rasa NLU. By default it using 1 thread for now, but I need to speed up this process. This is my python code for training:

training_data = load_data('./intents.md')
trainer = Trainer(config.load('./config.yml'))
trainer.train(training_data)
model_directory = trainer.persist('./models/', fixed_model_name=model_name)
model_path[model_name] = model_directory
interpreter_dict[model_name] = Interpreter.load(model_directory)

Below is the config.yml file:

language: en

pipeline:
  - name: "CountVectorsFeaturizer"
  - name: "SpacyNLP"
  - name: "SpacyTokenizer"
  - name: "SpacyFeaturizer"
  - name: "EmbeddingIntentClassifier"

policies:
  - name: MemoizationPolicy
  - name: KerasPolicy

Hi @shayan09! That is not currently possible. However, there is an open issue about it here.

It looks like there is some interest from the community to work on it, so I highly recommend encouraging them or picking it up yourself :slight_smile:

1 Like