使用ResponseSelector实现校园招聘FAQ机器人

  本文主要介绍使用ResponseSelector实现校园招聘FAQ机器人,回答面试流程和面试结果查询的FAQ问题。FAQ机器人功能分为业务无关的功能和业务相关的功能2类。

一.data/nlu.yml文件
  与普通意图相比,ResponseSelector训练数据中的意图采用group/intent格式(检索意图)。比如,普通意图intent: greet,而后者intent: faq/notes。如下所示:

version: "3.1"
nlu:- intent: goodbyeexamples: |- 拜拜- 再见- 拜- 退出- 结束- intent: greetexamples: |- 你好- 您好- hello- hi- 喂- 在么- intent: faq/notesexamples: |- 应聘ACME校园招聘职位的注意事项?- intent: faq/work_locationexamples: |- 校园招聘录取的应届生主要工作地点在哪里?- intent: faq/max_job_requestexamples: |- 最多申请几个职位?- intent: faq/auditexamples: |- 各阶段审核说明- intent: faq/write_exam_participateexamples: |- 怎样参加笔试?- intent: faq/write_exam_locationexamples: |- 笔试考试地点如何安排?- intent: faq/write_exam_againexamples: |- 笔试只安排一次吗?我笔试当天没有参加,是否还有再次笔试的机会?- intent: faq/write_exam_with-out-offerexamples: |- 如果我没有收到笔试通知,但我很想进入ACME,能否直接进入考场参加考试?- intent: faq/interview_arrangementexamples: |- 面试什么时候开始?会提前多少天通知面试安排?- intent: faq/interview_timesexamples: |- 一般会安排几次面试?- intent: faq/interview_fromexamples: |- 面试的形式是怎样的?是单独面试还是小组面试?- intent: faq/interview_clothingexamples: |- 对面试的服装有什么具体的要求?- intent: faq/interview_paperworkexamples: |- 面试时需要携带什么资料?- intent: faq/interview_resultexamples: |- 如何查询面试结果?

二.data/responses.yml文件
  主要是根据相关intent来进行相应的response。比如,utter_faq/notes的response对应于意图faq/notes。如下所示:

version: "3.1"
responses:utter_faq/notes:- text: 1、登在校园招聘板块内的职位信息才适用于应届毕业生招聘,请所有的应届毕业生去校园招聘的版块寻找您感兴趣的职位。2、列出的每个职位的要求是该职位的最低要求,为了保证您应聘的成功率,希望您严格按照职位的要求考虑您的选择。3、提交成功后,在招聘结束前,您将不能修改或再次提交简历,因此,请于仔细确认填写信息后提交简历。utter_faq/work_location:- text: 招聘信息中包含各职位的工作地点内容,请参考各职位内容的详细介绍。utter_faq/max_job_request:- text: 对于校园招聘,最多申请2个职位。utter_faq/audit:- text: 1、简历审核:应聘者需要通过ACME网站,填写并提交个人简历,ACME的招聘专员将对收取的简历进行认真的审查和筛选。了解应聘者的情况,并筛选出符合职位要求的简历,同时确认简历记载内容是否属实。2、笔试审核:ACME技术类测试主要针对应聘者的专业技能进行检查和评价。3、面试审核:经过实施评价应聘者基本素质的第一阶段面试和评价专业知识的第二阶段面试,对应聘者是否符合ACME人才理念以及应聘者的工作能力做出客观的综合评价,从而决定是否录用该应聘者。utter_faq/write_exam_participate:- text: 通过简历审核的应聘者,我们将采用短信、e-mail、ACME公告栏以及电话通知的方式告知您utter_faq/write_exam_location:- text: 笔试地点将根据您在简历中填写的学校所在城市进行统筹安排utter_faq/write_exam_again:- text: 校园招聘的大规模的笔试仅安排一次,请收到笔试通知的同学认真对待笔试机会。utter_faq/write_exam_with-out-offer:- text: 由于我们是按照严格的招聘流程筛选出的笔试名单,所以非常抱歉,对于没有收到笔试通知的同学,就不能参加本次校园招聘的笔试。utter_faq/interview_arrangement:- text: 不同的职位面试进度安排不同,除特殊安排外,笔试结束一周左右会安排面试。utter_faq/interview_times:- text: 一般情况下,业务部门和人力资源部会同时或者分别安排一次面试。个别特殊职位需要2次及以上的面试。utter_faq/interview_from:- text: 面试一般以单独面试的形式进行,但根据各公司的面试安排,也会进行小组面试。utter_faq/interview_clothing:- text: 面试着装没有统一要求,但建议您尽量穿着较为正式的职业装参加。utter_faq/interview_paperwork:- text: 面试时,请您携带可以证明您身份的有效证件,有特殊要求的职位请携带好能证明您专业水平的证书原件以及复印件。utter_faq/interview_result:- text: 我们会通过邮件或电话的形式,通知您面试结果。

三.data/stories.yml文件
  story即场景编排,如下所示:

version: "3.1"
stories:- story: greetsteps:- intent: greet- action: utter_greet- story: say goodbyesteps:- intent: goodbye- action: utter_goodbye

四.data/rules.yml文件
  定义了规则名"respond to FAQs",当检索意图是faq时,执行utter_faq,如下所示:

version: "3.1"
rules:- rule: respond to FAQssteps:- intent: faq- action: utter_faq

