autonomio / talos

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

Add ModelError as else case to lr_normalizer() #292

Closed emogden closed 4 years ago

emogden commented 5 years ago

After adding Talos to my Tensorflow+Keras model, I found that the learning rate normalizer only recognizes objects from 'keras.optimizers' and was failing silently. Rather than making structural/dependency changes to accommodate Tensorflow, I figured it should at least have an 'else' case with an error to indicate the function cannot operate on the provided optimizer.

Also added test function to make sure this error gets triggered with a string.

My first PR, so let me know if this is prepared incorrectly.

pep8speaks commented 5 years ago

Hello @emogden! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:

Comment last updated at 2019-08-26 20:41:50 UTC
coveralls commented 5 years ago

Pull Request Test Coverage Report for Build 471


Files with Coverage Reduction New Missed Lines %
talos/reducers/permutation_filter.py 5 66.67%
<!-- Total: 5 -->
Totals Coverage Status
Change from base Build 450: -0.4%
Covered Lines: 1125
Relevant Lines: 1249

💛 - Coveralls
mikkokotila commented 5 years ago

Nice, thanks :) Later this week there will be the final changes to v.0.6.2 and given this is already passing, I don't see why it would not pass then. Will merge at that point.

thanks again!

mikkokotila commented 4 years ago

Thanks for this :) The issue has been handled now in other commits, so closing here.