MLBazaar / BTB

A simple, extensible library for developing AutoML systems
https://mlbazaar.github.io/BTB/
MIT License
171 stars 41 forks source link

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'' #109

Open KOLANICH opened 5 years ago

KOLANICH commented 5 years ago

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

csala commented 5 years ago

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.

pvk-developer commented 4 years ago

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 ?

KOLANICH commented 4 years ago

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.