-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolves #60: add ability to call fitness function in batch #61
base: master
Are you sure you want to change the base?
Conversation
@linanqiu @luca-scr I hope you consider implementing this simple yet highly beneficial change. It would greatly assist users like myself who work with complex biophysical or hydrological models (within the fitness function) that are inherently multi-core. In such cases, users can efficiently run GA in batch mode, leveraging the models' built-in capabilities for speed enhancement rather than relying on often problematic and hard-to-debug parallel setups. |
A simple test with and without the batch mode: With Batch: 30.54 sec elapsed
Results:
|
Often the fixed cost of calling the fitness function is high while the variable cost is low, especially in ML applications. e.g. calling predict on xgboost for 100 rows takes X seconds, but 100,000 rows takes around 5X seconds. I'm adding an option that allows users to write a batch fitness function and expect the entire population at once.