Skip to content

Commit

Permalink
doc: Improve code doc attribute clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiebergman committed Jul 12, 2024
1 parent 80e2c7c commit d23879d
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/ConfigSpace/_condition_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d23879d

Please sign in to comment.