提交 e055421e authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Remove unittest.rseed from config md5. Revert temporary fix in 75d8a63c6a36.

上级 948c6813
...@@ -69,7 +69,8 @@ AddConfigVar('DebugMode.check_preallocated_output', ...@@ -69,7 +69,8 @@ AddConfigVar('DebugMode.check_preallocated_output',
'"c_contiguous", "f_contiguous", ' '"c_contiguous", "f_contiguous", '
'"neg_strides" (negative strides), and ' '"neg_strides" (negative strides), and '
'"ALL" (all of the above).'), '"ALL" (all of the above).'),
StrParam('ALL', is_valid=is_valid_check_preallocated_output_param)) StrParam('ALL', is_valid=is_valid_check_preallocated_output_param),
in_c_key=False)
import logging import logging
_logger=logging.getLogger("theano.compile.debugmode") _logger=logging.getLogger("theano.compile.debugmode")
......
...@@ -2062,15 +2062,7 @@ class Composite(ScalarOp): ...@@ -2062,15 +2062,7 @@ class Composite(ScalarOp):
#TODO: What no_recycling is used for? What I need to put their? #TODO: What no_recycling is used for? What I need to put their?
# no_recycling = [] # no_recycling = []
self._cmodule_key = gof.CLinker.cmodule_key_(self.env, []) self._cmodule_key = gof.CLinker.cmodule_key_(self.env, [])
# Remove the config md5 from _hashval self._hashval = hash(self._cmodule_key)
# This is a temporary fix so that _hashval does not change when
# the Op is pickled and unpickled.
cmkey = list(self._cmodule_key)
cmkey1 = list(cmkey[1])
assert isinstance(cmkey1[3], str) and cmkey1[3].startswith('md5:')
del cmkey1[3]
cmkey[1] = tuple(cmkey1)
self._hashval = hash(tuple(cmkey))
def __hash__(self): def __hash__(self):
return self._hashval return self._hashval
......
...@@ -7,7 +7,8 @@ from theano.configparser import config, AddConfigVar, StrParam ...@@ -7,7 +7,8 @@ from theano.configparser import config, AddConfigVar, StrParam
AddConfigVar('unittests.rseed', AddConfigVar('unittests.rseed',
"Seed to use for randomized unit tests. Special value 'random' means using a seed of None.", "Seed to use for randomized unit tests. Special value 'random' means using a seed of None.",
StrParam(666)) StrParam(666),
in_c_key=False)
def fetch_seed(pseed=None): def fetch_seed(pseed=None):
""" """
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论