提交 6a6a3cf0 编写于 作者: Y yanghaitao

GeneratorDataset column_names support string type

上级 259dedaf
......@@ -2569,6 +2569,8 @@ class GeneratorDataset(SourceDataset):
# Random accessible input is also iterable
self.source = (lambda: _iter_fn(source, num_samples))
if column_names is not None and not isinstance(column_names, list):
column_names = [column_names]
self.column_names = column_names
if column_types is not None:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册