From d23879d91caad39ecaeb1d730309ae70ab4034c8 Mon Sep 17 00:00:00 2001 From: eddiebergman Date: Fri, 12 Jul 2024 14:29:23 +0200 Subject: [PATCH] doc: Improve code doc attribute clarity --- src/ConfigSpace/_condition_tree.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/ConfigSpace/_condition_tree.py b/src/ConfigSpace/_condition_tree.py index 892d4fc8..c1fef94c 100644 --- a/src/ConfigSpace/_condition_tree.py +++ b/src/ConfigSpace/_condition_tree.py @@ -182,13 +182,9 @@ class HPNode: forbiddens: list[ForbiddenLike] = field(default_factory=list) """A list of forbidden clauses that prevent this hyperparameter from being active.""" - # NOTE: We have the restriction that a hyperparameter can only have one parent - # condition but multiple parents from which these relationshops are dervied - # This is to prevent ambiguity between AND and OR, in other words, what - # do we do with the current Node if the condition for one parent is satisfied - # but not the other. - # * A useful assertion to make is that all nodes in `parents` will have the same - # parent condition, also accessible via `parent_condition` + # NOTE: We have the restriction that a hyperparameter can only have **one** parent, + # although multiple conditions can be made on this **one** parent using AND + # or OR conjunctions. parents: dict[str, tuple[HPNode, ConditionLike]] = field( default_factory=dict, # We explicitly don't compare parents to prevent recursion