我在运行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)
我们也犯了同样的错误。在我们的例子中,目录还包含隐藏的文件。更准确地说,是一个jupyter笔记本检查点目录
要解决此问题:请确保目录仅包含.csv文件。没有其他(隐藏)文件
github上this comment的学分
相关问题 更多 >
编程相关推荐