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

Compare set expression for output to target expression #359

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

Conversation

HenrikMettler
Copy link
Contributor

When using genome.set_expression_for_output one usually has a target expression that the output node should compile to. Since mistakes in setting the dna can happen easily (eg. by changing the order of primitives) - a built-in check can be useful. This PR implements the comparison using sympy.parse_expr and a compilation to sympy of the genome.

@jakobj jakobj added this to the 0.4.0 milestone Jan 13, 2022
@jakobj jakobj added the UX It's all about the experience label Jan 13, 2022
Copy link
Member

@jakobj jakobj left a comment

Choose a reason for hiding this comment

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

great, thanks for working on this! this will prevent much pain. 👀

i've left a few comments that should be addressed before merging.

cgp/genome.py Outdated Show resolved Hide resolved
cgp/genome.py Outdated Show resolved Hide resolved
cgp/genome.py Outdated Show resolved Hide resolved
cgp/genome.py Outdated Show resolved Hide resolved
test/test_genome.py Outdated Show resolved Hide resolved
test/test_genome.py Outdated Show resolved Hide resolved
test/test_genome.py Outdated Show resolved Hide resolved
test/test_genome.py Outdated Show resolved Hide resolved
Copy link
Member

@jakobj jakobj left a comment

Choose a reason for hiding this comment

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

almost done 🚀 left two more comments

cgp/genome.py Show resolved Hide resolved
cgp/genome.py Outdated Show resolved Hide resolved
test/test_genome.py Outdated Show resolved Hide resolved
Copy link
Member

@jakobj jakobj left a comment

Choose a reason for hiding this comment

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

great, just some leftover to cleanup from when target_expression was optional. 👍

afterwards, please squash commits.

cgp/genome.py Outdated Show resolved Hide resolved
cgp/genome.py Outdated Show resolved Hide resolved
@jakobj
Copy link
Member

jakobj commented Feb 14, 2022

ping @HenrikMettler

@HenrikMettler HenrikMettler changed the title Compare set expression for output to target expression (optional) Compare set expression for output to target expression Feb 28, 2022
@mschmidt87
Copy link
Member

mschmidt87 commented Oct 13, 2022

Did @HenrikMettler resolve all your comments, @jakobj ? Could you give this another check?

@jakobj
Copy link
Member

jakobj commented Oct 24, 2022

i think i don't have any more pressing comments, besides squashing commits please and fixing tests :)

@mschmidt87
Copy link
Member

@HenrikMettler could you fix the tests, rebase on master and squash the commits?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UX It's all about the experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants