Skip to content
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

Introduce functional genetic algorithm operators #109

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

engintoklu
Copy link
Collaborator

Alternative implementations for genetic algorithm operators are introduced. These alternative implementations conform to the paradigm of functional programming, and they are batchable (via simply adding a leftmost dimension to the population, or via torch.func.vmap).

A custom genetic algorithm can be implemented by combining these operators.

Alternative implementations for genetic algorithm
operators are introduced. These alternative
implementations conform to the paradigm of
functional programming, and they are batchable
(via simply adding a leftmost dimension to the
population, or via `torch.func.vmap`).
A custom genetic algorithm can be implemented
by combining these operators.
@engintoklu engintoklu added the enhancement New feature or request label Jul 22, 2024
@engintoklu engintoklu self-assigned this Jul 22, 2024
engintoklu and others added 5 commits July 29, 2024 19:44
This commit adds a new example notebook which
demonstrates how one can use the functional
operators API to solve problems where a solution
is expressed via objects.

A bugfix is also introduced for the method
`make_callable_evaluator` for problems where
the dtype is set as object.
Copy link

codecov bot commented Aug 30, 2024

Codecov Report

Attention: Patch coverage is 75.32957% with 131 lines in your changes missing coverage. Please review.

Project coverage is 76.80%. Comparing base (5c58566) to head (6644480).
Report is 11 commits behind head on master.

Files with missing lines Patch % Lines
src/evotorch/operators/functional.py 81.53% 89 Missing ⚠️
src/evotorch/core.py 14.28% 36 Missing ⚠️
src/evotorch/tools/immutable.py 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #109      +/-   ##
==========================================
+ Coverage   76.74%   76.80%   +0.05%     
==========================================
  Files          49       58       +9     
  Lines        7509     9000    +1491     
==========================================
+ Hits         5763     6912    +1149     
- Misses       1746     2088     +342     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@Higgcz Higgcz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants