提交 848664ac authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Merge pull request #2442 from nouiz/abergeron-fix_buildbot

Fix lock, try to fix buildbot
......@@ -667,17 +667,16 @@ class ModuleCache(object):
# behavior.
subdirs = sorted(os.listdir(self.dirname))
files, root = None, None # To make sure the "del" below works
for root in subdirs:
root = os.path.join(self.dirname, root)
for subdirs_elem in subdirs:
# Never clean/remove lock_dir
if subdirs_elem == 'lock_dir':
continue
root = os.path.join(self.dirname, subdirs_elem)
key_pkl = os.path.join(root, 'key.pkl')
if key_pkl in self.loaded_key_pkl:
continue
if not os.path.isdir(root):
continue
# Some sub directory we do not want the cache to mess
# with. This can cause problems with multiple process.
if os.path.split(root)[1] in ["lock_dir"]:
continue
files = os.listdir(root)
if not files or 'delete.me' in files:
rmtree(root, ignore_nocleanup=True,
......
......@@ -82,15 +82,16 @@ echo "Executing tests with mode=DEBUG_MODE with seed of the day $seed"
echo "THEANO_FLAGS=${FLAGS},unittests.rseed=$seed,mode=DEBUG_MODE,DebugMode.check_strides=0,DebugMode.patience=3,DebugMode.check_preallocated_output= ${NOSETESTS} ${ARGS}"
THEANO_FLAGS=${FLAGS},unittests.rseed=$seed,mode=DEBUG_MODE,DebugMode.check_strides=0,DebugMode.patience=3,DebugMode.check_preallocated_output= ${NOSETESTS} ${ARGS}
echo "Number of elements in the compiledir:"
ls ${COMPILEDIR}|wc -l
echo
#We put this at the end as it have a tendency to loop infinitly.
#Until we fix the root of the problem we let the rest run, then we can kill this one in the morning.
# with --batch=1000" # The buildbot freeze sometimes when collecting the tests to run
echo "Executing tests with mode=FAST_COMPILE"
echo "THEANO_FLAGS=${FLAGS},mode=FAST_COMPILE ${NOSETESTS} ${ARGS}"
THEANO_FLAGS=${FLAGS},mode=FAST_COMPILE ${NOSETESTS} ${ARGS}
echo "Number of elements in the compiledir:"
ls ${COMPILEDIR}|wc -l
echo
echo "Number of elements in the compiledir:"
ls ${COMPILEDIR}|wc -l
......
......@@ -516,6 +516,7 @@ class BaseGpuCorrMM(GpuOp):
"""
check_broadcast = False
__props__ = ('border_mode', 'subsample')
def __init__(self, border_mode="valid", subsample=(1, 1), pad=(0, 0)):
if pad != (0, 0):
......@@ -547,16 +548,6 @@ class BaseGpuCorrMM(GpuOp):
return self.border_mode
return (0, 0)
def __eq__(self, other):
return type(self) == type(other) \
and self.border_mode == other.border_mode \
and self.subsample == other.subsample
def __hash__(self):
return hash(type(self)) \
^ hash(self.border_mode) \
^ hash(self.subsample)
def __str__(self):
return '%s{%s, %s}' % (
self.__class__.__name__,
......@@ -988,6 +979,7 @@ class GpuCorrMM_gradInputs(BaseGpuCorrMM):
class BaseGpuCorr3dMM(GpuOp):
"""Base class for `GpuCorr3dMM`, `GpuCorr3dMM_gradWeights` and
`GpuCorr3dMM_gradInputs`. Cannot be used directly."""
__props__ = ('border_mode', 'subsample', 'pad')
def __init__(self, border_mode="valid",
subsample=(1, 1, 1),
......@@ -1002,18 +994,6 @@ class BaseGpuCorr3dMM(GpuOp):
raise ValueError("pad must be 'half', 'full', or have three elements")
self.pad = pad
def __eq__(self, other):
return type(self) == type(other) \
and self.border_mode == other.border_mode \
and self.subsample == other.subsample \
and self.pad == other.pad
def __hash__(self):
return hash(type(self)) \
^ hash(self.border_mode) \
^ hash(self.subsample) \
^ hash(self.pad)
def __str__(self):
return '%s{%s, %s, pad=%r}' % (
self.__class__.__name__,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论