diff --git a/Dockerfile b/Dockerfile index 48c750358cfcb227667c429f19befcaa2f51ebbd..402adee2ea2822250ebc8f6229fd6a44545d58e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -80,7 +80,7 @@ RUN pip install pre-commit 'ipython==5.3.0' && \ pip install opencv-python #For docstring checker -RUN pip install pylint pytest astroid isort +RUN pip install pylint pytest astroid isort LinkChecker COPY ./python/requirements.txt /root/ RUN pip install -r /root/requirements.txt diff --git a/python/paddle/reader/decorator.py b/python/paddle/reader/decorator.py index 5a2573f59cf7b06d0269fabc39e72d8421597c0b..4b1fe94222d35f8c0e4e4cccc364227a3f9509d0 100644 --- a/python/paddle/reader/decorator.py +++ b/python/paddle/reader/decorator.py @@ -20,7 +20,7 @@ __all__ = [ from threading import Thread import subprocess -from six.moves import queue +from six.moves.queue import Queue import itertools import random import zlib @@ -190,7 +190,7 @@ def buffered(reader, size): def data_reader(): r = reader() - q = queue(maxsize=size) + q = Queue(maxsize=size) t = Thread( target=read_worker, args=( r, @@ -293,8 +293,8 @@ def xmap_readers(mapper, reader, process_num, buffer_size, order=False): out_queue.put(end) def xreader(): - in_queue = queue(buffer_size) - out_queue = queue(buffer_size) + in_queue = Queue(buffer_size) + out_queue = Queue(buffer_size) out_order = [0] # start a read worker in a thread target = order_read_worker if order else read_worker