Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
a85e836a
提交
a85e836a
authored
5月 27, 2011
作者:
Olivier Delalleau
浏览文件
操作
浏览文件
下载
差异文件
Merged
上级
46baf3f2
b49c5aa4
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
90 行增加
和
3 行删除
+90
-3
.hgignore
.hgignore
+1
-0
install.txt
doc/install.txt
+10
-3
run_individual_tests.py
theano/tests/run_individual_tests.py
+79
-0
没有找到文件。
.hgignore
浏览文件 @
a85e836a
...
...
@@ -8,6 +8,7 @@ syntax: glob
*.so
*.sw?
*~
.noseids
Theano.egg-info
\#*\#
build
...
...
doc/install.txt
浏览文件 @
a85e836a
...
...
@@ -585,11 +585,18 @@ used within a MinGW Shell (not available if you only installed Python(x,y)).
the Theano installation directory (if you installed Nose manually as described
above, this may only work in a MinGW shell).
Please note that at this time, the test suite may be broken under Windows.
In particular, many tests
ma
y fail while running the test-suite,
In particular, many tests
will probabl
y fail while running the test-suite,
due to insufficient memory resources (in which case you will probably get an
error of the type ``"Not enough storage is available to
process this command"``): one workaround is to run nosetests
multiple times under individual subdirectories.
process this command"``). One workaround (which is not fully working either
at this point) is to go to your ``Theano\theano\tests`` directory and run
the following script (see documentation inside the script itself for more
information):
.. code-block:: bash
python run_individual_tests.py 100
Compiling a faster BLAS
~~~~~~~~~~~~~~~~~~~~~~~
...
...
theano/tests/run_individual_tests.py
0 → 100644
浏览文件 @
a85e836a
#!/usr/bin/env python
__authors__
=
"Olivier Delalleau"
__contact__
=
"delallea@iro"
"""
Run this script to run tests individually.
This script performs three tasks:
1. Run `nosetests --collect-only --with-id` to collect test IDs
2. Run `nosetests --with-id X` with for X = 1 to total number of tests
3. Run `nosetests --failed` to re-run only tests that failed
=> The output of this 3rd step is the one you should care about
One reason to use this script is if you are a Windows user, and see errors like
"Not enough storage is available to process this command" when trying to simply
run `nosetests` in your Theano installation directory.
By using this script, nosetests is run on each test individually, which is much
slower but should at least let you run the test suite.
Note that this script is a work-in-progress and is not fully functional at this
point: the way some tests are defined in the Theano test-suite seems to confuse
the nosetests' TestID module, probably leading to not running all tests, as
well as to some unexpected test failures.
You can also provide a single command-line argument, which should be an integer
number N (default = 1), in order to run batches of N tests rather than run tests
one at a time. It will be faster (but may fail under Windows if N is too large).
"""
import
cPickle
,
os
,
subprocess
,
sys
import
theano
def
main
():
theano_install_dir
=
os
.
path
.
join
(
os
.
path
.
dirname
(
theano
.
__file__
),
'..'
)
os
.
chdir
(
theano_install_dir
)
# It seems like weird things happen if we keep the same IDs file around...
# (the number of test items in it changes from one run to another)
if
os
.
path
.
isfile
(
'.noseids'
):
os
.
remove
(
'.noseids'
)
# Collect test IDs.
assert
subprocess
.
call
([
'nosetests'
,
'--collect-only'
,
'--with-id'
])
==
0
data
=
cPickle
.
load
(
open
(
os
.
path
.
join
(
theano_install_dir
,
'.noseids'
),
'rb'
))
ids
=
data
[
'ids'
]
n_tests
=
len
(
ids
)
# Run tests.
n_batch
=
1
if
len
(
sys
.
argv
)
>=
2
:
n_batch
=
int
(
sys
.
argv
[
1
])
has_error
=
0
for
test_id
in
xrange
(
1
,
n_tests
+
1
,
n_batch
):
test_range
=
range
(
test_id
,
min
(
test_id
+
n_batch
,
n_tests
+
1
))
rval
=
subprocess
.
call
([
'nosetests'
,
'-v'
,
'--with-id'
]
+
map
(
str
,
test_range
))
has_error
+=
rval
if
has_error
:
# Re-run only failed tests
print
"""
\
###########################
# RE-RUNNING FAILED TESTS #
###########################"""
subprocess
.
call
([
'nosetests'
,
'-v'
,
'--failed'
])
return
0
else
:
print
"""
\
####################
# ALL TESTS PASSED #
####################"""
if
__name__
==
'__main__'
:
sys
.
exit
(
main
())
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论