Slackbot
01/18/2024, 6:33 PMStefan Krawczyk
01/18/2024, 7:21 PMStefan Krawczyk
01/18/2024, 7:26 PMNicolas Verbeek
01/18/2024, 9:08 PMStefan Krawczyk
01/19/2024, 7:32 AMresult = dr.execute(["foo", "bar", "baz", ...], inputs={"motor_id": 1})
print(result) # ???
Stefan Krawczyk
01/19/2024, 7:38 AMNot very complex, but I would prefer not to pass all previous nodes as input to subsequent nodes. i.e. in my example, I should pass the result of the first node (“motor_off”) to all subsequent nodes to discard the nodes computation if the motor is off.To clarify you mean not doing this:
def transform_foo(motor_on: bool, ...) -> ...:
if not motor_on:
return None
...
def transform_bar(motor_on: bool, ...) -> ...:
if not motor_on:
return None
...
or this — checking for None values on all inputs (or some other sentinel value)
def transform_foo(motor_on: bool, ...) -> ...:
if not motor_on:
return None
...
def transform_theta(transform_foo: float, ...) -> ...:
if transform_foo is None or ... is None... :
return None
...
Nicolas Verbeek
01/19/2024, 6:12 PMStefan Krawczyk
01/19/2024, 7:13 PMNicolas Verbeek
01/19/2024, 8:34 PMStefan Krawczyk
01/19/2024, 9:20 PMNicolas Verbeek
01/20/2024, 5:07 PMStefan Krawczyk
01/21/2024, 5:24 AMNicolas Verbeek
01/21/2024, 3:21 PM