-
Notifications
You must be signed in to change notification settings - Fork 8
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
Fix crossover #212
Fix crossover #212
Conversation
Hello @YamLyubov! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2023-10-10 12:07:12 UTC |
Codecov Report
@@ Coverage Diff @@
## main #212 +/- ##
==========================================
- Coverage 73.76% 73.76% -0.01%
==========================================
Files 131 131
Lines 7826 7833 +7
==========================================
+ Hits 5773 5778 +5
- Misses 2053 2055 +2
|
@@ -0,0 +1,57 @@ | |||
from functools import partial |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
в названии файла потерялось нижнее подчеркивание))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
) | ||
|
||
# Generate simple initial population with cyclic graphs | ||
initial_graphs = [generate_labeled_graph('tree', i) for i in range(4, 20)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
сюда наверно тоже надо прокинуть graph_type
, а не tree
по дефолту
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test/unit/adapter/test_adapter.py
Outdated
@@ -34,7 +34,8 @@ def test_adapters_params_correct(adapter, graph_with_params): | |||
if isinstance(graph, Graph): | |||
restored_alpha = restored_graph.root_node.content['params']['alpha'] | |||
else: | |||
restored_alpha = restored_graph.nodes['c']['alpha'] | |||
root_node = [node for node, data in restored_graph.nodes(data='alpha', default=None) if data is not None][0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
почему просто не взять ноду с тем же индексом? судя по всему, в нетворксе они также идут в порядке обхода в глубину
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Сделал немного читаемее
Fixes:
structural_equivalent_nodes
Adds test for evolution with crossover.
#206