Skip to content
Snippets Groups Projects
Commit a343e118 authored by Thibault Allenet's avatar Thibault Allenet
Browse files

Add pybind DataProvider

parent d8c99970
No related branches found
No related tags found
No related merge requests found
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include "aidge/data/DataProvider.hpp"
#include "aidge/data/Database.hpp"
namespace py = pybind11;
namespace Aidge {
void init_DataProvider(py::module& m){
py::class_<DataProvider, std::shared_ptr<DataProvider>>(m, "DataProvider")
.def(py::init<Database&, std::size_t>(), py::arg("database"), py::arg("batchSize"))
.def("read_batch", &DataProvider::readBatch, py::arg("start_index"),
R"mydelimiter(
Return a batch of each data modality.
:param start_index: Database starting index to read the batch from
:type start_index: int
)mydelimiter");
}
}
......@@ -15,7 +15,8 @@ namespace py = pybind11;
namespace Aidge {
void init_Data(py::module&);
void init_Database(py::module& m);
void init_Database(py::module&);
void init_DataProvider(py::module&);
void init_Tensor(py::module&);
void init_OperatorImpl(py::module&);
void init_Attributes(py::module&);
......@@ -67,6 +68,7 @@ void init_TensorUtils(py::module&);
void init_Aidge(py::module& m){
init_Data(m);
init_Database(m);
init_DataProvider(m);
init_Tensor(m);
init_Node(m);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment