BTB icon indicating copy to clipboard operation
BTB copied to clipboard

TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

Open KOLANICH opened this issue 5 years ago • 3 comments

  • BTB version: 06daf139b88854c727d352a3c9dc919760e02fd6
  • Python version: 3.7.2
  • Operating System: Debian stretch

DescriptionFile

"lib/python3.7/site-packages/btb/tuning/gp.py", line 86, in _acquire
ei = sigma * (z * Phi(z) + N(z))
File "lib/python3.7/site-packages/scipy/stats/_distn_infrastructure.py", line 1751, in cdf
place(output, (1-cond0)+np.isnan(x), self.badvalue)
TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

What I Did

Called GPEi. GP with the same arguments works. GCP* fail with SingularMatrix.

https://gitlab.com/KOLANICH/UniOpt.py/-/jobs/141882424

KOLANICH avatar Jan 05 '19 19:01 KOLANICH

Thanks for reporting this @KOLANICH.

However, could you be a bit more specific on the exact usage?

It would help a lot to see what arguments you passed to the class constructor and what was the sequence of method calls as well as the values passed to them so that we can reproduce the error on our side to investigate it.

csala avatar Jan 07 '19 12:01 csala

Hello @KOLANICH,

We have done some major reorganization and re-implemented the tuning section for a better usage. The following issues #131 and #134 could have fixed this issue, but it's hard to tell as we can't reproduce the error on our side.

Would you mind giving it another try and giving us feedback on this issue ?

pvk-developer avatar Dec 03 '19 10:12 pvk-developer

However, could you be a bit more specific on the exact usage?

It would help a lot to see what arguments you passed to the class constructor and what was the sequence of method calls as well as the values passed to them so that we can reproduce the error on our side to investigate it.

Oops. I'm sorry that I have forgot to answer.

My use case is to wrap as much different optimizers as possible into a single interface. UniOpt.py is the lib providing a framework for wrapping very different optimizers easily (I have wrapped >16 libs) and calling them using a unified interface. The CI pipeline linked was the test using this optimizer against a hybrid of Ackley and Rosenbrock functions.

Thank you for notifying me about the architecture upgrade. Unfortunately currently I have no time to improve and even fix UniOpt (the upgrade of the architecture of BTB has likely broken the its backend in UniOpt), so I cannot answer rapidly if this bug can be closed right now.

KOLANICH avatar Dec 03 '19 18:12 KOLANICH