Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
74230ed3
提交
74230ed3
authored
2月 27, 2012
作者:
Pascal Lamblin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Change nosetests -> theano-nose in documentation
上级
87e10dc8
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
30 行增加
和
19 行删除
+30
-19
unittest.txt
doc/extending/unittest.txt
+18
-11
install.txt
doc/install.txt
+11
-7
metadocumentation.txt
doc/internal/metadocumentation.txt
+1
-1
没有找到文件。
doc/extending/unittest.txt
浏览文件 @
74230ed3
...
@@ -65,31 +65,38 @@ How to Run Unit Tests ?
...
@@ -65,31 +65,38 @@ How to Run Unit Tests ?
Two options are available:
Two options are available:
Nosetests
theano-nose
~~~~~~~~~
~~~~~~~~~
~~
The easiest by far is to use ``
nosetests
`` which is a command line
The easiest by far is to use ``
theano-nose
`` which is a command line
utility that recurses through a given directory, finds all unittests
utility that recurses through a given directory, finds all unittests
matching a specific criteria and executes them. By default, it will
matching a specific criteria and executes them. By default, it will
find & execute tests case in test*.py files whose method name starts
find & execute tests case in test*.py files whose method name starts
with 'test'.
with 'test'.
``theano-nose`` is a wrapper around `nosetests
<http://somethingaboutorange.com/mrl/projects/nose/>`_. You should be
able to execute it if you installed Theano using pip, or if you ran
"python setup.py develop" after the installation. If ``theano-nose`` is
not found by your shell, you will need to add ``Theano/bin`` to your
``PATH`` environment variable.
Running all unit tests ::
Running all unit tests ::
cd Theano/theano
cd Theano/theano
nosetests
theano-nose
Running unit tests with standard out ::
Running unit tests with standard out ::
nosetests
-s
theano-nose
-s
Running unit tests contained in a specific .py file ::
Running unit tests contained in a specific .py file ::
nosetests
<filename>.py
theano-nose
<filename>.py
Running a specific unit test ::
Running a specific unit test ::
nosetests
<filename>.py:<classname>.<method_name>
theano-nose
<filename>.py:<classname>.<method_name>
Using unittest module
Using unittest module
~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~
...
@@ -304,9 +311,9 @@ type this:
...
@@ -304,9 +311,9 @@ type this:
.. code-block:: bash
.. code-block:: bash
THEANO_FLAGS='mode=FAST_COMPILE'
nosetests
THEANO_FLAGS='mode=FAST_COMPILE'
theano-nose
THEANO_FLAGS='mode=FAST_RUN'
nosetests
THEANO_FLAGS='mode=FAST_RUN'
theano-nose
THEANO_FLAGS='mode=DebugMode'
nosetests
THEANO_FLAGS='mode=DebugMode'
theano-nose
.. _random_value_in_tests:
.. _random_value_in_tests:
...
@@ -346,7 +353,7 @@ The behaviour of seed_rng is as follows:
...
@@ -346,7 +353,7 @@ The behaviour of seed_rng is as follows:
The main advantage of using unittest_tools.seed_rng is that it allows
The main advantage of using unittest_tools.seed_rng is that it allows
us to change the seed used in the unitests, without having to manually
us to change the seed used in the unitests, without having to manually
edit all the files. For example, this allows the nightly build to run
edit all the files. For example, this allows the nightly build to run
nosetests
repeatedly, changing the seed on every run (hence achieving
theano-nose
repeatedly, changing the seed on every run (hence achieving
a higher confidence that the variables are correct), while still
a higher confidence that the variables are correct), while still
making sure unittests are deterministic.
making sure unittests are deterministic.
...
...
doc/install.txt
浏览文件 @
74230ed3
...
@@ -322,14 +322,18 @@ You can also run them in-place from the Git checkout directory by typing
...
@@ -322,14 +322,18 @@ You can also run them in-place from the Git checkout directory by typing
.. code-block:: bash
.. code-block:: bash
nosetests
theano-nose
You should be able to execute it if you followed the instructions above.
If ``theano-nose`` is not found by your shell, you will need to add
``Theano/bin`` to your ``PATH`` environment variable.
.. note::
.. note::
The tests should be run with the configuration option :attr:`~config.device`
The tests should be run with the configuration option :attr:`~config.device`
set to ``cpu`` (default). If you need to change this value,
set to ``cpu`` (default). If you need to change this value,
you can do that by setting the :envvar:`THEANO_FLAGS` environment variable,
you can do that by setting the :envvar:`THEANO_FLAGS` environment variable,
by prefixing the ``
nosetests
`` command with ``THEANO_FLAGS=device=cpu``.
by prefixing the ``
theano-nose
`` command with ``THEANO_FLAGS=device=cpu``.
If you have a GPU, it will automatically be used to run GPU-related tests.
If you have a GPU, it will automatically be used to run GPU-related tests.
If you want GPU-related tests to run on a specific GPU device, and not
If you want GPU-related tests to run on a specific GPU device, and not
...
@@ -339,9 +343,9 @@ You can also run them in-place from the Git checkout directory by typing
...
@@ -339,9 +343,9 @@ You can also run them in-place from the Git checkout directory by typing
See :ref:`libdoc_config` for more information on how to change these
See :ref:`libdoc_config` for more information on how to change these
configuration options.
configuration options.
All tests should pass
except those marked as ``KnownFailureTest``. If some
All tests should pass
(skipped tests and known failures are normal). If
test fails on your machine, you are encouraged to tell us what went wrong on
some test fails on your machine, you are encouraged to tell us what went
the ``theano-users@googlegroups.com`` mailing list.
wrong on
the ``theano-users@googlegroups.com`` mailing list.
Troubleshooting: Make sure you have a BLAS library
Troubleshooting: Make sure you have a BLAS library
...
@@ -1003,14 +1007,14 @@ Testing your installation
...
@@ -1003,14 +1007,14 @@ Testing your installation
~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~
Currently, due to memory fragmentation issue in Windows, the
Currently, due to memory fragmentation issue in Windows, the
test-suite breaks at some point when using ``
nosetests
``, with many error
test-suite breaks at some point when using ``
theano-nose
``, with many error
messages looking
messages looking
like: ``DLL load failed: Not enough storage is available to process this
like: ``DLL load failed: Not enough storage is available to process this
command``. As a workaround, you can instead run:
command``. As a workaround, you can instead run:
.. code-block:: bash
.. code-block:: bash
python theano/tests/run_tests_in_batch.py
theano-nose --batch
This will run tests in batches of 100, which should avoid memory errors.
This will run tests in batches of 100, which should avoid memory errors.
Note that this script calls ``nosetests``, which may require being run from
Note that this script calls ``nosetests``, which may require being run from
...
...
doc/internal/metadocumentation.txt
浏览文件 @
74230ed3
...
@@ -126,7 +126,7 @@ be logged into ``ceylon``, Fred leaves a shell open for that.)
...
@@ -126,7 +126,7 @@ be logged into ``ceylon``, Fred leaves a shell open for that.)
The cronjob executes the scripts
The cronjob executes the scripts
``~/nightly_build/do_nightly_build_{theano,pylearn,deeplearning}``.
``~/nightly_build/do_nightly_build_{theano,pylearn,deeplearning}``.
These scripts perform an update of theano (and pylearn, and
These scripts perform an update of theano (and pylearn, and
DeepLearningTutorials too), and execute
nosetests
(in various settings).
DeepLearningTutorials too), and execute
theano-nose
(in various settings).
The output is emailed automatically to the `theano-buildbot`_ mailing list.
The output is emailed automatically to the `theano-buildbot`_ mailing list.
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论