@@ -58,8 +58,8 @@ def define_py_data_source(file_list,
58
58
:param obj: python object name. May be a function name if using
59
59
PyDataProviderWrapper.
60
60
:type obj: basestring
61
- :param args: The best practice is using dict to pass arguments into
62
- DataProvider, and use :code:`@init_hook_wrapper` to
61
+ :param args: The best practice is using dict to pass arguments into
62
+ DataProvider, and use :code:`@init_hook_wrapper` to
63
63
receive arguments.
64
64
:type args: string or picklable object
65
65
:param async: Load Data asynchronously or not.
@@ -98,7 +98,7 @@ def define_py_data_sources(train_list,
98
98
The annotation is almost the same as define_py_data_sources2, except that
99
99
it can specific train_async and data_cls.
100
100
101
- :param data_cls:
101
+ :param data_cls:
102
102
:param train_list: Train list name.
103
103
:type train_list: basestring
104
104
:param test_list: Test list name.
@@ -111,8 +111,8 @@ def define_py_data_sources(train_list,
111
111
a tuple or list to this argument.
112
112
:type obj: basestring or tuple or list
113
113
:param args: The best practice is using dict() to pass arguments into
114
- DataProvider, and use :code:`@init_hook_wrapper` to receive
115
- arguments. If train and test is different, then pass a tuple
114
+ DataProvider, and use :code:`@init_hook_wrapper` to receive
115
+ arguments. If train and test is different, then pass a tuple
116
116
or list to this argument.
117
117
:type args: string or picklable object or list or tuple.
118
118
:param train_async: Is training data load asynchronously or not.
@@ -163,12 +163,12 @@ def define_py_data_sources2(train_list, test_list, module, obj, args=None):
163
163
164
164
.. code-block:: python
165
165
166
- define_py_data_sources2(train_list="train.list",
167
- test_list="test.list",
166
+ define_py_data_sources2(train_list="train.list",
167
+ test_list="test.list",
168
168
module="data_provider"
169
169
# if train/test use different configurations,
170
170
# obj=["process_train", "process_test"]
171
- obj="process",
171
+ obj="process",
172
172
args={"dictionary": dict_name})
173
173
174
174
The related data provider can refer to :ref:`api_pydataprovider2_sequential_model` .
@@ -185,8 +185,8 @@ def define_py_data_sources2(train_list, test_list, module, obj, args=None):
185
185
a tuple or list to this argument.
186
186
:type obj: basestring or tuple or list
187
187
:param args: The best practice is using dict() to pass arguments into
188
- DataProvider, and use :code:`@init_hook_wrapper` to receive
189
- arguments. If train and test is different, then pass a tuple
188
+ DataProvider, and use :code:`@init_hook_wrapper` to receive
189
+ arguments. If train and test is different, then pass a tuple
190
190
or list to this argument.
191
191
:type args: string or picklable object or list or tuple.
192
192
:return: None
@@ -195,7 +195,7 @@ def define_py_data_sources2(train_list, test_list, module, obj, args=None):
195
195
196
196
def py_data2 (files , load_data_module , load_data_object , load_data_args ,
197
197
** kwargs ):
198
- data = DataBase ()
198
+ data = create_data_config_proto ()
199
199
data .type = 'py2'
200
200
data .files = files
201
201
data .load_data_module = load_data_module
0 commit comments