leezu commented on a change in pull request #17841: Gluon data 2.0: c++
dataloader and built-in image/bbox transforms
URL: https://github.com/apache/incubator-mxnet/pull/17841#discussion_r409252700
##########
File path: src/c_api/c_api.cc
##########
@@ -1924,6 +1967,194 @@ int MXDataIterGetPadNum(DataIterHandle handle, int
*pad) {
API_END();
}
+int MXListDatasets(uint32_t *out_size,
+ DatasetCreator **out_array) {
+ API_BEGIN();
+ auto &vec = dmlc::Registry<DatasetReg>::List();
+ *out_size = static_cast<uint32_t>(vec.size());
+ *out_array = (DatasetCreator*)(dmlc::BeginPtr(vec)); // NOLINT(*)
+ API_END();
+}
+
+int MXDatasetCreateDataset(DatasetCreator handle,
+ uint32_t num_param,
+ const char **keys,
+ const char **vals,
+ DatasetHandle *out) {
+ Dataset *dataset = nullptr;
+ API_BEGIN();
+ DatasetReg *e = static_cast<DatasetReg *>(handle);
+ dataset = e->body();
Review comment:
Need to pass kwargs here after changing registry func type.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services