五.domain.yml文件
  该文件主要包含intents、responses和actions等信息,如下所示:

version: "3.1"session_config:session_expiration_time: 60carry_over_slots_to_new_session: true
intents:- goodbye- greet- faq
responses:utter_greet:- text: 你好,我是 Silly,我是一个基于 Rasa 的 FAQ 机器人utter_goodbye:- text: 再见!utter_default:- text: 系统不明白您说的话
actions:- utter_goodbye- utter_greet- utter_default- utter_faq

六.config.yml文件
  主要是pipeline和policies设置。前者基本思路是分词、特征化、意图识别和实体抽取,后者定义各种策略。特别注意,FAQ机器人需要将ResponseSelector组件加入NLU的流水线,并且还需要启用RulePolicy和设置rule(参考四.data/rules.yml文件)。如下所示:

recipe: default.v1
language: "zh"pipeline:
- name: JiebaTokenizer
- name: LanguageModelFeaturizermodel_name: "bert"
#  model_weights: "bert-base-chinese"model_weights: "L:/20230713_HuggingFaceModel/20231004_BERT/bert-base-chinese"
- name: "DIETClassifier"epochs: 100tensorboard_log_directory: ./loglearning_rate: 0.001
- name: "ResponseSelector"policies:
- name: MemoizationPolicy
- name: TEDPolicy
- name: RulePolicy
assistant_id: 20231109-225257-frayed-branch

七.endpoints.yml文件
  action_endpoint、tracker_store和event_broker通常使用默认配置,如下所示:

# This file contains the different endpoints your bot can use.# Server where the models are pulled from.
# https://rasa.com/docs/rasa/user-guide/running-the-server/#fetching-models-from-a-server/#models:
#  url: http://my-server.com/models/default_core@latest
#  wait_time_between_pulls:  10   # [optional](default: 100)# Server which runs your custom actions.
# https://rasa.com/docs/rasa/core/actions/#custom-actions/action_endpoint:url: "http://localhost:5055/webhook"# Tracker store which is used to store the conversations.
# By default the conversations are stored in memory.
# https://rasa.com/docs/rasa/api/tracker-stores/#tracker_store:
#    type: redis
#    url: <host of the redis instance, e.g. localhost>
#    port: <port of your redis instance, usually 6379>
#    db: <number of your database within redis, e.g. 0>
#    password: <password used for authentication>#tracker_store:
#    type: mongod
#    url: <url to your mongo instance, e.g. mongodb://localhost:27017>
#    db: <name of the db within your mongo instance, e.g. rasa>
#    username: <username used for authentication>
#    password: <password used for authentication># Event broker which all conversation events should be streamed to.
# https://rasa.com/docs/rasa/api/event-brokers/#event_broker:
#  url: localhost
#  username: username
#  password: password
#  queue: queue

八.模型训练和运行Rasa服务器
1.模型训练

rasa train

2.运行Rasa服务器

rasa run --cors "*"

3.开启http server服务

python -m http.server

说明:测试FAQ机器人可以通过Web页面,还可通过命令行rasa shell --debug。

九.PyCharm调试Rasa代码
1.Rasa中的DAG
  Rasa中DAG图节点可能是NLP组件,也可能是Policy组件,本质上都可以抽象为Graph Component。如下所示:

  Rasa会把训练过的Component缓存到磁盘中,当某个Component发生变化的时候,比如CountVectorizer,只会把依赖CountVectorizer的组件(DIETClassifier、TEDPolicy和Policy Ensemble)再训练,而其它的组件不变。如下所示:

2.PyCharm调试Rasa代码
  PyCharm调试Rasa源码也比较方便,主要是设置脚本路径、参数和工作目录,如下所示:

  然后就可以调试训练数据是如何被处理的,DAG是如何被构建的,Component是如何被加载和运行的,最终模型文件是如何被存储的等。Rasa中的fingerprint_key可能是唯一标识的意思。
3.rasa train nlu --debug日志
  通过控制台输出日志,可辅助理解Rasa执行过程,以及源码调试,如下所示:

