You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Args:
loop_body_operators (`Operators`): Operators executed as the body of
the loop.
condition_func (`Callable[[int, Any], bool]`, optional): A function
that determines whether to continue executing the loop body based
on the current loop number and output of the loop_body_operator,
defaults to `lambda _,__: False`
x (`Optional[dict]`, defaults to `None`):
The input dictionary.
Returns:
`dict`: the output dictionary.
"""
i = 0
while condition_func(i, x):
# loop body
x = _operators(loop_body_operators, x)
# check condition
i += 1
return x # type: ignore[return-value]
Thanks for your attention. For whilelooppipeline, we are considering to abandon this feature for the difficulity to write a lambda function. Currently, we think directly coding a while loop is more simple and user-friendly.
def whilelooppipeline(
loop_body_operators: Operators,
condition_func: Callable[[int, Any], bool] = lambda _, __: False,
x: Optional[dict] = None,
) -> dict:
"""Functional version of WhileLoopPipeline.
这里的i感觉没什么意义,对于外面函数的定义还有影响,不看源码的话,会导致函数的定义失败的状态 文档也没有说明
The text was updated successfully, but these errors were encountered: