Exception: Passing policy configuration parameters to `agent.train(...)` is not supported anymore.
See original GitHub issueRasa version: 13.3
Python version: 3.6
Operating system (windows, osx, …): Windows 10
Issue: I am keep getting this issue i don’t understand how to configure it manually just like it asks me to, I have tried to configure the rasa policy to resolve this but no effect so far, please help
Content of configuration file (config.yml):
language: "en"
pipeline:
- name: "nlp_spacy"
model: "en"
- name: "tokenizer_spacy"
- name: "ner_crf"
- name: "intent_featurizer_spacy"
- name: "intent_classifier_sklearn"
Content of domain file (domain.yml) (if used & relevant):
intents:
- schedule_meeting
- search_for_meeting
- greet
entities:
- meeting
- time
slots:
size:
type: text
toppings:
type: text
templates:
utter_greet:
- 'Hello, how can I help you?'
- 'Hi, I am here to help.'
utter_ask_meeting_day:
- 'What time would you like me to schedule your meeting?'
utter_ask_meeting_time:
- 'What time would you like me to schedule your meeting?'
utter_get_meeting_time_place:
- 'here are your meetings for today'
actions:
- utter_greet
- utter_ask_meeting_time
- utter_ask_meeting_day
- utter_get_meeting_time_place
- actions.ActionShowMeeting
policies:
- name: KerasPolicy
epochs: 100
max_history: 5
- name: FallbackPolicy
fallback_action_name: 'action_default_fallback'
- name: MemoizationPolicy
max_history: 5
- name: FormPolicy
**Content of dialogue.py **:
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
from rasa_core.agent import Agent
from rasa_core.domain import Domain
from rasa_core.featurizers import MaxHistoryTrackerFeaturizer, BinarySingleStateFeaturizer
from rasa_core.policies.keras_policy import KerasPolicy
from rasa_core.policies.memoization import MemoizationPolicy
if __name__ == '__main__':
logging.basicConfig(level='INFO')
dialog_training_data_file = './data/stories.md'
path_to_model = './models/dialogue'
# domain = Domain()
featurizer = MaxHistoryTrackerFeaturizer(BinarySingleStateFeaturizer(), max_history=5)
agent = Agent('chat_domain.yml', policies=[MemoizationPolicy(max_history=5),
KerasPolicy(featurizer)])
agent.train(
dialog_training_data_file,
augmentation_factor=50,
max_history=2,
epochs=500,
batch_size=10,
validation_split=0.2)
agent.persist(path_to_model)
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Passing policy configuration parameters to `agent.train(...)` is ...
Hi everyone, I am trying to run a notebook similar to this one rasa-workshop-pydata-nyc/rasa-pydatanyc-workshop-executed.ipynb at master ...
Read more >Exception: Passing policy configuration parameters to `agent.train ...
Exception : Passing policy configuration parameters to `agent.train(...)` is not supported anymore.
Read more >Deprecations by version - GitLab Docs
The support for registration tokens and certain runner configuration arguments in the POST method operation on the /api/v4/runners endpoint is deprecated. This ...
Read more >master PDF - Stable Baselines3 Documentation
Note: if you are using a proxy, you need to pass extra params during build and ... Note: Tuple observation spaces are not...
Read more >National Defense Authorization Act for Fiscal Year 2020
Department of Defense-wide policy and military department- specific ... or permanent disabled retirement lists in military adaptive sports programs. Sec.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @HovHak, here
you need to move policy-specific configuration parameters to the policy itself. For example,
epochs
andbatch_size
are only for theKerasPolicy
, so these would be moved by placing them inbasically if you take inspiration from our default configuration, it’s easier to understand what goes where. If you find it easier to just write it in a yaml file and load from there, you should be able to do it like this:
@abhiyushshrestha in your code you are still passing policy configuration parameters to agent.train(), you just have to get rid of them. Where did you find this code? It must be over a year old and very out of date with your Rasa version. I recommend following the tutorial in our docs for instructions on how to use Rasa.