L:\20231106_ConversationSystem\20220407_RasaEcosystem\RasaBooks\RasaInAction\rasa_chinese_book_code\Chapter04\venv\Scripts\python.exe "D:/Program Files/JetBrains/PyCharm 2023.1.3/plugins/python/helpers/pydev/pydevd.py" --multiprocess --qt-support=auto --client 127.0.0.1 --port 38019 --file L:\20231106_ConversationSystem\20220407_RasaEcosystem\RasaBooks\RasaInAction\rasa_chinese_book_code\Chapter04\venv\Lib\site-packages\rasa\__main__.py train nlu --debug
Connected to pydev debugger (build 232.9559.58)2023-11-10 23:24:32 DEBUG    h5py._conv  - Creating converter from 7 to 5
2023-11-10 23:24:32 DEBUG    h5py._conv  - Creating converter from 5 to 72023-11-10 23:26:17 DEBUG    rasa.shared.nlu.training_data.loading  - Training data format of 'data\nlu.yml' is 'rasa_yml'.  # nul.yml文件(rasa_yml数据格式)
2023-11-10 23:26:17 DEBUG    rasa.shared.nlu.training_data.loading  - Training data format of 'data\responses.yml' is 'rasa_yml'.  # responses.yml文件(rasa_yml数据格式)
2023-11-10 23:26:17 DEBUG    rasa.shared.nlu.training_data.loading  - Training data format of 'data\rules.yml' is 'unk'.  # rules.yml文件(unk数据格式)
2023-11-10 23:26:17 DEBUG    rasa.shared.nlu.training_data.loading  - Training data format of 'data\stories.yml' is 'unk'.  # stories.yml文件(unk数据格式)2023-11-10 23:26:33 DEBUG    rasa.telemetry  - Skipping telemetry reporting: no license hash found.  # 跳过telemetry报告:找不到许可证哈希。
2023-11-10 23:27:24 DEBUG    rasa.engine.training.graph_trainer  - Starting training.  # 开始训练2023-11-10 23:27:24 DEBUG    rasa.engine.graph  - Node 'train_JiebaTokenizer0' loading 'FingerprintComponent.create' and kwargs: '{}'.  # train_JiebaTokenizer0
2023-11-10 23:27:24 DEBUG    rasa.engine.graph  - Node 'run_JiebaTokenizer0' loading 'FingerprintComponent.create' and kwargs: '{}'.  # run_JiebaTokenizer0
2023-11-10 23:27:24 DEBUG    rasa.engine.graph  - Node 'run_LanguageModelFeaturizer1' loading 'FingerprintComponent.create' and kwargs: '{}'.  # run_LanguageModelFeaturizer1
2023-11-10 23:27:24 DEBUG    rasa.engine.graph  - Node 'train_DIETClassifier2' loading 'FingerprintComponent.create' and kwargs: '{}'.  # train_DIETClassifier2
2023-11-10 23:27:24 DEBUG    rasa.engine.graph  - Node 'train_ResponseSelector3' loading 'FingerprintComponent.create' and kwargs: '{}'.  # train_ResponseSelector3
2023-11-10 23:27:24 DEBUG    rasa.engine.training.graph_trainer  - Running the train graph in fingerprint mode.  # 在fingerprint模式下运行训练图。
2023-11-10 23:27:24 DEBUG    rasa.engine.runner.dask  - Running graph with inputs: {'__importer__': NluDataImporter}, targets: None and ExecutionContext(model_id=None, should_add_diagnostic_data=False, is_finetuning=False, node_name=None).
2023-11-10 23:27:24 DEBUG    rasa.engine.graph  - Node 'schema_validator' loading 'DefaultV1RecipeValidator.create' and kwargs: '{}'.  # schema_validator
2023-11-10 23:27:24 DEBUG    rasa.engine.graph  - Node 'schema_validator' running 'DefaultV1RecipeValidator.validate'.  # schema_validator
2023-11-10 23:27:24 DEBUG    rasa.shared.nlu.training_data.training_data  - Validating training data...  # 验证训练数据...
2023-11-10 23:27:24 DEBUG    rasa.engine.graph  - Node 'finetuning_validator' loading 'FinetuningValidator.create' and kwargs: '{}'.  # finetuning_validator
2023-11-10 23:27:24 DEBUG    rasa.engine.graph  - Node 'finetuning_validator' running 'FinetuningValidator.validate'.  # finetuning_validator
2023-11-10 23:27:24 DEBUG    rasa.engine.storage.local_model_storage  - Resource 'finetuning_validator' was requested for writing.  # finetuning_validator
2023-11-10 23:27:24 DEBUG    rasa.engine.storage.local_model_storage  - Resource 'finetuning_validator' was persisted.  # finetuning_validator
2023-11-10 23:27:24 DEBUG    rasa.engine.graph  - Node 'nlu_training_data_provider' loading 'NLUTrainingDataProvider.create' and kwargs: '{}'.  # nlu_training_data_provider
2023-11-10 23:27:24 DEBUG    rasa.engine.graph  - Node 'nlu_training_data_provider' running 'NLUTrainingDataProvider.provide'.  # nlu_training_data_provider
2023-11-10 23:27:24 DEBUG    rasa.shared.nlu.training_data.loading  - Training data format of 'data\nlu.yml' is 'rasa_yml'.  # nul.yml文件(rasa_yml数据格式)
2023-11-10 23:27:25 DEBUG    rasa.shared.nlu.training_data.loading  - Training data format of 'data\responses.yml' is 'rasa_yml'.  # responses.yml文件(rasa_yml数据格式)
2023-11-10 23:27:25 DEBUG    rasa.engine.graph  - Node 'train_JiebaTokenizer0' running 'FingerprintComponent.run'.  # train_JiebaTokenizer0
2023-11-10 23:27:25 DEBUG    rasa.engine.training.fingerprinting  - Calculated fingerprint_key '963f41cf1cdb9cadc8914a14e070fb8e' for class 'JiebaTokenizer'.  # 计算类'JiebaTokenizer'的指纹密钥
2023-11-10 23:27:25 DEBUG    rasa.engine.graph  - Node 'run_JiebaTokenizer0' running 'FingerprintComponent.run'.  # run_JiebaTokenizer0
2023-11-10 23:27:25 DEBUG    rasa.engine.training.fingerprinting  - Calculated fingerprint_key 'ae36d2dae4cc78840b153d44fee8f81a' for class 'JiebaTokenizer'.  # 计算类'JiebaTokenizer'的指纹密钥
2023-11-10 23:27:25 DEBUG    rasa.engine.graph  - Node 'run_LanguageModelFeaturizer1' running 'FingerprintComponent.run'.  # run_LanguageModelFeaturizer1
2023-11-10 23:27:25 DEBUG    rasa.engine.training.fingerprinting  - Calculated fingerprint_key 'f2bfce545dd2c1c12fb895b075954315' for class 'LanguageModelFeaturizer'.  # 计算类'LanguageModelFeaturizer'的指纹密钥
2023-11-10 23:27:25 DEBUG    rasa.engine.graph  - Node 'train_DIETClassifier2' running 'FingerprintComponent.run'.  # train_DIETClassifier2
2023-11-10 23:27:25 DEBUG    rasa.engine.training.fingerprinting  - Calculated fingerprint_key '1d3616cf6980e5f0f38aa9ceb51f1e7a' for class 'DIETClassifier'.  # 计算类'DIETClassifier'的指纹密钥
2023-11-10 23:27:25 DEBUG    rasa.engine.graph  - Node 'train_ResponseSelector3' running 'FingerprintComponent.run'.  # train_ResponseSelector3
2023-11-10 23:27:25 DEBUG    rasa.engine.training.fingerprinting  - Calculated fingerprint_key 'b91434757a05a4178cdc7f7882cfd9aa' for class 'ResponseSelector'.  # 计算类'ResponseSelector'的指纹密钥
2023-11-10 23:27:25 DEBUG    rasa.engine.training.graph_trainer  - Running the pruned train graph with real node execution.  # 使用真实节点执行修剪的训练图。
2023-11-10 23:27:25 DEBUG    rasa.engine.runner.dask  - Running graph with inputs: {'__importer__': NluDataImporter}, targets: None and ExecutionContext(model_id=None, should_add_diagnostic_data=False, is_finetuning=False, node_name=None).
2023-11-10 23:27:25 DEBUG    rasa.engine.graph  - Hook 'LoggingHook.on_before_node' running for node 'nlu_training_data_provider'.  # nlu_training_data_provider
2023-11-10 23:27:25 DEBUG    rasa.engine.graph  - Hook 'TrainingHook.on_before_node' running for node 'nlu_training_data_provider'.  # nlu_training_data_provider
2023-11-10 23:27:25 DEBUG    rasa.engine.training.fingerprinting  - Calculated fingerprint_key '1fbfa24243412736ce1002efbeba382f' for class 'NLUTrainingDataProvider'.  # 计算类'NLUTrainingDataProvider'的指纹密钥
2023-11-10 23:27:25 DEBUG    rasa.engine.graph  - Node 'nlu_training_data_provider' loading 'PrecomputedValueProvider.create' and kwargs: '{}'.  # nlu_training_data_provider
2023-11-10 23:27:25 DEBUG    rasa.engine.graph  - Node 'nlu_training_data_provider' running 'PrecomputedValueProvider.get_value'.  # nlu_training_data_provider
2023-11-10 23:27:25 DEBUG    rasa.engine.graph  - Hook 'LoggingHook.on_after_node' running for node 'nlu_training_data_provider'.  # nlu_training_data_provider
2023-11-10 23:27:25 DEBUG    rasa.engine.graph  - Hook 'TrainingHook.on_after_node' running for node 'nlu_training_data_provider'.  # nlu_training_data_provider
2023-11-10 23:27:25 DEBUG    rasa.engine.graph  - Hook 'LoggingHook.on_before_node' running for node 'train_JiebaTokenizer0'.  # train_JiebaTokenizer0
2023-11-10 23:27:25 INFO     rasa.engine.training.hooks  - Starting to train component 'JiebaTokenizer'.  # 开始训练组件'JiebaTokenizer'。
2023-11-10 23:27:25 DEBUG    rasa.engine.graph  - Hook 'TrainingHook.on_before_node' running for node 'train_JiebaTokenizer0'.  # train_JiebaTokenizer0
2023-11-10 23:27:25 DEBUG    rasa.engine.training.fingerprinting  - Calculated fingerprint_key '963f41cf1cdb9cadc8914a14e070fb8e' for class 'JiebaTokenizer'.  # 计算类'JiebaTokenizer'的指纹密钥
2023-11-10 23:27:25 DEBUG    rasa.engine.graph  - Node 'train_JiebaTokenizer0' loading 'JiebaTokenizer.create' and kwargs: '{}'.  # train_JiebaTokenizer0
2023-11-10 23:27:25 DEBUG    rasa.engine.graph  - Node 'train_JiebaTokenizer0' running 'JiebaTokenizer.train'.  # train_JiebaTokenizer0
2023-11-10 23:27:25 DEBUG    rasa.engine.graph  - Hook 'LoggingHook.on_after_node' running for node 'train_JiebaTokenizer0'.  # train_JiebaTokenizer0
2023-11-10 23:27:25 INFO     rasa.engine.training.hooks  - Finished training component 'JiebaTokenizer'.  # 完成训练组件'JiebaTokenizer'。
2023-11-10 23:27:25 DEBUG    rasa.engine.graph  - Hook 'TrainingHook.on_after_node' running for node 'train_JiebaTokenizer0'.  # train_JiebaTokenizer0
2023-11-10 23:27:25 DEBUG    rasa.engine.training.hooks  - Caching 'Resource' with fingerprint_key: '963f41cf1cdb9cadc8914a14e070fb8e' and output_fingerprint '141a681b80024953b9b7865284b9fece'.
2023-11-10 23:27:25 DEBUG    rasa.engine.storage.local_model_storage  - Resource 'train_JiebaTokenizer0' was requested for reading.  # train_JiebaTokenizer0
2023-11-10 23:27:25 DEBUG    rasa.engine.storage.resource  - Skipped caching resource 'train_JiebaTokenizer0' as no persisted data was found.  # 跳过缓存资源'train_JiebaTokenizer0',因为找不到持久化数据。
2023-11-10 23:27:25 DEBUG    rasa.engine.caching  - Caching output of type 'Resource' succeeded.  # 缓存类型为'Resource'的输出成功。
2023-11-10 23:27:26 DEBUG    rasa.engine.graph  - Hook 'LoggingHook.on_before_node' running for node 'run_JiebaTokenizer0'.  # run_JiebaTokenizer0
2023-11-10 23:27:26 DEBUG    rasa.engine.graph  - Hook 'TrainingHook.on_before_node' running for node 'run_JiebaTokenizer0'.  # run_JiebaTokenizer0
2023-11-10 23:27:26 DEBUG    rasa.engine.training.fingerprinting  - Calculated fingerprint_key '496a8741f1dfb458bbfedb535d343623' for class 'JiebaTokenizer'.  # 计算类'JiebaTokenizer'的指纹密钥
2023-11-10 23:27:26 DEBUG    rasa.engine.graph  - Node 'run_JiebaTokenizer0' loading 'JiebaTokenizer.load' and kwargs: '{'resource': Resource(name='train_JiebaTokenizer0', output_fingerprint='141a681b80024953b9b7865284b9fece')}'.
2023-11-10 23:27:26 DEBUG    rasa.engine.graph  - Node 'run_JiebaTokenizer0' running 'JiebaTokenizer.process_training_data'.  # run_JiebaTokenizer0# jieba分词
Building prefix dict from the default dictionary ...
2023-11-10 23:27:26 DEBUG    jieba  - Building prefix dict from the default dictionary ...
Loading model from cache C:\Users\ADMINI~1\AppData\Local\Temp\jieba.cache
2023-11-10 23:27:26 DEBUG    jieba  - Loading model from cache C:\Users\ADMINI~1\AppData\Local\Temp\jieba.cache
Loading model cost 1.116 seconds.
2023-11-10 23:27:27 DEBUG    jieba  - Loading model cost 1.116 seconds.
Prefix dict has been built successfully.
2023-11-10 23:27:27 DEBUG    jieba  - Prefix dict has been built successfully.2023-11-10 23:27:27 DEBUG    rasa.engine.graph  - Hook 'LoggingHook.on_after_node' running for node 'run_JiebaTokenizer0'.
2023-11-10 23:27:27 DEBUG    rasa.engine.graph  - Hook 'TrainingHook.on_after_node' running for node 'run_JiebaTokenizer0'.
2023-11-10 23:27:27 DEBUG    rasa.engine.training.hooks  - Caching 'TrainingData' with fingerprint_key: '496a8741f1dfb458bbfedb535d343623' and output_fingerprint '1baa8435dc0351e013e3b8f3635e83d6'.
2023-11-10 23:27:27 DEBUG    rasa.engine.graph  - Hook 'LoggingHook.on_before_node' running for node 'run_LanguageModelFeaturizer1'.
2023-11-10 23:27:27 DEBUG    rasa.engine.graph  - Hook 'TrainingHook.on_before_node' running for node 'run_LanguageModelFeaturizer1'.
2023-11-10 23:27:27 DEBUG    rasa.engine.training.fingerprinting  - Calculated fingerprint_key 'de5a4adf999a20fb8e5716903003508c' for class 'LanguageModelFeaturizer'.
2023-11-10 23:27:27 DEBUG    rasa.engine.graph  - Node 'run_LanguageModelFeaturizer1' loading 'LanguageModelFeaturizer.load' and kwargs: '{}'.
2023-11-10 23:27:28 DEBUG    rasa.nlu.featurizers.dense_featurizer.lm_featurizer  - Loading Tokenizer and Model for bert2023-11-10 23:27:32 DEBUG    rasa.engine.graph  - Node 'run_LanguageModelFeaturizer1' running 'LanguageModelFeaturizer.process_training_data'.
2023-11-10 23:27:41 DEBUG    rasa.engine.graph  - Hook 'LoggingHook.on_after_node' running for node 'run_LanguageModelFeaturizer1'.
2023-11-10 23:27:41 DEBUG    rasa.engine.graph  - Hook 'TrainingHook.on_after_node' running for node 'run_LanguageModelFeaturizer1'.
2023-11-10 23:27:41 DEBUG    rasa.engine.training.hooks  - Caching 'TrainingData' with fingerprint_key: 'de5a4adf999a20fb8e5716903003508c' and output_fingerprint '1192d8329eb2a6d87f6e965765d10871'.
2023-11-10 23:27:41 DEBUG    rasa.engine.graph  - Hook 'LoggingHook.on_before_node' running for node 'train_DIETClassifier2'.
2023-11-10 23:27:41 INFO     rasa.engine.training.hooks  - Starting to train component 'DIETClassifier'.
2023-11-10 23:27:41 DEBUG    rasa.engine.graph  - Hook 'TrainingHook.on_before_node' running for node 'train_DIETClassifier2'.
2023-11-10 23:27:41 DEBUG    rasa.engine.training.fingerprinting  - Calculated fingerprint_key '7d66b69a551ffbc2a45237a02ffc5aa7' for class 'DIETClassifier'.
2023-11-10 23:27:41 DEBUG    rasa.engine.graph  - Node 'train_DIETClassifier2' loading 'DIETClassifier.create' and kwargs: '{}'.2023-11-10 23:27:41 DEBUG    rasa.engine.graph  - Node 'train_DIETClassifier2' running 'DIETClassifier.train'.
2023-11-10 23:27:41 DEBUG    rasa.nlu.classifiers.diet_classifier  - No label features found. Computing default label features.
2023-11-10 23:27:41 DEBUG    rasa.nlu.classifiers.diet_classifier  - You specified 'DIET' to train entities, but no entities are present in the training data. Skipping training of entities.
2023-11-10 23:27:42 DEBUG    rasa.nlu.classifiers.diet_classifier  - Following metrics will be logged during training:
2023-11-10 23:27:42 DEBUG    rasa.nlu.classifiers.diet_classifier  -   t_loss (total loss)
2023-11-10 23:27:42 DEBUG    rasa.nlu.classifiers.diet_classifier  -   i_acc (intent acc)
2023-11-10 23:27:42 DEBUG    rasa.nlu.classifiers.diet_classifier  -   i_loss (intent loss)
2023-11-10 23:27:42 DEBUG    rasa.utils.tensorflow.data_generator  - The provided batch size is a list, this data generator will use a linear increasing batch size.Epochs:   0%|          | 0/100 [00:00<?, ?it/s]
Epochs: 100%|██████████| 100/100 [01:26<00:00,  1.15it/s, t_loss=0.258, i_loss=0.0123, i_acc=1]
2023-11-10 23:29:09 DEBUG    rasa.engine.storage.local_model_storage  - Resource 'train_DIETClassifier2' was requested for writing.
2023-11-10 23:29:09 DEBUG    rasa.engine.storage.local_model_storage  - Resource 'train_DIETClassifier2' was persisted.
2023-11-10 23:29:09 DEBUG    rasa.engine.graph  - Hook 'LoggingHook.on_after_node' running for node 'train_DIETClassifier2'.
2023-11-10 23:29:09 INFO     rasa.engine.training.hooks  - Finished training component 'DIETClassifier'.
2023-11-10 23:29:09 DEBUG    rasa.engine.graph  - Hook 'TrainingHook.on_after_node' running for node 'train_DIETClassifier2'.
2023-11-10 23:29:09 DEBUG    rasa.engine.training.hooks  - Caching 'Resource' with fingerprint_key: '7d66b69a551ffbc2a45237a02ffc5aa7' and output_fingerprint '9a50714386a54eebbd0b5eb4ab2fd23c'.
2023-11-10 23:29:09 DEBUG    rasa.engine.storage.local_model_storage  - Resource 'train_DIETClassifier2' was requested for reading.
2023-11-10 23:29:09 DEBUG    rasa.engine.caching  - Caching output of type 'Resource' succeeded.
2023-11-10 23:29:11 DEBUG    rasa.engine.graph  - Hook 'LoggingHook.on_before_node' running for node 'train_ResponseSelector3'.
2023-11-10 23:29:11 INFO     rasa.engine.training.hooks  - Starting to train component 'ResponseSelector'.
2023-11-10 23:29:11 DEBUG    rasa.engine.graph  - Hook 'TrainingHook.on_before_node' running for node 'train_ResponseSelector3'.
2023-11-10 23:29:11 DEBUG    rasa.engine.training.fingerprinting  - Calculated fingerprint_key '0e102b0ba0b459b1556ae9eb4aaac987' for class 'ResponseSelector'.
2023-11-10 23:29:11 DEBUG    rasa.engine.graph  - Node 'train_ResponseSelector3' loading 'ResponseSelector.create' and kwargs: '{}'.
2023-11-10 23:29:11 DEBUG    rasa.engine.graph  - Node 'train_ResponseSelector3' running 'ResponseSelector.train'.
2023-11-10 23:29:11 INFO     rasa.nlu.selectors.response_selector  - Retrieval intent parameter was left to its default value. This response selector will be trained on training examples combining all retrieval intents.
2023-11-10 23:29:11 DEBUG    rasa.nlu.classifiers.diet_classifier  - No label features found. Computing default label features.
2023-11-10 23:29:11 DEBUG    rasa.nlu.selectors.response_selector  - Following metrics will be logged during training:
2023-11-10 23:29:11 DEBUG    rasa.nlu.selectors.response_selector  -   t_loss (total loss)
2023-11-10 23:29:11 DEBUG    rasa.nlu.selectors.response_selector  -   r_acc (response acc)
2023-11-10 23:29:11 DEBUG    rasa.nlu.selectors.response_selector  -   r_loss (response loss)
2023-11-10 23:29:11 DEBUG    rasa.utils.tensorflow.data_generator  - The provided batch size is a list, this data generator will use a linear increasing batch size.
Epochs: 100%|██████████| 300/300 [00:39<00:00,  7.55it/s, t_loss=2.93, r_loss=1.17, r_acc=1]
2023-11-10 23:29:51 DEBUG    rasa.engine.storage.local_model_storage  - Resource 'train_ResponseSelector3' was requested for writing.
2023-11-10 23:29:51 DEBUG    rasa.engine.storage.local_model_storage  - Resource 'train_ResponseSelector3' was persisted.
2023-11-10 23:29:51 DEBUG    rasa.engine.storage.local_model_storage  - Resource 'train_ResponseSelector3' was requested for writing.
2023-11-10 23:29:51 DEBUG    rasa.engine.storage.local_model_storage  - Resource 'train_ResponseSelector3' was persisted.
2023-11-10 23:29:51 DEBUG    rasa.engine.graph  - Hook 'LoggingHook.on_after_node' running for node 'train_ResponseSelector3'.
2023-11-10 23:29:51 INFO     rasa.engine.training.hooks  - Finished training component 'ResponseSelector'.
2023-11-10 23:29:51 DEBUG    rasa.engine.graph  - Hook 'TrainingHook.on_after_node' running for node 'train_ResponseSelector3'.
2023-11-10 23:29:51 DEBUG    rasa.engine.training.hooks  - Caching 'Resource' with fingerprint_key: '0e102b0ba0b459b1556ae9eb4aaac987' and output_fingerprint '300fbcfe9f004bf2a6870e283e7b4f92'.
2023-11-10 23:29:51 DEBUG    rasa.engine.storage.local_model_storage  - Resource 'train_ResponseSelector3' was requested for reading.
2023-11-10 23:29:51 DEBUG    rasa.engine.caching  - Caching output of type 'Resource' succeeded.
2023-11-10 23:29:51 DEBUG    rasa.engine.storage.local_model_storage  - Start to created model package for path 'models\nlu-20231110-232632-arid-seasoning.tar.gz'.
2023-11-10 23:29:58 DEBUG    rasa.engine.storage.local_model_storage  - Model package created in path 'models\nlu-20231110-232632-arid-seasoning.tar.gz'.
Your Rasa model is trained and saved at 'models\nlu-20231110-232632-arid-seasoning.tar.gz'.
2023-11-10 23:29:58 DEBUG    rasa.telemetry  - Skipping telemetry reporting: no license hash found.Process finished with exit code 0

