Skip to content

Commit

Permalink
Scheduler: implement remove_condition
Browse files Browse the repository at this point in the history
  • Loading branch information
kmantel committed Dec 5, 2023
1 parent 5e67ca9 commit e2abf0c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions psyneulink/core/scheduling/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,21 @@ def _add_condition_set(self, conditions):
}
super().add_condition_set(conditions)

def remove_condition(self, owner_or_condition):
try:
res = super().remove_condition(owner_or_condition)
except AttributeError as e:
if "'has no attribute 'remove_condition'" in str(e):
raise graph_scheduler.SchedulerError(
f'remove_condition unavailable in your installed graph-scheduler v{graph_scheduler.__version__}'
)
else:
raise
else:
self.composition._analyze_graph()

return res

@graph_scheduler.Scheduler.termination_conds.setter
def termination_conds(self, termination_conds):
if termination_conds is not None:
Expand Down

0 comments on commit e2abf0c

Please sign in to comment.