StatisticsGen无法识别缺少的字段

问题描述

由于某些原因,StatisticsGen无法识别文件中缺少的值。 我期望StatisticsGen能够识别最后一条记录中缺少的字段。 当我使用generate_statistics_from_csv

生成统计信息时
# Loading the Files
input_config = example_gen_pb2.Input(splits=[
    example_gen_pb2.Input.Split(name='train',pattern='train/*'),example_gen_pb2.Input.Split(name='eval',pattern='eval/*')
])

example_gen = CsvexampleGen(
    input_base=_data_root,input_config=input_config)

context.run(example_gen,enable_cache=False)

# Generating Stats
statistics_gen = StatisticsGen(examples=example_gen.outputs['examples'])
context.run(statistics_gen,enable_cache=False)

# Showing the Stats
context.show(statistics_gen.outputs['statistics'])

用于测试的文件

index,inputSurname,label
0,BALLADaraS NATE RAE,0
1,LABRANCHE TRACIE SURIANO,0
2,VENTURES LLC             TIERNAN RE,1
3,CHOU                     ABC,1
4,JENSEN DARREN RANEE,0
5,VANDERMOLEN DEBORA PATRICIA,0
6,ZAMBRANO YANGFANG SESE,0
7,IMAGE LLC                DENTAL,1
8,OFFICE                   S BRUCE             LAW,1
9,

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)