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

Allow multiple parameters for nodes and add example with parametrized additive node #191

Merged

Conversation

jakobj
Copy link
Member

@jakobj jakobj commented Jul 16, 2020

With #178 this is now incredibly easy: one can just define new custom nodes that implement certain operations and may contain parameters that can be adapted via local search. This PR includes a fix for nodes that use more than one parameter and example for how to make use of the new power of #178 ;)

Should we include this parametrized add as a new default node? Or is is so simple now to define nodes that we don't need it?

closes #98

@jakobj jakobj added this to the 0.2.0 milestone Jul 16, 2020
@jakobj jakobj requested a review from mschmidt87 July 16, 2020 12:26
@jakobj jakobj changed the title Enh/mul add parameters 3.0 Allow multiple parameters for nodes and add example with parametrized additive node Jul 17, 2020
@jakobj jakobj requested review from mschmidt87 and removed request for mschmidt87 July 20, 2020 09:42
Copy link
Member

@mschmidt87 mschmidt87 left a comment

Choose a reason for hiding this comment

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

Sorry, haven't had time for a detailed review of the code. Overall, looks good so far. But please add more docstrings to the example.

examples/example_parametrized_nodes.py Show resolved Hide resolved
@jakobj jakobj force-pushed the enh/mul-add-parameters-3.0 branch from 5b91967 to a36e441 Compare July 27, 2020 09:57
@jakobj
Copy link
Member Author

jakobj commented Jul 27, 2020

good point! i've adapted the example to include proper documentation that can be properly rendered. please have another look.

@jakobj jakobj requested a review from mschmidt87 July 27, 2020 09:58
Copy link
Member

@mschmidt87 mschmidt87 left a comment

Choose a reason for hiding this comment

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

Looks good, just a few minor comments.

examples/example_parametrized_nodes.py Outdated Show resolved Hide resolved
examples/example_parametrized_nodes.py Outdated Show resolved Hide resolved
examples/example_parametrized_nodes.py Outdated Show resolved Hide resolved
examples/example_parametrized_nodes.py Outdated Show resolved Hide resolved
examples/example_parametrized_nodes.py Show resolved Hide resolved
@jakobj
Copy link
Member Author

jakobj commented Jul 29, 2020

thanks for your input @mschmidt87! i've included your suggestions, please have another look

@jakobj jakobj requested a review from mschmidt87 July 29, 2020 12:51
Copy link
Member

@mschmidt87 mschmidt87 left a comment

Choose a reason for hiding this comment

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

Very nice, looks good to me.
One small thing: Can you add this example to the travis file. After merging #205 , this won't be necessary but at the moment, it's not clear which one we merge first.

@jakobj jakobj force-pushed the enh/mul-add-parameters-3.0 branch from b821a37 to 9cee41f Compare July 30, 2020 11:53
@jakobj
Copy link
Member Author

jakobj commented Jul 30, 2020

thanks! added the example to travis, sqashed, now waiting for green light from travis before merging

@jakobj jakobj merged commit 2d70f50 into Happy-Algorithms-League:master Jul 30, 2020
@jakobj jakobj deleted the enh/mul-add-parameters-3.0 branch July 30, 2020 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce multiplicative and additive parameters for each node
2 participants