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

Hi all,

I have been out of business for a few month now, and upon returning to programming my rasa assistant i came a cross a new issue. When retraining my model it throws the following error:

> Traceback (most recent call last):
>   File "bot.py", line 173, in <module>
>     train_dialogue()
>   File "bot.py", line 117, in train_dialogue
>     validation_split=0.2
>   File "C:\Anaconda3\lib\site-packages\rasa_core\agent.py", line 536, in train
>     **kwargs)
>   File "C:\Anaconda3\lib\site-packages\rasa_core\policies\ensemble.py", line 67, in train
>     policy.train(training_trackers, domain, **kwargs)
>   File "C:\Anaconda3\lib\site-packages\rasa_core\policies\keras_policy.py", line 177, in train
>     **params)
> TypeError: fit() got multiple values for keyword argument 'batch_size'

I have found this error on the forum, but (because of my inexperience in coding) i’m not sure how to fix it.

I’m using this piece of code to train my model (by running “python bot.py train-dialogue”

def train_dialogue(domain_file="./anywhere_domain.yml",
                   model_path="./models/dialogue",
                   training_data_file="./stories.md"):
    agent = Agent(domain_file,
                  policies=[MemoizationPolicy(max_history=3), KerasPolicy(), fallback])

    training_data = agent.load_data(training_data_file)
    agent.train(
            training_data,
			augmentation_factor=50,
            epochs=500,
            batch_size=10,
            validation_split=0.2
    )

    agent.persist(model_path)
    return agent

I’m currently running:

rasa-core                          0.12.3
rasa-core-sdk                      0.12.1
rasa-nlu                           0.13.8

Any tips on how to handle this :pleading_face:?

When using the examples from github, the issue is fixed. I would still like to know what is causing the issue and how to solve it. But for now I can continue :slight_smile: