Max history

I use the agent with:

agent = Agent(domain_file, policies = [MemoizationPolicy(max_history=2),KerasPolicy(),fallback])

Can anyone explains why the 5 last states are used altough I set it to 2? See below

Does this mean Keras is using the 5 last states for prediction? That would be good to know.

DEBUG:rasa_core.training.generator:Generated trackers will be deduplicated based on their unique last 5 states.
DEBUG:rasa_core.training.generator:Number of augmentation rounds is 3
DEBUG:rasa_core.training.generator:Starting data generation round 0 ... (with 1 trackers)
Processed Story Blocks: 100%|██████████████████████████████████████████████████████████| 52/52 [00:00<00:00, 330.53it/s, # trackers=1]
DEBUG:rasa_core.training.generator:Finished phase (51 training samples found).
DEBUG:rasa_core.training.generator:Data generation rounds finished.
DEBUG:rasa_core.training.generator:Found 0 unused checkpoints
DEBUG:rasa_core.training.generator:Starting augmentation round 0 ... (with 20 trackers)
Processed Story Blocks: 100%|██████████████████████████████████████████████████████████| 52/52 [00:22<00:00,  2.26it/s, # trackers=20]
DEBUG:rasa_core.training.generator:Finished phase (1075 training samples found).
DEBUG:rasa_core.training.generator:Starting augmentation round 1 ... (with 20 trackers)
Processed Story Blocks: 100%|██████████████████████████████████████████████████████████| 52/52 [00:02<00:00, 25.30it/s, # trackers=15]
DEBUG:rasa_core.training.generator:Finished phase (1851 training samples found).
DEBUG:rasa_core.training.generator:Starting augmentation round 2 ... (with 20 trackers)
Processed Story Blocks: 100%|██████████████████████████████████████████████████████████| 52/52 [00:02<00:00, 19.35it/s, # trackers=19]
DEBUG:rasa_core.training.generator:Finished phase (2822 training samples found).
DEBUG:rasa_core.training.generator:Found 2822 training trackers.
DEBUG:rasa_core.agent:Agent trainer got kwargs: {'epochs': 300, 'batch_size': 50, 'max_training_samples': 1000}
INFO:rasa_core.featurizers:Creating states and action examples from collected trackers (by MaxHistoryTrackerFeaturizer)...
Processed trackers: 100%|████████████████████████████████████████████████████████| 2822/2822 [00:09<00:00, 307.31it/s, # actions=1059]
INFO:rasa_core.featurizers:Created 1059 action examples.
Processed actions: 1059it [00:00, 5967.20it/s, # examples=1002]
INFO:rasa_core.policies.memoization:Memorized 1002 unique action examples.
INFO:rasa_core.featurizers:Creating states and action examples from collected trackers (by MaxHistoryTrackerFeaturizer)...
Processed trackers: 100%|████████████████████████████████████████████████████████| 2822/2822 [00:08<00:00, 329.75it/s, # actions=4347]
INFO:rasa_core.featurizers:Created 4347 action examples.
DEBUG:rasa_core.policies.policy:Limit training data to 1000 training samples.
_________________________________________________________________

So that logger message is only for training data generation, your policies will only train on the history you’ve set it to

@akelad I have a question on Max History. I am trying to use different max history for keras policy. Whatever max history I am trying it gives me the same action output. What is the actual purpose of having max history for keras policy.
I understand featurizer input to keras policy will use this max history. But what difference a policy can make between 3 to 10 input data?
I am seeing this max history is widely used for memoization policy but not for keras policy. Pls help me understand as our system is built only on keras policy and trying to see past history conversation for prediction.

it’s also used for the KerasPolicy. The parameter is used to decide how much of the past conversation to pay attention to. This becomes important when you have longer interactions with your user. you don’t really need to change that unless you notice your bot isn’t able to learn certain behaviours