参考文献:
[1]《Rasa实战》

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/193954.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

消息通讯——MQTT WebHookSpringBoot案例

目录 EMQX WebHook介绍EMQX WebHook是什么EMQX WebHook配置项如何使用EMQX WebHook配置WebHook配置事件推送参数详解 SpringBoot集成Webhook实现客户端断连监控1. 实现前提2. 代码实现接口3. 监听结果 总结 EMQX WebHook介绍 EMQX WebHook是什么 EMQX WebHook 是由 emqx_web_…

使用Postman进行压力测试

1.打开Postman新建测试接口 2.点击右边保存&#xff0c;选择一个文件集合&#xff0c;如果没有就创建&#xff0c;然后保存 就是这个东西&#xff0c;这里不便展示出来&#xff0c;压力测试需要在文件夹里面进行 3.选择要测试的接口&#xff0c;iterations 表示请求发起次数&a…

一个22届被裁前端思想上得转变

距离上篇文章已经过去了三个多月&#xff0c;这个三个月&#xff0c;经历了技术攻坚&#xff0c;然后裁员&#xff0c;退房&#xff0c;回老家&#xff0c;找工作。短短的几个月&#xff0c;就经历社会的一次次毒打&#xff0c;特别是找工作&#xff0c;虽然算上实习我也有两年…

