So I’ve just started playing around with the embedding policy. My previous agent was trained on memoization and the keras policies. Now I’ve decided to switch the Keras for the embedding policy but training is taking a lot longer to finish. Is this training policy expected to be much slower than the keras policy? I haven’t really went in depth to understand the architecture of each policy, but before I’d just like to know for now if this behavior is expected. I’m currently running tensorflow on a old rusty cpu but because i have a relatively small dataset, the keras policy would take less than five minutes to train. But now more than an hour and a half have passed and i’m still at 21% with the embedding policy. Is this normal?
@Sam: Found the problem. I still had augmentation_factor set to a rather large value. If I set it to 0 as shown in the GitHub repo, it completes almost instantly.
@akelad: Should augmentation always be 0 for Embedding Policy?
for comparing policy and it takes also a lot of time (0% after 30 minutes, with less than 50 stories).
Edit : I add --augmentation 0 at the end of my compare command, and it’s way quicker but for it’s settign augmentation 0 for both keras and embedding. Is there a way to set the augmentation to 0 only for the embedding policy ?
I’m not sure if it’s a good idea to use Keras and Embedding. I’d probably cross-validate them with different hyperparameters and go with your best model.
i’m not using both of them, I was comparing them using rasa_core.train compare.
But yeah, I could have train compare keras with different parameters, and then embedding, chose the best model from both of them, and compare them using rasa_core.evaluate compare
@huberrom I think you made a good point though. I just realized that your problem also affects using the EmbeddingPolicy with other policies in general. E.g. the memoization policy performs really bad with Embedding policies, since augmentation needs to be 0.
@akelad: Any solution how one can set augmentation to 0 for EmbeddingPolicy, but to something else for MemoizationPolicy?
Currently there isn’t a way to set the augmentation factor for a specific policy. But we’ll probably make it so that augmentation doesn’t get passed onto memoization policies in the future. Because augmentation for those policies can actually be harmful. It’s only really useful for the KerasPolicy
This needs a complete rework of the MemoizationPolicy then, right? Because right now MemoizationPolicy heavily relies on augmentation to work, requiring every story to have at least max_history steps. Is the goal to fix this “issue”? (Which I would love to see )
If I understand correctly your answer @akelad, the memoization doesn’t need augmentation ? So it’s currently fine if I use the embedding policy + memoization + augmentation flag to 0 ?
Because it looks like it’s not working well for @smn-snkl, are you sure it’s linked with the augmentation ?
@smn-snkl no it doesn’t rely on augmentation, the idea behind the memo policy is that it memorises the stories you’ve written, and not some artificially augmented storries. Keras is the one that relies on augmentation we’re currently working on a PR where the augmented stories will only get passed to the KerasPolicy, so we can avoid Memo policies learning some undesired behaviour.
@huberrom yes that’s totally fine, in fact the embedding policy doesn’t work with augmentation at all
So we’ve been putting off running the embedding policy for a while as we werent able to train it in a reasonable space of time. I now want to adddress this.
On Keras Policy the core training with 500 epoch takse 2 hours. With the Embedding Policy its is at 33 hours.