I’m training my first rasa bot as per instructions in Quickstart. When I run the command: “python -m rasa_core.train -d domain.yml -s stories.md -o models/dialogue” I am getting the error “train.py default: error: the following arguments are required: -c/–config”
@Abir if you know something on this…
you need to train using this command:
python -m rasa_core.train -d domain.yml -s data/stories.md
-o models/dialogue -c default_config.yml
If you are using the training script, you must set the policies you would like the Core model to use in a YAML file i.e your config file.
For example:
policies:
- name: “KerasPolicy”
featurizer:
- name: MaxHistoryTrackerFeaturizer
max_history: 5
state_featurizer:
- name: BinarySingleStateFeaturizer
- name: MaxHistoryTrackerFeaturizer
max_history: 5
state_featurizer:
- name: “MemoizationPolicy” max_history: 5
- name: “FallbackPolicy” nlu_threshold: 0.4 core_threshold: 0.3 fallback_action_name: “my_fallback_action”
- name: “path.to.your.policy.class” arg1: “…”
for more details you can visit this link : Policies
@JiteshGaikwad has clarified it well , should solve your issue
@karandesaiii If you want to train the dialogues manually :
-
Define train_dialogue
def train_dialogue(domain_file=‘domain.yml’, model_path=’./models/dialogue’, training_data_file=’./data/nlu.md’): agent = Agent(domain_file, policies=[MemoizationPolicy(), KerasPolicy()]) data = agent.load_data(training_data_file) agent.train(data, batch_size=50, epochs=300, validation_split=0.2) agent.persist(model_path) return agent
-
Use train_dialogue(). This will create the models/dialogue folder
-
Option 1: run rasta server
Option 2: Train NLU as in Quickstart and then run rasta server
Thanks guys, issue was resolved
while training this command it gives the train.py:error
python -m rasa_nlu.train -c config.json