jaberg/hyperopt — Issue #58: Weird Theano error about expected type_num on Linux but not on Mac
Author: gwtaylor
Created: 2011-11-28 22:24:11+00:00
State: open

I've tried the getting hyperopt tutorials to work on a couple of Linux machines.
Using the random bandit works ok, i.e.:

```
hyperopt-search ab.AvsB hyperopt.bandit_algos.Random
```

writes me my experiment.pkl file.

However, when I try the next example, I get a strange message from the depths of Theano.

```
~/src/i686/hyperopt/bin/hyperopt-search ab.AvsB hyperopt.bandit_algos.AdaptiveParzenGM

log_thunk_trace: There was a problem executing an Op.
Traceback (most recent call last):
File "/home/gtaylor/src/i686/hyperopt/bin/hyperopt-search", line 4, in
sys.exit(hyperopt.experiments.main_search())
File "/home/gtaylor/src/i686/hyperopt/hyperopt/experiments.py", line 100, in main_search
self.run(options.steps)
File "/home/gtaylor/src/i686/hyperopt/hyperopt/experiments.py", line 29, in run
trial = algo.suggest(self.trials, self.results, 1)[0]
File "/home/gtaylor/src/i686/hyperopt/hyperopt/theano_gm.py", line 211, in suggest
return self.suggest_ivl(self.suggest_from_prior(N))
File "/home/gtaylor/src/i686/hyperopt/hyperopt/theano_gm.py", line 115, in suggest_from_prior
rvals = prior_sampler(N)
File "/home/gtaylor/src/i686/Theano/theano/compile/function_module.py", line 610, in __call__
self.fn()
File "/home/gtaylor/src/i686/Theano/theano/gof/link.py", line 344, in streamline_default_f
raise_with_op(node)
File "/home/gtaylor/src/i686/Theano/theano/gof/link.py", line 340, in streamline_default_f
thunk()
File "/home/gtaylor/src/i686/Theano/theano/gof/op.py", line 537, in rval
fill_storage()
File "/home/gtaylor/src/i686/Theano/theano/gof/cc.py", line 1178, in __call__
raise exc_type, exc_value, exc_trace
ValueError: ('expected type_num 9 (NPY_INT64) got 5', )
```

Strangely enough, it works fine on my Mac. On both Mac and Linux I am using the Enthought Python distribution 7.1.
This supplies Python 2.7.2.
Both are using Theano and hyperopt from git (master @ HEAD right now).
Basically what I am trying to say is that my working and non-working setup are about as close as they can be (except for the fact that they are different platforms).

I haven't experienced any other Theano-related problems on the Linux machine.