将按键放到输入框内:

如何将将Button放到输入框内&#xff1f; 效果图&#xff1a; 步骤如下&#xff1a; button 外围用template 包裹一层 <template #suffix v-if"row.WorkerRole TPM"> <el-inputtype"text"v-model"row.JobNumber"placeholder"…

电路综合-基于简化实频的集总参数电路匹配1

电路综合-基于简化实频的集总参数电路匹配1 对于分布式参数的匹配方法&#xff0c;我们已经深入探讨并给出了解决方案&#xff1a; 10、电路综合-基于简化实频的宽带匹配电路设计方法 {阻抗匹配其实就是S11电路的匹配&#xff0c;给定需要匹配的阻抗数值去设计微带电路&#…

【数据结构 | 链表】leetcode 2. 两数相加

个人主页&#xff1a;兜里游客棉花糖 欢迎 点赞&#x1f44d; 收藏✨ 留言✉ 加关注&#x1f493;本文由 兜里游客棉花糖 原创 收录于专栏【LeetCode】 原题链接&#xff1a;点击直接跳转到该题目 目录 题目描述解题代码 题目描述 给你两个 非空 的链表&#xff0c;表示两个非…

第十九章绘图

Java绘图类 Graphics 类 Grapics 类是所有图形上下文的抽象基类&#xff0c;它允许应用程序在组件以及闭屏图像上进行绘制。Graphics 类封装了Java 支持的基本绘图操作所需的状态信息&#xff0c;主要包括颜色、字体、画笔、文本、图像等。 Graphics 类提供了绘图常用的…

