Closed tiwo19 closed 5 years ago
@rasa any help please
What does your train_online.py
file contain?
this is what it contains from future import absolute_import from future import division from future import print_function from future import unicode_literals
import logging
from rasa_core import utils, train, run from rasa_core.training import interactive from rasa_core.interpreter import NaturalLanguageInterpreter
logger = logging.getLogger(name)
def train_agent(interpreter): return train.train_dialogue_model(domain_file="college_bot_domain.yml", stories_file="./data/stories.md", output_path="./models/dialogue", nlu_model_path=interpreter, endpoints="endpoints.yml", max_history=2, kwargs={"batch_size": 50, "epochs": 200, "max_training_samples": 300 })
if name == 'main': utils.configure_colored_logging(loglevel="DEBUG") nlu_model_path = "./models/nlu/default/college_bot" interpreter = NaturalLanguageInterpreter.create(nlu_model_path) agent = train_agent(interpreter) online.serve_agent(agent)
@akelad sorry for my late respond i need help please
Can I ask where you got this code from? The function train_dialogue_model
does not exist. Please take a look at our documentation on how to train a model.
Please ask any further questions you have in our forum
i got the code from a book please is there a new method to do this
Can I ask which book?
If you take a look at the documentation you can find the commands to train a new model. With rasa 1.0, running rasa train
should suffice. Otherwise python -m rasa_core.train ...
Building Chatbots with Python.pdf
On Tue, Jun 4, 2019 at 9:09 AM Akela Drissner-Schmid < notifications@github.com> wrote:
Can I ask which book? If you take a look at the documentation you can find the commands to train a new model. With rasa 1.0, running rasa train should suffice. Otherwise python -m rasa_core.train ...
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/RasaHQ/rasa/issues/3627?email_source=notifications&email_token=AHG4DAS4FEW4TLVKTRSRAVTPYYPLDA5CNFSM4HQFWAF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW3YYFA#issuecomment-498568212, or mute the thread https://github.com/notifications/unsubscribe-auth/AHG4DAUKJVLEYAQYPKKAEODPYYPLDANCNFSM4HQFWAFQ .
Python version: = python3.7
rasa-core 0.14.4 rasa-core-sdk 0.14.0 rasa-nlu 0.15.0
Windows 10 Issue: I get this error when i run python train_online.py WARNING:tensorflow:From C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\training\saver.py:1266: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version. Instructions for updating: Use standard file APIs to check for files with this prefix. 2019-05-28 18:37:01 WARNING tensorflow - From C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\training\saver.py:1266: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version. Instructions for updating: Use standard file APIs to check for files with this prefix. INFO:tensorflow:Restoring parameters from ./models/nlu/default/college_bot\component_5_EmbeddingIntentClassifier.ckpt 2019-05-28 18:37:01 INFO tensorflow - Restoring parameters from ./models/nlu/default/college_bot\component_5_EmbeddingIntentClassifier.ckpt Traceback (most recent call last): File "train_online.py", line 32, in
agent = train_agent(interpreter)
File "train_online.py", line 16, in train_agent
return train.train_dialogue_model(domain_file="college_bot_domain.yml",
AttributeError: 'function' object has no attribute 'train_dialogue_model'
Content of configuration file (config.yml): language: "en"
pipeline: "tensorflow_embedding"
training_data, augmentation_factor=50, epochs=500, batch_size=10, validation_split=0.2 ```yml