本文主要介绍使用ResponseSelector实现校园招聘FAQ机器人,回答面试流程和面试结果查询的FAQ问题。FAQ机器人功能分为业务无关的功能和业务相关的功能2类。
一.data/nlu.yml文件
与普通意图相比,ResponseSelector训练数据中的意图采用group/intent格式(检索意图)。比如,普通意图intent: greet,而后者intent: faq/notes。如下所示:
version:"3.1"
nlu:
-intent:goodbye
examples:|
-拜拜
-再见
-拜
-退出
-结束
-intent:greet
examples:|
-你好
-您好
-hello
-hi
-喂
-在么
-intent:faq/notes
examples:|
-应聘ACME校园招聘职位的注意事项?
-intent:faq/work_location
examples:|
-校园招聘录取的应届生主要工作地点在哪里?
-intent:faq/max_job_request
examples:|
-最多申请几个职位?
-intent:faq/audit
examples:|
-各阶段审核说明
-intent:faq/write_exam_participate
examples:|
-怎样参加笔试?
-intent:faq/write_exam_location
examples:|
-笔试考试地点如何安排?
-intent:faq/write_exam_again
examples:|
-笔试只安排一次吗?我笔试当天没有参加,是否还有再次笔试的机会?
-intent:faq/write_exam_with-out-offer
examples:|
-如果我没有收到笔试通知,但我很想进入ACME,能否直接进入考场参加考试?
-intent:faq/interview_arrangement
examples:|
-面试什么时候开始?会提前多少天通知面试安排?
-intent:faq/interview_times
examples:|
-一般会安排几次面试?
-intent:faq/interview_from
examples:|
-面试的形式是怎样的?是单独面试还是小组面试?
-intent:faq/interview_clothing
examples:|
-对面试的服装有什么具体的要求?
-intent:faq/interview_paperwork
examples:|
-面试时需要携带什么资料?
-intent:faq/interview_result
examples:|
-如何查询面试结果?
二.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、笔试审核:A服务器托管网CME技术类测试主要针对应聘者的专业技能进行检查和评价。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:greet
steps:
-intent:greet
-action:utter_greet
-story:saygoodbye
steps:
-intent:goodbye
-action:utter_goodbye
四.data/rules.yml文件
定义了规则名”respond to FAQs”,当检索意图是faq时,执行utter_faq,如下所示:
version:"3.1"
rules:
-rule:respondtoFAQs
steps:
-intent:faq
-action:utter_faq
五.domain.yml文件
该文件主要包含intents、responses和actions等信息,如下所示:
version:"3.1"
session_config:
session_expiration_time:60
carry_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:LanguageModelFeaturizer
model_name:"bert"
#model_weights:"bert-base-chinese"
model_weights:"L:/20230713_HuggingFaceModel/20231004_BERT/bert-base-chinese"
-name:"DIETClassifier"
epochs:100
tensorboard_log_directory:./log
learning_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通常使用默认配置,如下所示:
#Thisfilecontainsthedifferentendpointsyourbotcanuse.
#Serverwherethemodelsarepulledfrom.
#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)
#Serverwhichrunsyourcustomactions.
#https://rasa.com/docs/rasa/core/actions/#custom-actions/
action_endpoint:
url:"http://localhost:5055/webhook"
#Trackerstorewhichisusedtostoretheconversations.
#Bydefaulttheconversationsarestoredinmemory.
#https://rasa.com/docs/rasa/api/tracker-stores/
#tracker_store:
#type:redis
#url:
#port:
#db:
#password:
#tracker_store:
#type:mongod
#url:
#db:
#username:
#password:
#Eventbrokerwhichallconversationeventsshouldbestreamedto.
#https://rasa.com/docs/rasa/api/event-brokers/
#event_broker:
#url:localhost
#username:username
#password:password
#queue:queue
八.模型训练和运行Rasa服务器
1.模型训练
rasatrain
2.运行Rasa服务器
rasarun--cors"*"
3.开启http server服务
python-mhttp.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_ConversationSystem20220407_RasaEcosystemRasaBooksRasaInActionrasa_chinese_book_codeChapter04venvScriptspython.exe"D:/ProgramFiles/JetBrains/PyCharm2023.1.3/plugins/python/helpers/pydev/pydevd.py"--multiprocess--qt-support=auto--client127.0.0.1--port38019--fileL:20231106_ConversationSystem20220407_RasaEcosystemRasaBooksRasaInActionrasa_chinese_book_codeChapter04venvLibsite-packagesrasa__main__.pytrainnlu--debug
Connectedtopydevdebugger(build232.9559.58)
2023-11-1023:24:32DEBUGh5py._conv-Creatingconverterfrom7to5
2023-11-1023:24:32DEBUGh5py._conv-Creatingconverterfrom5to7
2023-11-1023:26:17DEBUGrasa.shared.nlu.training_data.loading-Trainingdataformatof'datanlu.yml'is'rasa_yml'.#nul.yml文件(rasa_yml数据格式)
2023-11-1023:26:17DEBUGrasa.shared.nlu.training_data.loading-Trainingdataformatof'dataresponses.yml'is'rasa_yml'.#responses.yml文件(rasa_yml数据格式)
2023-11-1023:26:17DEBUGrasa.shared.nlu.training_data.loading-Trainingdataformatof'datarules.yml'is'unk'.#rules.yml文件(unk数据格式)
2023-11-1023:26:17DEBUGrasa.shared.nlu.training_data.loading-Trainingdataformatof'datastories.yml'is'unk'.#stories.yml文件(unk数据格式)
2023-11-1023:26:33DEBUGrasa.telemetry-Skippingtelemetryreporting:nolicensehashfound.#跳过telemetry报告:找不到许可证哈希。
2023-11-1023:27:24DEBUGrasa.engine.training.graph_trainer-Startingtraining.#开始训练
2023-11-1023:27:24DEBUGrasa.engine.graph-Node'train_JiebaTokenizer0'loading'FingerprintComponent.create'andkwargs:'{}'.#train_JiebaTokenizer0
2023-11-1023:27:24DEBUGrasa.engine.graph-Node'run_JiebaTokenizer0'loading'FingerprintComponent.create'andkwargs:'{}'.#run_JiebaTokenizer0
2023-11-1023:27:24DEBUGrasa.engine.graph-Node'run_LanguageModelFeaturizer1'loading'FingerprintComponent.create'andkwargs:'{}'.#run_LanguageModelFeaturizer1
2023-11-1023:27:24DEBUGrasa.engine.graph-Node'train_DIETClassifier2'loading'FingerprintComponent.create'andkwargs:'{}'.#train_DIETClassifier2
2023-11-1023:27:24DEBUGrasa.engine.graph-Node'train_ResponseSelector3'loading'FingerprintComponent.create'andkwargs:'{}'.#train_ResponseSelector3
2023-11-1023:27:24DEBUGrasa.engine.training.graph_trainer-Runningthetraingraphinfingerprintmode.#在fingerprint模式下运行训练图。
2023-11-1023:27:24DEBUGrasa.engine.runner.dask-Runninggraphwithinputs:{'__importer__':NluDataImporter},targets:NoneandExecutionContext(model_id=None,should_add_diagnostic_data=False,is_finetuning=False,node_name=None).
2023-11-1023:27:24DEBUGrasa.engine.graph-Node'schema_validator'loading'DefaultV1RecipeValidator.create'andkwargs:'{}'.#schema_validator
2023-11-1023:27:24DEBUGrasa.engine.graph-Node'schema_validator'running'DefaultV1RecipeValidator.validate'.#schema_validator
2023-11-1023:27:24DEBUGrasa.shared.nlu.training_data.training_data-Validatingtrainingdata...#验证训练数据...
2023-11-1023:27:24DEBUGrasa.engine.graph-Node'finetuning_validator'loading'FinetuningValidator.create'andkwargs:'{}'.#finetuning_validator
2023-11-1023:27:24DEBUGrasa.engine.graph-Node'finetuning_validator'running'FinetuningValidator.validate'.#finetuning_validator
2023-11-1023:27:24DEBUGrasa.engine.storage.local_model_storage-Resource'finetuning_validator'wasrequestedforwriting.#finetuning_validator
2023-11-1023:27:24DEBUGrasa.engine.storage.local_model_storage-Resource'finetuning_validator'waspersisted.#finetuning_validator
2023-11-1023:27:24DEBUGrasa.engine.graph-Node'nlu_training_data_provider'loading'NLUTrainingDataProvider.create'andkwargs:'{}'.#nlu_training_data_provider
2023-11-1023:27:24DEBUGrasa.engine.graph-Node'nlu_training_data_provider'running'NLUTrainingDataProvider.provide'.#nlu_training_data_provider
2023-11-1023:27:24DEBUGrasa.shared.nlu.training_data.loading-Trainingdataformatof'datanlu.yml'is'rasa_yml'.#nul.yml文件(rasa_yml数据格式)
2023-11-1023:27:25DEBUGrasa.shared.nlu.training_data.loading-Trainingdataformatof'dataresponses.yml'is'rasa_yml'.#responses.yml文件(rasa_yml数据格式)
2023-11-1023:27:25DEBUGrasa.engine.graph-Node'train_JiebaTokenizer0'running'FingerprintComponent.run'.#train_JiebaTokenizer0
2023-11-1023:27:25DEBUGrasa.engine.training.fingerprinting-Calculatedfingerprint_key'963f41cf1cdb9cadc8914a14e070fb8e'forclass'JiebaTokenizer'.#计算类'JiebaTokenizer'的指纹密钥
2023-11-1023:27:25DEBUGrasa.engine.graph-Node'run_JiebaTokenizer0'running'FingerprintComponent.run'.#run_JiebaTokenizer0
2023-11-1023:27:25DEBUGrasa.engine.training.fingerprinting-Calculatedfingerprint_key'ae36d2dae4cc78840b153d44fee8f81a'forclass'JiebaTokenizer'.#计算类'JiebaTokenizer'的指纹密钥
2023-11-1023:27:25DEBUGrasa.engine.graph-Node'run_LanguageModelFeaturizer1'running'FingerprintComponent.run'.#run_LanguageModelFeaturizer1
2023-11-1023:27:25DEBUGrasa.engine.training.fingerprinting-Calculatedfingerprint_key'f2bfce545dd2c1c12fb895b075954315'forcl服务器托管网ass'LanguageModelFeaturizer'.#计算类'LanguageModelFeaturizer'的指纹密钥
2023-11-1023:27:25DEBUGrasa.engine.graph-Node'train_DIETClassifier2'running'FingerprintComponent.run'.#train_DIETClassifier2
2023-11-1023:27:25DEBUGrasa.engine.training.fingerprinting-Calculatedfingerprint_key'1d3616cf6980e5f0f38aa9ceb51f1e7a'forclass'DIETClassifier'.#计算类'DIETClassifier'的指纹密钥
2023-11-1023:27:25DEBUGrasa.engine.graph-Node'train_ResponseSelector3'running'FingerprintComponent.run'.#train_ResponseSelector3
2023-11-1023:27:25DEBUGrasa.engine.training.fingerprinting-Calculatedfingerprint_key'b91434757a05a4178cdc7f7882cfd9aa'forclass'ResponseSelector'.#计算类'ResponseSelector'的指纹密钥
2023-11-1023:27:25DEBUGrasa.engine.training.graph_trainer-Runningtheprunedtraingraphwithrealnodeexecution.#使用真实节点执行修剪的训练图。
2023-11-1023:27:25DEBUGrasa.engine.runner.dask-Runninggraphwithinputs:{'__importer__':NluDataImporter},targets:NoneandExecutionContext(model_id=None,should_add_diagnostic_data=False,is_finetuning=False,node_name=None).
2023-11-1023:27:25DEBUGrasa.engine.graph-Hook'LoggingHook.on_before_node'runningfornode'nlu_training_data_provider'.#nlu_training_data_provider
2023-11-1023:27:25DEBUGrasa.engine.graph-Hook'TrainingHook.on_before_node'runningfornode'nlu_training_data_provider'.#nlu_training_data_provider
2023-11-1023:27:25DEBUGrasa.engine.training.fingerprinting-Calculatedfingerprint_key'1fbfa24243412736ce1002efbeba382f'forclass'NLUTrainingDataProvider'.#计算类'NLUTrainingDataProvider'的指纹密钥
2023-11-1023:27:25DEBUGrasa.engine.graph-Node'nlu_training_data_provider'loading'PrecomputedValueProvider.create'andkwargs:'{}'.#nlu_training_data_provider
2023-11-1023:27:25DEBUGrasa.engine.graph-Node'nlu_training_data_provider'running'PrecomputedValueProvider.get_value'.#nlu_training_data_provider
2023-11-1023:27:25DEBUGrasa.engine.graph-Hook'LoggingHook.on_after_node'runningfornode'nlu_training_data_provider'.#nlu_training_data_provider
2023-11-1023:27:25DEBUGrasa.engine.graph-Hook'TrainingHook.on_after_node'runningfornode'nlu_training_data_provider'.#nlu_training_data_provider
2023-11-1023:27:25DEBUGrasa.engine.graph-Hook'LoggingHook.on_before_node'runningfornode'train_JiebaTokenizer0'.#train_JiebaTokenizer0
2023-11-1023:27:25INFOrasa.engine.training.hooks-Startingtotraincomponent'JiebaTokenizer'.#开始训练组件'JiebaTokenizer'。
2023-11-1023:27:25DEBUGrasa.engine.graph-Hook'TrainingHook.on_before_node'runningfornode'train_JiebaTokenizer0'.#train_JiebaTokenizer0
2023-11-1023:27:25DEBUGrasa.engine.training.fingerprinting-Calculatedfingerprint_key'963f41cf1cdb9cadc8914a14e070fb8e'forclass'JiebaTokenizer'.#计算类'JiebaTokenizer'的指纹密钥
2023-11-1023:27:25DEBUGrasa.engine.graph-Node'train_JiebaTokenizer0'loading'JiebaTokenizer.create'andkwargs:'{}'.#train_JiebaTokenizer0
2023-11-1023:27:25DEBUGrasa.engine.graph-Node'train_JiebaTokenizer0'running'JiebaTokenizer.train'.#train_JiebaTokenizer0
2023-11-1023:27:25DEBUGrasa.engine.graph-Hook'LoggingHook.on_after_node'runningfornode'train_JiebaTokenizer0'.#train_JiebaTokenizer0
2023-11-1023:27:25INFOrasa.engine.training.hooks-Finishedtrainingcomponent'JiebaTokenizer'.#完成训练组件'JiebaTokenizer'。
2023-11-1023:27:25DEBUGrasa.engine.graph-Hook'TrainingHook.on_after_node'runningfornode'train_JiebaTokenizer0'.#train_JiebaTokenizer0
2023-11-1023:27:25DEBUGrasa.engine.training.hooks-Caching'Resource'withfingerprint_key:'963f41cf1cdb9cadc8914a14e070fb8e'andoutput_fingerprint'141a681b80024953b9b7865284b9fece'.
2023-11-1023:27:25DEBUGrasa.engine.storage.local_model_storage-Resource'train_JiebaTokenizer0'wasrequestedforreading.#train_JiebaTokenizer0
2023-11-1023:27:25DEBUGrasa.engine.storage.resource-Skippedcachingresource'train_JiebaTokenizer0'asnopersisteddatawasfound.#跳过缓存资源'train_JiebaTokenizer0',因为找不到持久化数据。
2023-11-1023:27:25DEBUGrasa.engine.caching-Cachingoutputoftype'Resource'succeeded.#缓存类型为'Resource'的输出成功。
2023-11-1023:27:26DEBUGrasa.engine.graph-Hook'LoggingHook.on_before_node'runningfornode'run_JiebaTokenizer0'.#run_JiebaTokenizer0
2023-11-1023:27:26DEBUGrasa.engine.graph-Hook'TrainingHook.on_before_node'runningfornode'run_JiebaTokenizer0'.#run_JiebaTokenizer0
2023-11-1023:27:26DEBUGrasa.engine.training.fingerprinting-Calculatedfingerprint_key'496a8741f1dfb458bbfedb535d343623'forclass'JiebaTokenizer'.#计算类'JiebaTokenizer'的指纹密钥
2023-11-1023:27:26DEBUGrasa.engine.graph-Node'run_JiebaTokenizer0'loading'JiebaTokenizer.load'andkwargs:'{'resource':Resource(name='train_JiebaTokenizer0',output_fingerprint='141a681b80024953b9b7865284b9fece')}'.
2023-11-1023:27:26DEBUGrasa.engine.graph-Node'run_JiebaTokenizer0'running'JiebaTokenizer.process_training_data'.#run_JiebaTokenizer0
#jieba分词
Buildingprefixdictfromthedefaultdictionary...
2023-11-1023:27:26DEBUGjieba-Buildingprefixdictfromthedefaultdictionary...
LoadingmodelfromcacheC:UsersADMINI~1AppDataLocalTempjieba.cache
2023-11-1023:27:26DEBUGjieba-LoadingmodelfromcacheC:UsersADMINI~1AppDataLocalTempjieba.cache
Loadingmodelcost1.116seconds.
2023-11-1023:27:27DEBUGjieba-Loadingmodelcost1.116seconds.
Prefixdicthasbeenbuiltsuccessfully.
2023-11-1023:27:27DEBUGjieba-Prefixdicthasbeenbuiltsuccessfully.
2023-11-1023:27:27DEBUGrasa.engine.graph-Hook'LoggingHook.on_after_node'runningfornode'run_JiebaTokenizer0'.
2023-11-1023:27:27DEBUGrasa.engine.graph-Hook'TrainingHook.on_after_node'runningfornode'run_JiebaTokenizer0'.
2023-11-1023:27:27DEBUGrasa.engine.training.hooks-Caching'TrainingData'withfingerprint_key:'496a8741f1dfb458bbfedb535d343623'andoutput_fingerprint'1baa8435dc0351e013e3b8f3635e83d6'.
2023-11-1023:27:27DEBUGrasa.engine.graph-Hook'LoggingHook.on_before_node'runningfornode'run_LanguageModelFeaturizer1'.
2023-11-1023:27:27DEBUGrasa.engine.graph-Hook'TrainingHook.on_before_node'runningfornode'run_LanguageModelFeaturizer1'.
2023-11-1023:27:27DEBUGrasa.engine.training.fingerprinting-Calculatedfingerprint_key'de5a4adf999a20fb8e5716903003508c'forclass'LanguageModelFeaturizer'.
2023-11-1023:27:27DEBUGrasa.engine.graph-Node'run_LanguageModelFeaturizer1'loading'LanguageModelFeaturizer.load'andkwargs:'{}'.
2023-11-1023:27:28DEBUGrasa.nlu.featurizers.dense_featurizer.lm_featurizer-LoadingTokenizerandModelforbert
2023-11-1023:27:32DEBUGrasa.engine.graph-Node'run_LanguageModelFeaturizer1'running'LanguageModelFeaturizer.process_training_data'.
2023-11-1023:27:41DEBUGrasa.engine.graph-Hook'LoggingHook.on_after_node'runningfornode'run_LanguageModelFeaturizer1'.
2023-11-1023:27:41DEBUGrasa.engine.graph-Hook'TrainingHook.on_after_node'runningfornode'run_LanguageModelFeaturizer1'.
2023-11-1023:27:41DEBUGrasa.engine.training.hooks-Caching'TrainingData'withfingerprint_key:'de5a4adf999a20fb8e5716903003508c'andoutput_fingerprint'1192d8329eb2a6d87f6e965765d10871'.
2023-11-1023:27:41DEBUGrasa.engine.graph-Hook'LoggingHook.on_before_node'runningfornode'train_DIETClassifier2'.
2023-11-1023:27:41INFOrasa.engine.training.hooks-Startingtotraincomponent'DIETClassifier'.
2023-11-1023:27:41DEBUGrasa.engine.graph-Hook'TrainingHook.on_before_node'runningfornode'train_DIETClassifier2'.
2023-11-1023:27:41DEBUGrasa.engine.training.fingerprinting-Calculatedfingerprint_key'7d66b69a551ffbc2a45237a02ffc5aa7'forclass'DIETClassifier'.
2023-11-1023:27:41DEBUGrasa.engine.graph-Node'train_DIETClassifier2'loading'DIETClassifier.create'andkwargs:'{}'.
2023-11-1023:27:41DEBUGrasa.engine.graph-Node'train_DIETClassifier2'running'DIETClassifier.train'.
2023-11-1023:27:41DEBUGrasa.nlu.classifiers.diet_classifier-Nolabelfeaturesfound.Computingdefaultlabelfeatures.
2023-11-1023:27:41DEBUGrasa.nlu.classifiers.diet_classifier-Youspecified'DIET'totrainentities,butnoentitiesarepresentinthetrainingdata.Skippingtrainingofentities.
2023-11-1023:27:42DEBUGrasa.nlu.classifiers.diet_classifier-Followingmetricswillbeloggedduringtraining:
2023-11-1023:27:42DEBUGrasa.nlu.classifiers.diet_classifier-t_loss(totalloss)
2023-11-1023:27:42DEBUGrasa.nlu.classifiers.diet_classifier-i_acc(intentacc)
2023-11-1023:27:42DEBUGrasa.nlu.classifiers.diet_classifier-i_loss(intentloss)
2023-11-1023:27:42DEBUGrasa.utils.tensorflow.data_generator-Theprovidedbatchsizeisalist,thisdatageneratorwillusealinearincreasingbatchsize.
Epochs:0%||0/100[00:00,?it/s]
Epochs:100%|██████████|100/100[01:262023-11-1023:29:09DEBUGrasa.engine.storage.local_model_storage-Resource'train_DIETClassifier2'wasrequestedforwriting.
2023-11-1023:29:09DEBUGrasa.engine.storage.local_model_storage-Resource'train_DIETClassifier2'waspersisted.
2023-11-1023:29:09DEBUGrasa.engine.graph-Hook'LoggingHook.on_after_node'runningfornode'train_DIETClassifier2'.
2023-11-1023:29:09INFOrasa.engine.training.hooks-Finishedtrainingcomponent'DIETClassifier'.
2023-11-1023:29:09DEBUGrasa.engine.graph-Hook'TrainingHook.on_after_node'runningfornode'train_DIETClassifier2'.
2023-11-1023:29:09DEBUGrasa.engine.training.hooks-Caching'Resource'withfingerprint_key:'7d66b69a551ffbc2a45237a02ffc5aa7'andoutput_fingerprint'9a50714386a54eebbd0b5eb4ab2fd23c'.
2023-11-1023:29:09DEBUGrasa.engine.storage.local_model_storage-Resource'train_DIETClassifier2'wasrequestedforreading.
2023-11-1023:29:09DEBUGrasa.engine.caching-Cachingoutputoftype'Resource'succeeded.
2023-11-1023:29:11DEBUGrasa.engine.graph-Hook'LoggingHook.on_before_node'runningfornode'train_ResponseSelector3'.
2023-11-1023:29:11INFOrasa.engine.training.hooks-Startingtotraincomponent'ResponseSelector'.
2023-11-1023:29:11DEBUGrasa.engine.graph-Hook'TrainingHook.on_before_node'runningfornode'train_ResponseSelector3'.
2023-11-1023:29:11DEBUGrasa.engine.training.fingerprinting-Calculatedfingerprint_key'0e102b0ba0b459b1556ae9eb4aaac987'forclass'ResponseSelector'.
2023-11-1023:29:11DEBUGrasa.engine.graph-Node'train_ResponseSelector3'loading'ResponseSelector.create'andkwargs:'{}'.
2023-11-1023:29:11DEBUGrasa.engine.graph-Node'train_ResponseSelector3'running'ResponseSelector.train'.
2023-11-1023:29:11INFOrasa.nlu.selectors.response_selector-Retrievalintentparameterwaslefttoitsdefaultvalue.Thisresponseselectorwillbetrainedontrainingexamplescombiningallretrievalintents.
2023-11-1023:29:11DEBUGrasa.nlu.classifiers.diet_classifier-Nolabelfeaturesfound.Computingdefaultlabelfeatures.
2023-11-1023:29:11DEBUGrasa.nlu.selectors.response_selector-Followingmetricswillbeloggedduringtraining:
2023-11-1023:29:11DEBUGrasa.nlu.selectors.response_selector-t_loss(totalloss)
2023-11-1023:29:11DEBUGrasa.nlu.selectors.response_selector-r_acc(responseacc)
2023-11-1023:29:11DEBUGrasa.nlu.selectors.response_selector-r_loss(responseloss)
2023-11-1023:29:11DEBUGrasa.utils.tensorflow.data_generator-Theprovidedbatchsizeisalist,thisdatageneratorwillusealinearincreasingbatchsize.
Epochs:100%|██████████|300/300[00:392023-11-1023:29:51DEBUGrasa.engine.storage.local_model_storage-Resource'train_ResponseSelector3'wasrequestedforwriting.
2023-11-1023:29:51DEBUGrasa.engine.storage.local_model_storage-Resource'train_ResponseSelector3'waspersisted.
2023-11-1023:29:51DEBUGrasa.engine.storage.local_model_storage-Resource'train_ResponseSelector3'wasrequestedforwriting.
2023-11-1023:29:51DEBUGrasa.engine.storage.local_model_storage-Resource'train_ResponseSelector3'waspersisted.
2023-11-1023:29:51DEBUGrasa.engine.graph-Hook'LoggingHook.on_after_node'runningfornode'train_ResponseSelector3'.
2023-11-1023:29:51INFOrasa.engine.training.hooks-Finishedtrainingcomponent'ResponseSelector'.
2023-11-1023:29:51DEBUGrasa.engine.graph-Hook'TrainingHook.on_after_node'runningfornode'train_ResponseSelector3'.
2023-11-1023:29:51DEBUGrasa.engine.training.hooks-Caching'Resource'withfingerprint_key:'0e102b0ba0b459b1556ae9eb4aaac987'andoutput_fingerprint'300fbcfe9f004bf2a6870e283e7b4f92'.
2023-11-1023:29:51DEBUGrasa.engine.storage.local_model_storage-Resource'train_ResponseSelector3'wasrequestedforreading.
2023-11-1023:29:51DEBUGrasa.engine.caching-Cachingoutputoftype'Resource'succeeded.
2023-11-1023:29:51DEBUGrasa.engine.storage.local_model_storage-Starttocreatedmodelpackageforpath'modelsnlu-20231110-232632-arid-seasoning.tar.gz'.
2023-11-1023:29:58DEBUGrasa.engine.storage.local_model_storage-Modelpackagecreatedinpath'modelsnlu-20231110-232632-arid-seasoning.tar.gz'.
YourRasamodelistrainedandsavedat'modelsnlu-20231110-232632-arid-seasoning.tar.gz'.
2023-11-1023:29:58DEBUGrasa.telemetry-Skippingtelemetryreporting:nolicensehashfound.
Processfinishedwithexitcode0
参考文献:
[1]《Rasa实战》
服务器托管,北京服务器托管,服务器租用 http://www.fwqtg.net
机房租用,北京机房租用,IDC机房托管, http://www.fwqtg.net
manacher算法 斯♥哈♥学长的博客https://www.cnblogs.com/luckyblock/p/17044694.html#5140558 为什么老师叫他马拉车算法/yiw 简介 我们都知道,求最长回文子串可以枚举每一个开始的点,然后直接一个…