【发布时间】:2020-07-22 05:55:07
【问题描述】:
我在运行 context.run(example_gen) 时遇到了以下错误,我想了解它的含义以及如何避免出现该错误。请提前建议和感谢!
错误: RuntimeError: Files in same split /home/jupyter/.../data/* have different header.
数据是一个csv,标题为“A,B,C,D”
from tfx.proto import example_gen_pb2
base_dir = '/home/jupyter/.../data/'
#Input has a single split 'input_dir/*
#Output 2 splits: train:eval=3:1.'
output = example_gen_pb2.Output(
split_config=example_gen_pb2.SplitConfig(splits=[
example_gen_pb2.SplitConfig.Split(name='train', hash_buckets=3),
example_gen_pb2.SplitConfig.Split(name='eval', hash_buckets=1)
]))
examples = csv_input(os.path.join(base_dir))
example_gen = CsvExampleGen(input=examples, output_config=output)
【问题讨论】:
标签: python runtime-error tensorflow2.0 tfx