From 448ca8a46d3616821d517835d904c6878317ba79 Mon Sep 17 00:00:00 2001 From: minqiyang Date: Fri, 13 Jul 2018 20:31:04 +0800 Subject: [PATCH] Move LinkChecker from requirements to Dockerfile Move six.moves.queue to Queue --- Dockerfile | 2 +- python/paddle/reader/decorator.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 48c750358..402adee2e 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 5a2573f59..4b1fe9422 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 -- GitLab