Skip to content

Commit

Permalink
Adjust boundaries for integration test (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
gkirgizov authored Jul 28, 2023
1 parent 5374e5c commit fe63e5e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/integration/test_structural_diversity.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from golem.metrics.edit_distance import tree_edit_dist
from golem.metrics.graph_metrics import degree_distance

DIVERSITY_THRESHOLD = 0.6
DIVERSITY_THRESHOLD = 0.5


def set_up_params(gen_structural_check: int):
Expand Down Expand Up @@ -42,6 +42,7 @@ def test_structural_diversity():
target_graph = generate_labeled_graph('tree', 4, node_labels=['x'])
node_types = ['x', 'y', 'z', 'w', 'v', 'u']
gen_structural_check = STRUCTURAL_DIVERSITY_FREQUENCY_CHECK
reset_diversity_threshold = 0.90

gp_params = set_up_params(gen_structural_check=gen_structural_check)
# running the example
Expand All @@ -55,6 +56,6 @@ def test_structural_diversity():
for i in range(len(ratio_unique)):
if i % gen_structural_check == 0:
# structural check is applied every 5-th generation
assert ratio_unique[i] == 1
assert ratio_unique[i] >= reset_diversity_threshold
else:
assert ratio_unique[i] > DIVERSITY_THRESHOLD
assert ratio_unique[i] >= DIVERSITY_THRESHOLD

0 comments on commit fe63e5e

Please sign in to comment.