AxeldeRomblay / MLBox

MLBox is a powerful Automated Machine Learning python library.
https://mlbox.readthedocs.io/en/latest/
Other
1.49k stars 274 forks source link

how to set KERAS_BACKEND ? #9

Closed brunosez closed 7 years ago

brunosez commented 7 years ago

I have warning / errors with Theano backend. So I want to switch to tensorflow. I have a conda virtualenv , in general I set the keras.json file but here ?

Trying os.environ["KERAS_BACKEND"] = "tensorflow" from mlbox.preprocessing import from mlbox.optimisation import from mlbox.prediction import * seems not worked

Thanks Bruno

ncherel commented 7 years ago

EDIT: I didn't not understand what you did. For now, you change the following line in mlbox/encoding/categorical_encoder.py: os.environ["KERAS_BACKEND"] = "theano" And then reinstall the package.

I will submit a PR to avoid overriding this environment variable

brunosez commented 7 years ago

Thanks, changing the line, force Tf Backend unfortunately I get stuck with some tf installation

AxeldeRomblay commented 7 years ago

@brunosez : Actually, it seems that tensorflow installation is a bit more complicated than theano. So we decided not to install tf but theano and to force theano backend when importing the module "encoding" (file categorical_encoder.py).

brunosez commented 7 years ago

OK, you're right TF install with the correct GPU settings could be touchy !