Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failures on master? #315

Closed
amueller opened this issue Aug 2, 2017 · 5 comments
Closed

Test failures on master? #315

amueller opened this issue Aug 2, 2017 · 5 comments

Comments

@amueller
Copy link

amueller commented Aug 2, 2017

======================================================================
ERROR: test_basic (hyperopt.tests.test_pchoice.TestPChoice)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/andy/checkout/hyperopt/hyperopt/tests/test_pchoice.py", line 21, in test_basic
    nesto = hyperopt.pyll.stochastic.sample(space, rng=rng)
  File "/home/andy/checkout/hyperopt/hyperopt/pyll/stochastic.py", line 196, in sample
    return rec_eval(foo, **kwargs)
  File "/home/andy/checkout/hyperopt/hyperopt/pyll/base.py", line 874, in rec_eval
    rval_var = node.pos_args[switch_i + 1]
TypeError: only integer scalar arrays can be converted to a scalar index

======================================================================
ERROR: test_basic2 (hyperopt.tests.test_pchoice.TestPChoice)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/andy/checkout/hyperopt/hyperopt/tests/test_pchoice.py", line 45, in test_basic2
    nesto = hyperopt.pyll.stochastic.sample(space, rng=rng)
  File "/home/andy/checkout/hyperopt/hyperopt/pyll/stochastic.py", line 196, in sample
    return rec_eval(foo, **kwargs)
  File "/home/andy/checkout/hyperopt/hyperopt/pyll/base.py", line 874, in rec_eval
    rval_var = node.pos_args[switch_i + 1]
TypeError: only integer scalar arrays can be converted to a scalar index

======================================================================
ERROR: test_basic3 (hyperopt.tests.test_pchoice.TestPChoice)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/andy/checkout/hyperopt/hyperopt/tests/test_pchoice.py", line 68, in test_basic3
    nesto = hyperopt.pyll.stochastic.sample(space, rng=rng)
  File "/home/andy/checkout/hyperopt/hyperopt/pyll/stochastic.py", line 196, in sample
    return rec_eval(foo, **kwargs)
  File "/home/andy/checkout/hyperopt/hyperopt/pyll/base.py", line 874, in rec_eval
    rval_var = node.pos_args[switch_i + 1]
TypeError: only integer scalar arrays can be converted to a scalar index

======================================================================
ERROR: test_mu_is_used_correctly (hyperopt.tests.test_tpe.TestGMM1)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/andy/checkout/hyperopt/hyperopt/tests/test_tpe.py", line 79, in test_mu_is_used_correctly
    GMM1([1], [10.0], [0.0000001], rng=self.rng))
  File "/home/andy/checkout/hyperopt/hyperopt/tpe.py", line 79, in GMM1
    active = np.argmax(rng.multinomial(1, weights, (n_samples,)), axis=1)
  File "mtrand.pyx", line 4621, in mtrand.RandomState.multinomial (numpy/random/mtrand/mtrand.c:37893)
TypeError: 'numpy.float64' object cannot be interpreted as an integer

======================================================================
FAIL: test_q1lognormal (hyperopt.tests.test_anneal.TestItAtLeastSortOfWorks)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/andy/checkout/hyperopt/hyperopt/tests/test_domains.py", line 249, in test_q1lognormal
    self.work()
  File "/home/andy/checkout/hyperopt/hyperopt/tests/test_anneal.py", line 114, in work
    assert min(trials.losses()) < thresh
AssertionError

----------------------------------------------------------------------
Ran 191 tests in 51.085s

FAILED (SKIP=2, errors=4, failures=1)

@nouiz
Copy link

nouiz commented Aug 3, 2017 via email

@amueller
Copy link
Author

amueller commented Aug 3, 2017

Thanks for your reply. I'm using numpy 1.11.1.
Sorry, the second sentence didn't parse.

The first three errors are because switch_i is a (1, ) array, but I didn't know where a good place would be for the conversion - I could do it where the error happens, but that might hide some issue further up, as I'm not familiar with the code. The 4th seems like a simple casting issues, but the last one seems like an optimization issue, so I have no ideas.

@nouiz
Copy link

nouiz commented Aug 10, 2017 via email

@aldanor
Copy link

aldanor commented Dec 26, 2017

Any ideas on this? The first four seem to be a lack of a simple conversion or casting (somewhere appropriate) as @amueller mentioned, but what about the last one?

(On a side note, is hyperopt actively maintained by anyone? I could probably try fixing a few things if there was anyone to review and merge.)

@michaelmior
Copy link
Contributor

Closing since this refers to an outdated version of hyperopt. Feel free to reopen if you're still having any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants