Discussion:
[theano-users] How to run a single failing test, and what might the error I have be about?
Marcelo Siero
2017-03-20 06:04:43 UTC
Permalink
I get this error on a new installation. It has a GPU, but I have not
modified my configuration.
It is on a CENTOS 7 machine, and I followed the bleeding edge instructions.
When I run:
THEANO_FLAGS=''; python -c "import theano; theano.test()"

After a long time, I got this error:
Traceback (most recent call last):
File
"/home/siero/.local/lib/python2.7/site-packages/theano/sandbox/cuda/tests/test_basic_ops.py",
line 1069, in test_adv_sub1_fast
data = rand(*shape)
File "mtrand.pyx", line 1347, in mtrand.RandomState.rand
(numpy/random/mtrand/mtrand.c:19701)
File "mtrand.pyx", line 856, in mtrand.RandomState.random_sample
(numpy/random/mtrand/mtrand.c:15527)
File "mtrand.pyx", line 167, in mtrand.cont0_array
(numpy/random/mtrand/mtrand.c:6127)
TypeError: 'float' object cannot be interpreted as an index

It then said:
Ran 26010 tests in 15484.861s

But no summary as to how many other errors.
I would like to run this particular test only.

I have 2 GPU's and will be enabling them. But for now, I would like to run
just the one unit
test that is failing. I saw no instructions in the FAQs as to how to do
that.

-Marcelo
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Frédéric Bastien
2017-04-11 21:39:10 UTC
Permalink
Tests should be run with device=cpu. They enable the GPU individually when
needed.

Make sure to Theano theano 0.9, I think this type of errors got fixed
before that release.

I would also suggest to the Theanno new gpu back-end:

https://github.com/Theano/Theano/wiki/Converting-to-the-new-gpu-back-end%28gpuarray%29

Fred
Post by Marcelo Siero
I get this error on a new installation. It has a GPU, but I have not
modified my configuration.
It is on a CENTOS 7 machine, and I followed the bleeding edge instructions.
THEANO_FLAGS=''; python -c "import theano; theano.test()"
File
"/home/siero/.local/lib/python2.7/site-packages/theano/sandbox/cuda/tests/test_basic_ops.py",
line 1069, in test_adv_sub1_fast
data = rand(*shape)
File "mtrand.pyx", line 1347, in mtrand.RandomState.rand
(numpy/random/mtrand/mtrand.c:19701)
File "mtrand.pyx", line 856, in mtrand.RandomState.random_sample
(numpy/random/mtrand/mtrand.c:15527)
File "mtrand.pyx", line 167, in mtrand.cont0_array
(numpy/random/mtrand/mtrand.c:6127)
TypeError: 'float' object cannot be interpreted as an index
Ran 26010 tests in 15484.861s
But no summary as to how many other errors.
I would like to run this particular test only.
I have 2 GPU's and will be enabling them. But for now, I would like to
run just the one unit
test that is failing. I saw no instructions in the FAQs as to how to do
that.
-Marcelo
--
---
You received this message because you are subscribed to the Google Groups
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Yimeng Zhang
2017-05-30 15:36:24 UTC
Permalink
It's still happening. I installed Theano 0.9, ran the test for a while, and
got the following.

======================================================================
ERROR: test_adv_sub1_fast
(theano.sandbox.cuda.tests.test_basic_ops.T_subtensor)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/yimengzh/miniconda2/envs/theano-tf-3/lib/python3.6/site-packages/theano/sandbox/cuda/tests/test_basic_ops.py",
line 1069, in test_adv_sub1_fast
data = rand(*shape)
File "mtrand.pyx", line 1347, in mtrand.RandomState.rand
(numpy/random/mtrand/mtrand.c:19701)
File "mtrand.pyx", line 856, in mtrand.RandomState.random_sample
(numpy/random/mtrand/mtrand.c:15527)
File "mtrand.pyx", line 167, in mtrand.cont0_array
(numpy/random/mtrand/mtrand.c:6127)
TypeError: 'float' object cannot be interpreted as an integer

----------------------------------------------------------------------
Ran 20367 tests in 12141.904s

