Skip to content

Commit a30f6aa

Browse files
authored
Merge pull request #1307 from reyoung/feature/fix_bug_in_dp2
Temporary disable async load data in PyDP2.
2 parents 0e6a11a + 67855d3 commit a30f6aa

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ before_install:
5454
fi
5555
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then paddle/scripts/travis/before_install.osx.sh; fi
5656
- if [[ "$JOB" == "PRE_COMMIT" ]]; then sudo ln -s /usr/bin/clang-format-3.8 /usr/bin/clang-format; fi
57-
- pip install numpy wheel protobuf sphinx recommonmark sphinx_rtd_theme virtualenv pre-commit requests==2.9.2 LinkChecker
57+
# Paddle is using protobuf 3.1 currently. Protobuf 3.2 breaks the compatibility. So we specify the python
58+
# protobuf version.
59+
- pip install numpy wheel 'protobuf==3.1' sphinx recommonmark sphinx_rtd_theme virtualenv pre-commit requests==2.9.2 LinkChecker
5860
script:
5961
- paddle/scripts/travis/main.sh
6062
notifications:

paddle/gserver/dataproviders/PyDataProvider2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ class PyDataProvider2 : public DataProvider {
647647
DataBatch& gpuBatch = *batch;
648648
std::vector<Argument>& gpuArguments = gpuBatch.getStreams();
649649
gpuArguments.resize(cpuArguments.size());
650-
gpuBatch.setSize(size);
650+
gpuBatch.setSize(bsize);
651651
for (size_t i = 0; i < headers_.size(); ++i) {
652652
gpuArguments[i].resizeAndCopyFrom(
653653
cpuArguments[i], useGpu_, HPPL_STREAM_1);

python/paddle/trainer_config_helpers/data_sources.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def py_data2(files, load_data_module, load_data_object, load_data_args,
201201
data.load_data_module = load_data_module
202202
data.load_data_object = load_data_object
203203
data.load_data_args = load_data_args
204-
data.async_load_data = True
204+
data.async_load_data = False
205205
return data
206206

207207
define_py_data_sources(

python/paddle/trainer_config_helpers/tests/configs/protostr/test_split_datasource.protostr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ model_config {
1919
data_config {
2020
type: "py2"
2121
files: "train.list"
22-
async_load_data: true
22+
async_load_data: false
2323
for_test: false
2424
load_data_module: "a"
2525
load_data_object: "c"
@@ -58,7 +58,7 @@ opt_config {
5858
test_data_config {
5959
type: "py2"
6060
files: "test.list"
61-
async_load_data: true
61+
async_load_data: false
6262
for_test: true
6363
load_data_module: "b"
6464
load_data_object: "d"

0 commit comments

Comments
 (0)