京东联盟flutter插件使用方法

目录 1.京东联盟官网注册申请步骤略~2.安卓端插件配置&#xff1a;3.IOS端插件配置4.其它配置5.京东OAuth授权 文档地址&#xff1a;https://baiyuliang.blog.csdn.net/article/details/134444104 京东联盟flutter插件地址&#xff1a;https://pub.dev/packages/jdkit 1.京东联…

基于单片机的汽车安全气囊系统故障仿真设计

**单片机设计介绍&#xff0c; 基于单片机微波炉加热箱系统设计 文章目录 一 概要二、功能设计设计思路 三、 软件设计原理图 五、 程序六、 文章目录 一 概要 基于单片机的汽车安全气囊系统的故障检测系统是一种用于检测安全气囊系统故障的智能化设备&#xff0c;通过单片机控…

分类预测 | Matlab实现PSO-BiLSTM粒子群算法优化双向长短期记忆神经网络的数据多输入分类预测

分类预测 | Matlab实现PSO-BiLSTM粒子群算法优化双向长短期记忆神经网络的数据多输入分类预测 目录 分类预测 | Matlab实现PSO-BiLSTM粒子群算法优化双向长短期记忆神经网络的数据多输入分类预测分类效果基本描述程序设计参考资料 分类效果 基本描述 1.Matlab实现PSO-BiLSTM粒子…