FAILED (SKIP=600, errors=1)
Post by Frédéric Bastien
Tests should be run with device=cpu. They enable the GPU individually when
needed.
Make sure to Theano theano 0.9, I think this type of errors got fixed
before that release.
https://github.com/Theano/Theano/wiki/Converting-to-the-new-gpu-back-end%28gpuarray%29
Fred
Post by Marcelo Siero
I get this error on a new installation. It has a GPU, but I have not
modified my configuration.
It is on a CENTOS 7 machine, and I followed the bleeding edge
instructions.
THEANO_FLAGS=''; python -c "import theano; theano.test()"
File
"/home/siero/.local/lib/python2.7/site-packages/theano/sandbox/cuda/tests/test_basic_ops.py",
line 1069, in test_adv_sub1_fast
data = rand(*shape)
File "mtrand.pyx", line 1347, in mtrand.RandomState.rand
(numpy/random/mtrand/mtrand.c:19701)
File "mtrand.pyx", line 856, in mtrand.RandomState.random_sample
(numpy/random/mtrand/mtrand.c:15527)
File "mtrand.pyx", line 167, in mtrand.cont0_array
(numpy/random/mtrand/mtrand.c:6127)
TypeError: 'float' object cannot be interpreted as an index
Ran 26010 tests in 15484.861s
But no summary as to how many other errors.
I would like to run this particular test only.
I have 2 GPU's and will be enabling them. But for now, I would like to
run just the one unit
test that is failing. I saw no instructions in the FAQs as to how to do
that.
-Marcelo
--
---
You received this message because you are subscribed to the Google Groups
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Pascal Lamblin
2017-07-01 19:03:39 UTC
Permalink
It looks like an issue in the test itself (maybe that only shows itself
with newer versions of numpy or something).
This can be safely ignored.
Post by Yimeng Zhang
It's still happening. I installed Theano 0.9, ran the test for a while,
and got the following.
======================================================================
ERROR: test_adv_sub1_fast
(theano.sandbox.cuda.tests.test_basic_ops.T_subtensor)
----------------------------------------------------------------------
File
"/home/yimengzh/miniconda2/envs/theano-tf-3/lib/python3.6/site-packages/theano/sandbox/cuda/tests/test_basic_ops.py",
line 1069, in test_adv_sub1_fast
data = rand(*shape)
File "mtrand.pyx", line 1347, in mtrand.RandomState.rand
(numpy/random/mtrand/mtrand.c:19701)
File "mtrand.pyx", line 856, in mtrand.RandomState.random_sample
(numpy/random/mtrand/mtrand.c:15527)
File "mtrand.pyx", line 167, in mtrand.cont0_array
(numpy/random/mtrand/mtrand.c:6127)
TypeError: 'float' object cannot be interpreted as an integer
----------------------------------------------------------------------
Ran 20367 tests in 12141.904s
FAILED (SKIP=600, errors=1)
Post by Frédéric Bastien
Tests should be run with device=cpu. They enable the GPU individually
when needed.
Make sure to Theano theano 0.9, I think this type of errors got fixed
before that release.
https://github.com/Theano/Theano/wiki/Converting-to-the-new-gpu-back-end%28gpuarray%29
Fred
Post by Marcelo Siero
I get this error on a new installation. It has a GPU, but I have not
modified my configuration.
It is on a CENTOS 7 machine, and I followed the bleeding edge instructions.
THEANO_FLAGS=''; python -c "import theano; theano.test()"
File
"/home/siero/.local/lib/python2.7/site-packages/theano/sandbox/cuda/tests/test_basic_ops.py",
line 1069, in test_adv_sub1_fast
data = rand(*shape)
File "mtrand.pyx", line 1347, in mtrand.RandomState.rand
(numpy/random/mtrand/mtrand.c:19701)
File "mtrand.pyx", line 856, in mtrand.RandomState.random_sample
(numpy/random/mtrand/mtrand.c:15527)
File "mtrand.pyx", line 167, in mtrand.cont0_array
(numpy/random/mtrand/mtrand.c:6127)
TypeError: 'float' object cannot be interpreted as an index
Ran 26010 tests in 15484.861s
But no summary as to how many other errors.
I would like to run this particular test only.
I have 2 GPU's and will be enabling them. But for now, I would like to
run just the one unit
test that is failing. I saw no instructions in the FAQs as to how to do
that.
-Marcelo
--
---
You received this message because you are subscribed to the Google
Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Frédéric Bastien
2017-07-04 12:27:16 UTC
Permalink
I confirm Pascal answer. The problem is that your NumPy version is more
recent then your Theano version. As Pascal told, you can ignore it or
update Theano to the dev version.

Fred
Post by Pascal Lamblin
It looks like an issue in the test itself (maybe that only shows itself
with newer versions of numpy or something).
This can be safely ignored.
Post by Yimeng Zhang
It's still happening. I installed Theano 0.9, ran the test for a while,
and got the following.
======================================================================
ERROR: test_adv_sub1_fast
(theano.sandbox.cuda.tests.test_basic_ops.T_subtensor)
----------------------------------------------------------------------
File
"/home/yimengzh/miniconda2/envs/theano-tf-3/lib/python3.6/site-packages/theano/sandbox/cuda/tests/test_basic_ops.py",
line 1069, in test_adv_sub1_fast
data = rand(*shape)
File "mtrand.pyx", line 1347, in mtrand.RandomState.rand
(numpy/random/mtrand/mtrand.c:19701)
File "mtrand.pyx", line 856, in mtrand.RandomState.random_sample
(numpy/random/mtrand/mtrand.c:15527)
File "mtrand.pyx", line 167, in mtrand.cont0_array
(numpy/random/mtrand/mtrand.c:6127)
TypeError: 'float' object cannot be interpreted as an integer
----------------------------------------------------------------------
Ran 20367 tests in 12141.904s
FAILED (SKIP=600, errors=1)
Post by Frédéric Bastien
Tests should be run with device=cpu. They enable the GPU individually
when needed.
Make sure to Theano theano 0.9, I think this type of errors got fixed
before that release.
https://github.com/Theano/Theano/wiki/Converting-to-the-new-gpu-back-end%28gpuarray%29
Fred
Post by Marcelo Siero
I get this error on a new installation. It has a GPU, but I have not
modified my configuration.
It is on a CENTOS 7 machine, and I followed the bleeding edge instructions.
THEANO_FLAGS=''; python -c "import theano; theano.test()"
File
"/home/siero/.local/lib/python2.7/site-packages/theano/sandbox/cuda/tests/test_basic_ops.py",
line 1069, in test_adv_sub1_fast
data = rand(*shape)
File "mtrand.pyx", line 1347, in mtrand.RandomState.rand
(numpy/random/mtrand/mtrand.c:19701)
File "mtrand.pyx", line 856, in mtrand.RandomState.random_sample
(numpy/random/mtrand/mtrand.c:15527)
File "mtrand.pyx", line 167, in mtrand.cont0_array
(numpy/random/mtrand/mtrand.c:6127)
TypeError: 'float' object cannot be interpreted as an index
Ran 26010 tests in 15484.861s
But no summary as to how many other errors.
I would like to run this particular test only.
I have 2 GPU's and will be enabling them. But for now, I would like to
run just the one unit
test that is failing. I saw no instructions in the FAQs as to how to
do that.
-Marcelo
--
---
You received this message because you are subscribed to the Google
Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...