Browse Source

!11877 dataset: fix serialize problem in GeneratorDataset

From: @ms_yan
Reviewed-by: @pandoublefeng,@heleiwang
Signed-off-by: @pandoublefeng
tags/v1.2.0-rc1
mindspore-ci-bot Gitee 4 years ago
parent
commit
2a7cce39a4
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      mindspore/dataset/engine/datasets.py

+ 2
- 1
mindspore/dataset/engine/datasets.py View File

@@ -214,7 +214,8 @@ class Dataset:
Returns:
str, JSON string of the pipeline.
"""
return json.loads(self.parse_tree().to_json(filename))
ir_tree, _ = self.create_ir_tree()
return json.loads(ir_tree.to_json(filename))

@check_bucket_batch_by_length
def bucket_batch_by_length(self, column_names, bucket_boundaries, bucket_batch_sizes,


Loading…
Cancel
Save