你好,我在运行train训练模型中报错,错误如下
2019-07-02 21:30:00 INFO rasa.model - Data (core-config) for Core model changed.
2019-07-02 21:30:00 INFO rasa.model - Data (nlu-config) for NLU model changed.
Training Core model...
Traceback (most recent call last):
File "c:\users\atian\appdata\local\programs\python\python37\lib\site-packages\rasa\core\registry.py", line 20, in policy_from_module_path
return class_from_module_path(module_path, lookup_path="rasa.core.policies")
File "c:\users\atian\appdata\local\programs\python\python37\lib\site-packages\rasa\utils\common.py", line 188, in class_from_module_path
m = importlib.import_module(module_name)
File "c:\users\atian\appdata\local\programs\python\python37\lib\importlib__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 953, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'policy'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\atian\appdata\local\programs\python\python37\lib\site-packages\rasa\core\policies\ensemble.py", line 279, in from_dict
constr_func = registry.policy_from_module_path(policy_name)
File "c:\users\atian\appdata\local\programs\python\python37\lib\site-packages\rasa\core\registry.py", line 22, in policy_from_module_path
raise ImportError("Cannot retrieve policy from path '{}'".format(module_path))
ImportError: Cannot retrieve policy from path 'policy.attention_policy.AttentionPolicy'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\atian\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\users\atian\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\atian\AppData\Local\Programs\Python\Python37\Scripts\rasa.exe__main.py", line 9, in
File "c:\users\atian\appdata\local\programs\python\python37\lib\site-packages\rasa\main__.py", line 70, in main
cmdline_arguments.func(cmdline_arguments)
File "c:\users\atian\appdata\local\programs\python\python37\lib\site-packages\rasa\cli\train.py", line 84, in train
kwargs=extract_additional_arguments(args),
File "c:\users\atian\appdata\local\programs\python\python37\lib\site-packages\rasa\train.py", line 40, in train
kwargs=kwargs,
File "c:\users\atian\appdata\local\programs\python\python37\lib\asyncio\base_events.py", line 584, in run_until_complete
return future.result()
File "c:\users\atian\appdata\local\programs\python\python37\lib\site-packages\rasa\train.py", line 135, in train_async
kwargs=kwargs,
File "c:\users\atian\appdata\local\programs\python\python37\lib\site-packages\rasa\train.py", line 174, in _do_training
kwargs=kwargs,
File "c:\users\atian\appdata\local\programs\python\python37\lib\site-packages\rasa\train.py", line 303, in _train_core_with_validated_data
kwargs=kwargs,
File "c:\users\atian\appdata\local\programs\python\python37\lib\site-packages\rasa\core\train.py", line 36, in train
policies = config.load(policy_config)
File "c:\users\atian\appdata\local\programs\python\python37\lib\site-packages\rasa\core\config.py", line 24, in load
return PolicyEnsemble.from_dict(config_data)
File "c:\users\atian\appdata\local\programs\python\python37\lib\site-packages\rasa\core\policies\ensemble.py", line 287, in from_dict
"".format(policy_name)
rasa.core.policies.ensemble.InvalidPolicyConfig: Module for policy 'policy.attention_policy.AttentionPolicy' could not be loaded. Please make sure the name is a valid policy.
你好,我在运行train训练模型中报错,错误如下 2019-07-02 21:30:00 INFO rasa.model - Data (core-config) for Core model changed. 2019-07-02 21:30:00 INFO rasa.model - Data (nlu-config) for NLU model changed. Training Core model... Traceback (most recent call last): File "c:\users\atian\appdata\local\programs\python\python37\lib\site-packages\rasa\core\registry.py", line 20, in policy_from_module_path return class_from_module_path(module_path, lookup_path="rasa.core.policies") File "c:\users\atian\appdata\local\programs\python\python37\lib\site-packages\rasa\utils\common.py", line 188, in class_from_module_path m = importlib.import_module(module_name) File "c:\users\atian\appdata\local\programs\python\python37\lib\importlib__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 953, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'policy'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "c:\users\atian\appdata\local\programs\python\python37\lib\site-packages\rasa\core\policies\ensemble.py", line 279, in from_dict constr_func = registry.policy_from_module_path(policy_name) File "c:\users\atian\appdata\local\programs\python\python37\lib\site-packages\rasa\core\registry.py", line 22, in policy_from_module_path raise ImportError("Cannot retrieve policy from path '{}'".format(module_path)) ImportError: Cannot retrieve policy from path 'policy.attention_policy.AttentionPolicy'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "c:\users\atian\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "c:\users\atian\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\atian\AppData\Local\Programs\Python\Python37\Scripts\rasa.exe__main.py", line 9, in
File "c:\users\atian\appdata\local\programs\python\python37\lib\site-packages\rasa\ main__.py", line 70, in main
cmdline_arguments.func(cmdline_arguments)
File "c:\users\atian\appdata\local\programs\python\python37\lib\site-packages\rasa\cli\train.py", line 84, in train
kwargs=extract_additional_arguments(args),
File "c:\users\atian\appdata\local\programs\python\python37\lib\site-packages\rasa\train.py", line 40, in train
kwargs=kwargs,
File "c:\users\atian\appdata\local\programs\python\python37\lib\asyncio\base_events.py", line 584, in run_until_complete
return future.result()
File "c:\users\atian\appdata\local\programs\python\python37\lib\site-packages\rasa\train.py", line 135, in train_async
kwargs=kwargs,
File "c:\users\atian\appdata\local\programs\python\python37\lib\site-packages\rasa\train.py", line 174, in _do_training
kwargs=kwargs,
File "c:\users\atian\appdata\local\programs\python\python37\lib\site-packages\rasa\train.py", line 303, in _train_core_with_validated_data
kwargs=kwargs,
File "c:\users\atian\appdata\local\programs\python\python37\lib\site-packages\rasa\core\train.py", line 36, in train
policies = config.load(policy_config)
File "c:\users\atian\appdata\local\programs\python\python37\lib\site-packages\rasa\core\config.py", line 24, in load
return PolicyEnsemble.from_dict(config_data)
File "c:\users\atian\appdata\local\programs\python\python37\lib\site-packages\rasa\core\policies\ensemble.py", line 287, in from_dict
"".format(policy_name)
rasa.core.policies.ensemble.InvalidPolicyConfig: Module for policy 'policy.attention_policy.AttentionPolicy' could not be loaded. Please make sure the name is a valid policy.
应该是Policy加载失败,请问有遇到过么?