keras-tuner icon indicating copy to clipboard operation
keras-tuner copied to clipboard

feat: :boom: Add _pseudo_ genetic search

Open Anselmoo opened this issue 2 years ago • 7 comments

The proposed implementation of a genetic algorithm for hyper optimization as discussed in #47

Even if genetic optimization might be costly for CNN, the applications in numeric analysis or Design of Experiment (DoE) make it still interesting.

Fixes: #47

Further Reading:

  1. Vishwakarma G, et al Towards Autonomous Machine Learning in Chemistry via Evolutionary Algorithms. ChemRxiv.
  2. Rosanna Nichols et al 2019 Quantum Sci. Technol. 4 045012

Anselmoo avatar Dec 05 '22 09:12 Anselmoo

Codecov Report

Patch coverage: 100.00% and project coverage change: +4.45 :tada:

Comparison is base (61a1796) 95.41% compared to head (be86e9b) 99.86%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #777      +/-   ##
==========================================
+ Coverage   95.41%   99.86%   +4.45%     
==========================================
  Files          50       45       -5     
  Lines        3247     3028     -219     
==========================================
- Hits         3098     3024      -74     
+ Misses        149        4     -145     
Impacted Files Coverage Δ
keras_tuner/__init__.py 100.00% <100.00%> (ø)
keras_tuner/tuners/__init__.py 100.00% <100.00%> (ø)
keras_tuner/tuners/genetic.py 100.00% <100.00%> (ø)
keras_tuner/errors.py 100.00% <0.00%> (ø)
keras_tuner/protos/service_pb2_grpc.py
keras_tuner/protos/service_pb2.py
keras_tuner/api_export.py
keras_tuner/protos/__init__.py
keras_tuner/protos/keras_tuner_pb2_grpc.py
keras_tuner/protos/keras_tuner_pb2.py
... and 20 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov-commenter avatar Dec 05 '22 09:12 codecov-commenter

@Anselmoo Thanks for the contribution! We will need to have an internal review. I will get back to you afterwards.

haifeng-jin avatar Dec 05 '22 18:12 haifeng-jin

@Anselmoo Thanks for the contribution! We will need to have an internal review. I will get back to you afterwards.

@haifeng-jin thx for the quick response and to the team.

I know introducing a new algorithm is not straightforward, so see what's next 😊 Best

Anselmoo avatar Dec 05 '22 18:12 Anselmoo

@Anselmoo My first concern is which evolutionary algorithm is the best to use. Another concern is that I do not have the bandwidth to revise and maintain it for the performance and correctness in different settings, like in parallel tuning.

However, this would serve as a great example of implementing custom algorithms for KerasTuner in the KerasTuner guides on keras.io. https://keras.io/guides/keras_tuner/ It is wanted for a long time.

Would you like to contribute it there? If so, I can guide you through the process. A few more modifications to the code are needed.

haifeng-jin avatar Feb 27 '23 19:02 haifeng-jin

@Anselmoo I should have closed the issue in the first place as we are very conservative on accepting new algorithms. Sorry about that.

Please mention me in the thread before making any big contributions to ensure the PR can be accepted in the future. Thank you!

haifeng-jin avatar Feb 27 '23 19:02 haifeng-jin

@Anselmoo My first concern is which evolutionary algorithm is the best to use. Another concern is that I do not have the bandwidth to revise and maintain it for the performance and correctness in different settings, like in parallel tuning.

However, this would serve as a great example of implementing custom algorithms for KerasTuner in the KerasTuner guides on keras.io. https://keras.io/guides/keras_tuner/ It is wanted for a long time.

Would you like to contribute it there? If so, I can guide you through the process. A few more modifications to the code are needed.

This sound promising, let's do it. How, does this match with your @haifeng-jin latest comment?

Anselmoo avatar Feb 27 '23 19:02 Anselmoo

@haifeng-jin can you take a brief look, please? With regards to https://keras.io/guides/keras_tuner/ it is more like a tutorial on how to build your individual solver solution?

Anselmoo avatar Apr 05 '23 19:04 Anselmoo