diff --git a/paddle/fluid/pybind/pybind.cc b/paddle/fluid/pybind/pybind.cc index 56bc0f7d7a7b29acbca98c620f2f9886e81a2ee8..400cac20e8767269493f354d2cdca7555c8727c4 100644 --- a/paddle/fluid/pybind/pybind.cc +++ b/paddle/fluid/pybind/pybind.cc @@ -313,8 +313,8 @@ All parameter, weight, gradient are variables in Paddle. }) .def("size", &LoDTensorBlockingQueue::Size) .def("capacity", &LoDTensorBlockingQueue::Cap) - .def("push_eof", &LoDTensorBlockingQueue::Close) - .def("is_eof", &LoDTensorBlockingQueue::IsClosed); + .def("close", &LoDTensorBlockingQueue::Close) + .def("is_closed", &LoDTensorBlockingQueue::IsClosed); m.def("init_lod_tensor_blocking_queue", [](Variable &var, size_t capacity, diff --git a/python/paddle/fluid/layers/io.py b/python/paddle/fluid/layers/io.py index 99e23f8a7f8d2aefd925baaa4a440c797c0ef886..58e0d99ca2c11cc690ef8185d710a98129d4de78 100644 --- a/python/paddle/fluid/layers/io.py +++ b/python/paddle/fluid/layers/io.py @@ -456,7 +456,7 @@ def py_reader(capacity, shapes, lod_levels, dtypes): Variable would invoke `pop()` method of the queue to retrieve the feeding data. The process of feeding data in Python side and fetching data in C++ side can run in parallel. The BlockingQueue should be closed - using `push_eof()` method when unused. + using `close()` method when unused. Args: capacity(int): The maximum capacity of the BlockingQueue. diff --git a/python/paddle/fluid/tests/unittests/test_py_reader_push_pop.py b/python/paddle/fluid/tests/unittests/test_py_reader_push_pop.py index cdfa94cf3161249a5e04965492611e491de5d230..05715464848d835684dd3cf0e99e5d4dd482e0b6 100644 --- a/python/paddle/fluid/tests/unittests/test_py_reader_push_pop.py +++ b/python/paddle/fluid/tests/unittests/test_py_reader_push_pop.py @@ -81,7 +81,7 @@ class TestPyReader(unittest.TestCase): self.outputs.append( executor.run(fetch_list=list(read_out_data))) - feed_queue.push_eof() + feed_queue.close() self.validate() def validate(self): diff --git a/python/paddle/fluid/tests/unittests/test_py_reader_using_executor.py b/python/paddle/fluid/tests/unittests/test_py_reader_using_executor.py index 7c882be8e538f57dab4118d863b80a964a59bb21..9a5b69eea46e74deeba87aefae4afac84c7745f1 100644 --- a/python/paddle/fluid/tests/unittests/test_py_reader_using_executor.py +++ b/python/paddle/fluid/tests/unittests/test_py_reader_using_executor.py @@ -184,7 +184,7 @@ class TestPyReaderUsingExecutor(unittest.TestCase): fetches = [as_numpy(fetch) for fetch in fetches] self.outputs.append(fetches) - feed_queue.push_eof() + feed_queue.close() self.validate() def validate(self):