最新宝塔反代openai官方API开发接口详细搭建教程,解决502 Bad Gateway问题

一、前言 宝塔反代openai官方API接口详细教程&#xff0c;实现国内使用ChatGPT502 Bad Gateway问题解决&#xff0c; 此方法最简单快捷&#xff0c;没有复杂步骤&#xff0c;不容易出错&#xff0c;即最简单&#xff0c;零代码、零部署的方法。 二、实现前提 一台海外服务器…

数据仓库入门简介

一&#xff0c;数组仓库介绍 数据仓库 &#xff08;英语&#xff1a;Data Warehouse&#xff0c;简称数仓、DW&#xff09;是一个为数据分析而设计的企业级数据管理系统。它旨在 支持企业决策过程中的数据分析和业务智能 。数据仓库的基本原理是将不同来源的数据整合到一个中心…

软件测试/测试开发丨​利用人工智能ChatGPT批量生成测试数据

点此获取更多相关资料 简介 测试数据是指一组专注于为测试服务的数据&#xff0c;既可以作为功能的输入去验证输出&#xff0c;也可以去触发各类异常场景。 测试数据的设计尤为重要&#xff0c;等价类、边界值、正交法等测试用例设计方法都是为了更全面地设计对应的测试数据…

Mac用NTFS文件夹读写NTFS硬盘 NTFS能复制多大的文件

