Home
last modified time | relevance | path

Searched refs:json_obj (Results 1 – 25 of 85) sorted by relevance

1234

/third_party/mindspore/mindspore/ccsrc/minddata/dataset/engine/
Dserdes.cc27 std::map<std::string, Status (*)(nlohmann::json json_obj, std::shared_ptr<TensorOperation> *operati…
87 nlohmann::json json_obj; in Deserialize() local
92 json_in >> json_obj; in Deserialize()
96 RETURN_IF_NOT_OK(ConstructPipeline(json_obj, ds)); in Deserialize()
100 Status Serdes::ConstructPipeline(nlohmann::json json_obj, std::shared_ptr<DatasetNode> *ds) { in ConstructPipeline() argument
101 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("children") != json_obj.end(), "Failed to find children… in ConstructPipeline()
104 if (json_obj["children"].size() == 0) { in ConstructPipeline()
107 RETURN_IF_NOT_OK(CreateNode(nullptr, json_obj, ds)); in ConstructPipeline()
108 } else if (json_obj["children"].size() == 1) { in ConstructPipeline()
111 RETURN_IF_NOT_OK(ConstructPipeline(json_obj["children"][0], &child_ds)); in ConstructPipeline()
[all …]
Dserdes.h167 static Status ConstructPipeline(nlohmann::json json_obj, std::shared_ptr<DatasetNode> *ds);
173 static Status ConstructSampler(nlohmann::json json_obj, std::shared_ptr<SamplerObj> *sampler);
179 …static Status ConstructTensorOps(nlohmann::json json_obj, std::vector<std::shared_ptr<TensorOperat…
201 static Status CreateNode(const std::shared_ptr<DatasetNode> &child_ds, nlohmann::json json_obj,
209 static Status CreateDatasetNode(const nlohmann::json &json_obj, const std::string &op_type,
217 … CreateDatasetOperationNode(const std::shared_ptr<DatasetNode> &ds, const nlohmann::json &json_obj,
222 …static std::map<std::string, Status (*)(nlohmann::json json_obj, std::shared_ptr<TensorOperation> …
226 …static std::map<std::string, Status (*)(nlohmann::json json_obj, std::shared_ptr<TensorOperation> …
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/engine/ir/datasetops/source/samplers/
Ddistributed_sampler_ir.cc111 Status DistributedSamplerObj::from_json(nlohmann::json json_obj, int64_t num_samples, in from_json() argument
113 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("num_shards") != json_obj.end(), "Failed to find num_sh… in from_json()
114 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("shard_id") != json_obj.end(), "Failed to find shard_id… in from_json()
115 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("shuffle") != json_obj.end(), "Failed to find shuffle"); in from_json()
116 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("seed") != json_obj.end(), "Failed to find seed"); in from_json()
117 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("offset") != json_obj.end(), "Failed to find offset"); in from_json()
118 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("even_dist") != json_obj.end(), "Failed to find even_di… in from_json()
119 int64_t num_shards = json_obj["num_shards"]; in from_json()
120 int64_t shard_id = json_obj["shard_id"]; in from_json()
121 bool shuffle = json_obj["shuffle"]; in from_json()
[all …]
Drandom_sampler_ir.cc60 Status RandomSamplerObj::from_json(nlohmann::json json_obj, int64_t num_samples, std::shared_ptr<Sa… in from_json() argument
61 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("replacement") != json_obj.end(), "Failed to find repla… in from_json()
62 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("reshuffle_each_epoch") != json_obj.end(), in from_json()
64 bool replacement = json_obj["replacement"]; in from_json()
65 bool reshuffle_each_epoch = json_obj["reshuffle_each_epoch"]; in from_json()
68 RETURN_IF_NOT_OK(SamplerObj::from_json(json_obj, sampler)); in from_json()
Dweighted_random_sampler_ir.cc67 Status WeightedRandomSamplerObj::from_json(nlohmann::json json_obj, int64_t num_samples, in from_json() argument
69 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("weights") != json_obj.end(), "Failed to find weights"); in from_json()
70 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("replacement") != json_obj.end(), "Failed to find repla… in from_json()
71 std::vector<double> weights = json_obj["weights"]; in from_json()
72 bool replacement = json_obj["replacement"]; in from_json()
75 RETURN_IF_NOT_OK(SamplerObj::from_json(json_obj, sampler)); in from_json()
Dpk_sampler_ir.cc64 Status PKSamplerObj::from_json(nlohmann::json json_obj, int64_t num_samples, std::shared_ptr<Sample… in from_json() argument
65 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("num_val") != json_obj.end(), "Failed to find num_val"); in from_json()
66 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("shuffle") != json_obj.end(), "Failed to find shuffle"); in from_json()
67 int64_t num_val = json_obj["num_val"]; in from_json()
68 bool shuffle = json_obj["shuffle"]; in from_json()
71 RETURN_IF_NOT_OK(SamplerObj::from_json(json_obj, sampler)); in from_json()
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/engine/ir/datasetops/source/
Dimage_folder_node.cc133 Status ImageFolderNode::from_json(nlohmann::json json_obj, std::shared_ptr<DatasetNode> *ds) { in from_json() argument
134 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("num_parallel_workers") != json_obj.end(), in from_json()
136 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("dataset_dir") != json_obj.end(), "Failed to find datas… in from_json()
137 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("decode") != json_obj.end(), "Failed to find decode"); in from_json()
138 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("sampler") != json_obj.end(), "Failed to find sampler"); in from_json()
139 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("recursive") != json_obj.end(), "Failed to find recursi… in from_json()
140 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("extensions") != json_obj.end(), "Failed to find extens… in from_json()
141 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("class_indexing") != json_obj.end(), "Failed to find cl… in from_json()
142 std::string dataset_dir = json_obj["dataset_dir"]; in from_json()
143 bool decode = json_obj["decode"]; in from_json()
[all …]
Dtf_record_node.cc242 Status TFRecordNode::from_json(nlohmann::json json_obj, std::shared_ptr<DatasetNode> *ds) { in from_json() argument
243 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("num_parallel_workers") != json_obj.end(), in from_json()
245 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("dataset_files") != json_obj.end(), "Failed to find dat… in from_json()
246 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("columns_list") != json_obj.end(), "Failed to find colu… in from_json()
247 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("num_samples") != json_obj.end(), "Failed to find num_s… in from_json()
248 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("shuffle") != json_obj.end(), "Failed to find shuffle"); in from_json()
249 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("num_shards") != json_obj.end(), "Failed to find num_sh… in from_json()
250 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("shard_id") != json_obj.end(), "Failed to find shard_id… in from_json()
251 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("shard_equal_rows") != json_obj.end(), "Failed to find … in from_json()
252 std::vector<std::string> dataset_files = json_obj["dataset_files"]; in from_json()
[all …]
Dcsv_node.cc190 Status CSVNode::from_json(nlohmann::json json_obj, std::shared_ptr<DatasetNode> *ds) { in from_json() argument
191 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("num_parallel_workers") != json_obj.end(), in from_json()
193 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("dataset_files") != json_obj.end(), "Failed to find dat… in from_json()
194 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("field_delim") != json_obj.end(), "Failed to find field… in from_json()
195 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("column_names") != json_obj.end(), "Failed to find colu… in from_json()
196 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("num_samples") != json_obj.end(), "Failed to find num_s… in from_json()
197 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("shuffle") != json_obj.end(), "Failed to find shuffle"); in from_json()
198 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("num_shards") != json_obj.end(), "Failed to find num_sh… in from_json()
199 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("shard_id") != json_obj.end(), "Failed to find shard_id… in from_json()
200 std::vector<std::string> dataset_files = json_obj["dataset_files"]; in from_json()
[all …]
Dvoc_node.cc186 Status VOCNode::from_json(nlohmann::json json_obj, std::shared_ptr<DatasetNode> *ds) { in from_json() argument
187 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("num_parallel_workers") != json_obj.end(), in from_json()
189 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("dataset_dir") != json_obj.end(), "Failed to find datas… in from_json()
190 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("task") != json_obj.end(), "Failed to find task"); in from_json()
191 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("usage") != json_obj.end(), "Failed to find usage"); in from_json()
192 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("class_indexing") != json_obj.end(), "Failed to find cl… in from_json()
193 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("decode") != json_obj.end(), "Failed to find decode"); in from_json()
194 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("sampler") != json_obj.end(), "Failed to find sampler"); in from_json()
195 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("extra_metadata") != json_obj.end(), "Failed to find ex… in from_json()
196 std::string dataset_dir = json_obj["dataset_dir"]; in from_json()
[all …]
Dalbum_node.cc150 Status AlbumNode::from_json(nlohmann::json json_obj, std::shared_ptr<DatasetNode> *ds) { in from_json() argument
151 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("num_parallel_workers") != json_obj.end(), in from_json()
153 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("dataset_dir") != json_obj.end(), "Failed to find datas… in from_json()
154 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("data_schema") != json_obj.end(), "Failed to find data_… in from_json()
155 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("column_names") != json_obj.end(), "Failed to find colu… in from_json()
156 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("decode") != json_obj.end(), "Failed to find decode"); in from_json()
157 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("sampler") != json_obj.end(), "Failed to find sampler"); in from_json()
158 std::string dataset_dir = json_obj["dataset_dir"]; in from_json()
159 std::string data_schema = json_obj["data_schema"]; in from_json()
160 std::vector<std::string> column_names = json_obj["column_names"]; in from_json()
[all …]
Dclue_node.cc251 Status CLUENode::from_json(nlohmann::json json_obj, std::shared_ptr<DatasetNode> *ds) { in from_json() argument
252 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("num_parallel_workers") != json_obj.end(), in from_json()
254 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("dataset_dir") != json_obj.end(), "Failed to find datas… in from_json()
255 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("task") != json_obj.end(), "Failed to find task"); in from_json()
256 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("usage") != json_obj.end(), "Failed to find usage"); in from_json()
257 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("num_samples") != json_obj.end(), "Failed to find num_s… in from_json()
258 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("shuffle") != json_obj.end(), "Failed to find shuffle"); in from_json()
259 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("num_shards") != json_obj.end(), "Failed to find num_sh… in from_json()
260 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("shard_id") != json_obj.end(), "Failed to find shard_id… in from_json()
261 std::vector<std::string> dataset_files = json_obj["dataset_dir"]; in from_json()
[all …]
Dtext_file_node.cc156 Status TextFileNode::from_json(nlohmann::json json_obj, std::shared_ptr<DatasetNode> *ds) { in from_json() argument
157 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("num_parallel_workers") != json_obj.end(), in from_json()
159 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("dataset_files") != json_obj.end(), "Failed to find dat… in from_json()
160 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("num_samples") != json_obj.end(), "Failed to find num_s… in from_json()
161 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("shuffle") != json_obj.end(), "Failed to find shuffle"); in from_json()
162 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("num_shards") != json_obj.end(), "Failed to find num_sh… in from_json()
163 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("shard_id") != json_obj.end(), "Failed to find shard_id… in from_json()
164 std::vector<std::string> dataset_files = json_obj["dataset_files"]; in from_json()
165 int64_t num_samples = json_obj["num_samples"]; in from_json()
166 ShuffleMode shuffle = static_cast<ShuffleMode>(json_obj["shuffle"]); in from_json()
[all …]
Dcoco_node.cc203 Status CocoNode::from_json(nlohmann::json json_obj, std::shared_ptr<DatasetNode> *ds) { in from_json() argument
204 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("num_parallel_workers") != json_obj.end(), in from_json()
206 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("dataset_dir") != json_obj.end(), "Failed to find datas… in from_json()
207 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("annotation_file") != json_obj.end(), "Failed to find a… in from_json()
208 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("task") != json_obj.end(), "Failed to find task"); in from_json()
209 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("decode") != json_obj.end(), "Failed to find decode"); in from_json()
210 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("sampler") != json_obj.end(), "Failed to find sampler"); in from_json()
211 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("extra_metadata") != json_obj.end(), "Failed to find ex… in from_json()
212 std::string dataset_dir = json_obj["dataset_dir"]; in from_json()
213 std::string annotation_file = json_obj["annotation_file"]; in from_json()
[all …]
Dceleba_node.cc190 Status CelebANode::from_json(nlohmann::json json_obj, std::shared_ptr<DatasetNode> *ds) { in from_json() argument
191 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("num_parallel_workers") != json_obj.end(), in from_json()
193 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("dataset_dir") != json_obj.end(), "Failed to find datas… in from_json()
194 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("usage") != json_obj.end(), "Failed to find usage"); in from_json()
195 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("sampler") != json_obj.end(), "Failed to find sampler"); in from_json()
196 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("decode") != json_obj.end(), "Failed to find decode"); in from_json()
197 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("extensions") != json_obj.end(), "Failed to find extens… in from_json()
198 std::string dataset_dir = json_obj["dataset_dir"]; in from_json()
199 std::string usage = json_obj["usage"]; in from_json()
201 RETURN_IF_NOT_OK(Serdes::ConstructSampler(json_obj["sampler"], &sampler)); in from_json()
[all …]
Dmanifest_node.cc165 Status ManifestNode::from_json(nlohmann::json json_obj, std::shared_ptr<DatasetNode> *ds) { in from_json() argument
166 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("num_parallel_workers") != json_obj.end(), in from_json()
168 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("dataset_file") != json_obj.end(), "Failed to find data… in from_json()
169 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("usage") != json_obj.end(), "Failed to find usage"); in from_json()
170 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("sampler") != json_obj.end(), "Failed to find sampler"); in from_json()
171 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("class_indexing") != json_obj.end(), "Failed to find cl… in from_json()
172 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("decode") != json_obj.end(), "Failed to find decode"); in from_json()
173 std::string dataset_file = json_obj["dataset_file"]; in from_json()
174 std::string usage = json_obj["usage"]; in from_json()
176 RETURN_IF_NOT_OK(Serdes::ConstructSampler(json_obj["sampler"], &sampler)); in from_json()
[all …]
Dcifar10_node.cc126 Status Cifar10Node::from_json(nlohmann::json json_obj, std::shared_ptr<DatasetNode> *ds) { in from_json() argument
127 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("num_parallel_workers") != json_obj.end(), in from_json()
129 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("dataset_dir") != json_obj.end(), "Failed to find datas… in from_json()
130 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("usage") != json_obj.end(), "Failed to find usage"); in from_json()
131 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("sampler") != json_obj.end(), "Failed to find sampler"); in from_json()
132 std::string dataset_dir = json_obj["dataset_dir"]; in from_json()
133 std::string usage = json_obj["usage"]; in from_json()
135 RETURN_IF_NOT_OK(Serdes::ConstructSampler(json_obj["sampler"], &sampler)); in from_json()
137 RETURN_IF_NOT_OK(DatasetCache::from_json(json_obj, &cache)); in from_json()
139 (*ds)->SetNumWorkers(json_obj["num_parallel_workers"]); in from_json()
Dcifar100_node.cc125 Status Cifar100Node::from_json(nlohmann::json json_obj, std::shared_ptr<DatasetNode> *ds) { in from_json() argument
126 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("num_parallel_workers") != json_obj.end(), in from_json()
128 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("dataset_dir") != json_obj.end(), "Failed to find datas… in from_json()
129 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("usage") != json_obj.end(), "Failed to find usage"); in from_json()
130 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("sampler") != json_obj.end(), "Failed to find sampler"); in from_json()
131 std::string dataset_dir = json_obj["dataset_dir"]; in from_json()
132 std::string usage = json_obj["usage"]; in from_json()
134 RETURN_IF_NOT_OK(Serdes::ConstructSampler(json_obj["sampler"], &sampler)); in from_json()
136 RETURN_IF_NOT_OK(DatasetCache::from_json(json_obj, &cache)); in from_json()
138 (*ds)->SetNumWorkers(json_obj["num_parallel_workers"]); in from_json()
Dmnist_node.cc119 Status MnistNode::from_json(nlohmann::json json_obj, std::shared_ptr<DatasetNode> *ds) { in from_json() argument
120 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("num_parallel_workers") != json_obj.end(), in from_json()
122 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("dataset_dir") != json_obj.end(), "Failed to find datas… in from_json()
123 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("usage") != json_obj.end(), "Failed to find usage"); in from_json()
124 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("sampler") != json_obj.end(), "Failed to find sampler"); in from_json()
125 std::string dataset_dir = json_obj["dataset_dir"]; in from_json()
126 std::string usage = json_obj["usage"]; in from_json()
128 RETURN_IF_NOT_OK(Serdes::ConstructSampler(json_obj["sampler"], &sampler)); in from_json()
130 RETURN_IF_NOT_OK(DatasetCache::from_json(json_obj, &cache)); in from_json()
132 (*ds)->SetNumWorkers(json_obj["num_parallel_workers"]); in from_json()
Dflickr_node.cc154 Status FlickrNode::from_json(nlohmann::json json_obj, std::shared_ptr<DatasetNode> *ds) { in from_json() argument
155 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("num_parallel_workers") != json_obj.end(), in from_json()
157 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("dataset_dir") != json_obj.end(), "Failed to find datas… in from_json()
158 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("annotation_file") != json_obj.end(), "Failed to find a… in from_json()
159 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("decode") != json_obj.end(), "Failed to find decode"); in from_json()
160 std::string dataset_dir = json_obj["dataset_dir"]; in from_json()
161 std::string annotation_file = json_obj["annotation_file"]; in from_json()
162 bool decode = json_obj["decode"]; in from_json()
164 RETURN_IF_NOT_OK(Serdes::ConstructSampler(json_obj["sampler"], &sampler)); in from_json()
166 RETURN_IF_NOT_OK(DatasetCache::from_json(json_obj, &cache)); in from_json()
[all …]
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/engine/ir/datasetops/
Dtransfer_node.cc130 Status TransferNode::from_json(nlohmann::json json_obj, std::shared_ptr<DatasetNode> ds, in from_json() argument
132 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("queue_name") != json_obj.end(), "Failed to find queue_… in from_json()
133 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("device_type") != json_obj.end(), "Failed to find devic… in from_json()
134 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("device_id") != json_obj.end(), "Failed to find device_… in from_json()
135 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("send_epoch_end") != json_obj.end(), "Failed to find se… in from_json()
136 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("total_batch") != json_obj.end(), "Failed to find total… in from_json()
137 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("create_data_info_queue") != json_obj.end(), in from_json()
139 std::string queue_name = json_obj["queue_name"]; in from_json()
140 std::string device_type = json_obj["device_type"]; in from_json()
141 int32_t device_id = json_obj["device_id"]; in from_json()
[all …]
Dmap_node.cc190 Status MapNode::from_json(nlohmann::json json_obj, std::shared_ptr<DatasetNode> ds, in from_json() argument
192 CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("num_parallel_workers") != json_obj.end(), in from_json()
194 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("input_columns") != json_obj.end(), "Failed to find inp… in from_json()
195 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("output_columns") != json_obj.end(), "Failed to find ou… in from_json()
196 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("project_columns") != json_obj.end(), "Failed to find p… in from_json()
197 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("operations") != json_obj.end(), "Failed to find operat… in from_json()
198 std::vector<std::string> input_columns = json_obj["input_columns"]; in from_json()
199 std::vector<std::string> output_columns = json_obj["output_columns"]; in from_json()
200 std::vector<std::string> project_columns = json_obj["project_columns"]; in from_json()
202 RETURN_IF_NOT_OK(Serdes::ConstructTensorOps(json_obj["operations"], &operations)); in from_json()
[all …]
Dshuffle_node.cc74 Status ShuffleNode::from_json(nlohmann::json json_obj, std::shared_ptr<DatasetNode> ds, in from_json() argument
76 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("buffer_size") != json_obj.end(), "Failed to find buffe… in from_json()
77 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("reset_each_epoch") != json_obj.end(), "Failed to find … in from_json()
78 int32_t buffer_size = json_obj["buffer_size"]; in from_json()
79 bool reset_every_epoch = json_obj["reset_each_epoch"]; in from_json()
Drename_node.cc76 Status RenameNode::from_json(nlohmann::json json_obj, std::shared_ptr<DatasetNode> ds, in from_json() argument
78 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("input_columns") != json_obj.end(), "Failed to find inp… in from_json()
79 …CHECK_FAIL_RETURN_UNEXPECTED(json_obj.find("output_columns") != json_obj.end(), "Failed to find ou… in from_json()
80 std::vector<std::string> input_columns = json_obj["input_columns"]; in from_json()
81 std::vector<std::string> output_columns = json_obj["output_columns"]; in from_json()
/third_party/mindspore/mindspore/dataset/transforms/
Dpy_transforms.py47 json_obj = {}
60 json_obj["tensor_op_params"] = self.__dict__
62 json_obj["tensor_op_params"].update(json_trans)
63 json_obj["tensor_op_name"] = self.__class__.__name__
64 json_obj["python_module"] = self.__class__.__module__
65 return json.dumps(json_obj)
72 json_obj = json.loads(json_string)
74 new_op.__dict__ = json_obj
75 if "transforms" in json_obj.keys():
78 for json_op in json_obj["transforms"]:
[all …]

1234