autonomio / talos

Hyperparameter Experiments with TensorFlow and Keras
https://autonom.io
MIT License
1.62k stars 268 forks source link

Issue with results heading when on Python 3.5 #267

Closed tanguycdls closed 5 years ago

tanguycdls commented 5 years ago

Hi, I was running Talos on Python 3.5 and I ran into a small issue : In the code results.py you use a dict.keys() method to insert the results into the csv: `for key in out.history.keys(): t_t = array(out.history[key])

this handles metrics (NOTE: 'acc' have to be in metric name)

    ....`

While in Python 3.6 or higher the order of the .keys() method is always the same it's not the case in Python 3.5: it makes the params and score order completely random and impossible to analyze. The fix would be either to iterate over the header or simply put a warning while installing Talos.

Thank you for your amazing work, the library is very good. It's really nice to be able to do hyperparameter optimization natively ! I really like the fact that we don't have to re write all our code to be compatible.

Best, EDIT if we replace history.history and params dict by an ordered dict sorted by keys it seems to fix the issue without having to change Python version.

mikkokotila commented 5 years ago

Thanks :)

What do you get with pip freeze | grep talos as your Talos version.

tanguycdls commented 5 years ago

It's the version from pip, version Talos==0.4.8.

Thks,

mikkokotila commented 5 years ago

This is handled in v.0.6 onwards. This can be accessed through pip install git+https://github.com/autonomio/talos@dev at the moment. Closing here.