diff --git a/src/ldp/graph/ops.py b/src/ldp/graph/ops.py index 1468cf8c..5b83d48e 100644 --- a/src/ldp/graph/ops.py +++ b/src/ldp/graph/ops.py @@ -246,7 +246,7 @@ def get_upstream_results(self, op: str | Op) -> Iterator[OpResult]: def traverse( self, - topological_order: bool = True, + topological_order: bool = False, filter_fn: Callable[[OpResult], bool] = lambda _: True, ) -> Iterator[OpResult]: """Traverse the compute graph that led to this OpResult. @@ -256,7 +256,7 @@ def traverse( order. This requires having the whole graph in memory. If False, traverse the backwards graph in depth-first order. This can be done lazily and is useful if we are trying to hydrate the graph node-by-node. - Most user-facing cases can leave this as True. Defaults to True. + Probably True is a better default, but to avoid nx import we set to False. filter_fn: Will only yield nodes that pass this filter function. Note that nodes that fail will still be traversed.