my code is blow:
def train_core(
domain_file: Text = "domain.yml",
policies_file: Text = "policies.yml",
training_data_file: Text = "data/stories.md",
model_directory: Text = "models",
model_name: Text = "dialogue",
):
policies = core_config.load(policies_file)
agent = Agent(
domain_file,
policies=policies,
)
training_data = agent.load_data(training_data_file)
agent.train(training_data)
model_path = os.path.join(model_directory, "core", model_name)
agent.persist(model_path)
return model_path
i think the code workflow is no problem,but
when it executes agent.train(training_data)
,error message occurs:
Processed trackers: 0it [00:00, ?it/s]Traceback (most recent call last):
File "bot.py", line 89, in <module>
test_agent_and_persist()
File "bot.py", line 76, in test_agent_and_persist
agent.train(training_data, validation_split=0.0)
File "/home/sxx/.conda/envs/rasa/lib/python3.7/site-packages/rasa/core/agent.py", line 668, in train
self.policy_ensemble.train(training_trackers, self.domain, **kwargs)
File "/home/sxx/.conda/envs/rasa/lib/python3.7/site-packages/rasa/core/policies/ensemble.py", line 89, in train
policy.train(training_trackers, domain, **kwargs)
File "/home/sxx/.conda/envs/rasa/lib/python3.7/site-packages/rasa/core/policies/keras_policy.py", line 172, in train
training_data = self.featurize_for_training(training_trackers, domain, **kwargs)
File "/home/sxx/.conda/envs/rasa/lib/python3.7/site-packages/rasa/core/policies/policy.py", line 78, in featurize_for_training
training_data = self.featurizer.featurize_trackers(training_trackers, domain)
File "/home/sxx/.conda/envs/rasa/lib/python3.7/site-packages/rasa/core/featurizers.py", line 384, in featurize_trackers
trackers, domain
File "/home/sxx/.conda/envs/rasa/lib/python3.7/site-packages/rasa/core/featurizers.py", line 584, in training_states_and_actions
for tracker in pbar:
File "/home/sxx/.conda/envs/rasa/lib/python3.7/site-packages/tqdm/_tqdm.py", line 1005, in __iter__
for obj in iterable:
TypeError: 'coroutine' object is not iterable