Mac作为一款备受欢迎的计算机操作系统&#xff0c;具备了许多令人惊叹的功能和特性。然而&#xff0c;对于一些Mac用户来说&#xff0c;使用NTFS格式的硬盘可能存在一些疑问。他们可能想知道Mac是否能够读写NTFS格式的硬盘&#xff0c;以及NTFS格式的硬盘是否有文件大小的限制。…

OpenAI暂停新的ChatGPT Plus注册 | OpenAI 的 GPT Builder 创建您的 GPTs

OpenAI DevDay 才过去仅仅一周时间&#xff0c;伴随着开发者大会上发布的一系列重磅升级和新特性&#xff0c;无疑这样的进化速度让广大网友炸锅了&#xff0c;其火热程度可见一斑。 就在四个小时前&#xff0c;OpenAI的CEO Sam Altma突然宣布&#xff0c;ChatGPT Plus账号暂停…

Linux编辑器:vim的简单介绍及使用

目录 1.什么是vim 2.vim的基本概念 3.vim 的基本操作 4. 各模式下的命令集 4.1 正常模式命令集 4.2 末行模式命令集 5.补充 5.1 vim支持多文件编辑 5.2 vim 的配置 1.vim 配置原理 2. 常用简单配置选项&#xff1a; 3. 使用插件 1.什么是vim Vim 是从 vi 发展出…

进阶JAVA篇- Lambda 表达式与 Lambda 表达式的省略规则

目录 1.0 什么是 Lambda 表达式&#xff1f; 1.1 既然跟匿名内部类相关&#xff0c;先来回顾匿名内部类。 1.2 Lambda 表达式与匿名内部类之间的关系。 1.3 函数式接口 1.4 在具体代码中来操作一下 2.0 Lambda 表达式省略规则 1.0 什么是 Lambda 表达式&#xff1f; Lambda 表达…

【腾讯云 HAI域探秘】——自行搭建Stable Diffusion模型服务用于生成AI图片 | 自行搭建ChatGL M26BAI模型服务用于AI对话 | Pytorch2.0 AI框架视频处理

自行搭建Stable Diffusion模型服务用于生成AI图片 一、服务创建 1、服务地址&#xff1a; 高性能应用服务HAI 新品内测 2、等待审核(大概24小时) 二、创建服务 1、新建服务 2、选择AI模型&#xff1a;Stable Diffusion 高性能&#xff0c;效率更快。 3、等待创建(5~8分钟&a…

一文带你深入浅出Web的自动化测试工具Selenium【建议收藏】

文章目录 前言第01节 Selenium概述第02节 安装浏览器驱动&#xff08;以Google为例&#xff09;第03节 定位页面元素1. 打开指定页面2. id 定位3. name 定位4. class 定位5. tag 定位6. xpath 定位7. css 选择器8. link 定位9. 示例 有道翻译 第04节 浏览器控制1. 修改浏览器窗…

【YOLOX简述】

YOLOX的简述 一、 原因1. 背景2. 概念 二、 算法介绍2.1 YOLOX算法结构图&#xff1a;2.2 算法独特点2.3 Focus网络结构2.4 FPN&#xff0c;PAN2.5 BaseConv2.6 SPP2.7 CSPDarknet2.8 YOlO Head 三、预测曲线3.1 曲线 一、 原因 1. 背景 工业的缺陷检测是计算机视觉中不可缺少…