Once I have trained a NLU model using Python (Not with Rasa server, but with individual scripts)
reader = RasaReader() data =reader.read_from_json(js=json_data) # training data loaded as dictionary # this step takes 20~25 secs trainer = Trainer(config._load_from_dict(get_train_config())) # train config loaded from dict interpreter = trainer.train(data) trainer.persist('../bots/rasa_test',fixed_model_name='trainer_model_persist')
and load the model with the following code take again 20~25 secs,
interpreter = Interpreter.load('../bots/rasa_test/trainer_model_persist1') print(interpreter.parse('How are you ?'))
Why is this happening ? Is this expected ?
Also I want to train multiple models and serve them on demand by loading, So I am expecting a shorter load time.
Loading with dict (for training data and config) and loading from file takes the same amount of time and the results are same, so I believe I haven’t done any mistake here. If I am wrong kindly let me know
Is there any other way of loading the models faster and better ? Please let me know!