!2185 Dataset: convert schema to json in serializer

Merge pull request !2185 from kouzhenzhong/wide_deep_dataset_graph
This commit is contained in:
mindspore-ci-bot 2020-06-18 19:16:24 +08:00 committed by Gitee
commit ef698a93db
1 changed files with 3 additions and 0 deletions

View File

@ -156,6 +156,9 @@ def traverse(node):
serialize_operations(node_repr, k, v)
elif k == 'sampler':
serialize_sampler(node_repr, v)
# return schema json str if its type is mindspore.dataset.Schema
elif k == 'schema' and isinstance(v, de.Schema):
node_repr[k] = v.to_json()
elif k in set(['schema', 'dataset_files', 'dataset_dir', 'schema_file_path']):
expand_path(node_repr, k, v)
else: