TypeError: fit() got multiple values for keyword argument 'epochs'

Hello friends, I am Manoj. I am very much new to python and RASA Stack. I am very passionate about learning these. I am following the rasa-demo-pydata18 documentation. When I tried to train the dialogue model with this python code. I attached my stories.md file, domain.yml file and screenshot of the error. Can someone help me in solving this issue. Thanks in Advance.

domain.yml (851 Bytes) stories.md (519 Bytes)

from rasa_core.policies import FallbackPolicy, KerasPolicy, MemoizationPolicy from rasa_core.agent import Agent

# this will catch predictions the model isn’t very certain about # there is a threshold for the NLU predictions as well as the action predictions fallback = FallbackPolicy(fallback_action_name=“utter_unclear”, ** core_threshold=0.2,** ** nlu_threshold=0.6)**

agent = Agent(‘domain.yml’, policies=[MemoizationPolicy(), KerasPolicy(), fallback])

# loading our neatly defined training dialogues training_data = agent.load_data(‘stories.md’)

agent.train( ** training_data,** ** validation_split=0.0,** ** epochs=400** )


I am getting error. TypeError: fit() got multiple values for keyword argument ‘epochs’

Hey @Teluguntla123. I can see that you are using the latest version of the Rasa Core while the example you are using uses an older version of the Rasa Core. We will update the notebook, but until then, I would suggest creating a virtual env and installing the NLU and Core version which are specified in that notebook.

@Juste. Thank you. I will try that. Can you help me how to create a virtual environment?

Python virtualenv User Guide — virtualenv 16.1.0 documentation there are a lot of example online depending on your platform, but basically it’s just a way to install python packages in some isolated way so you can have the latest RASA libs in your system but some older versions in that virtualenv for the notebook.

1 Like