Some nx functions fail with ProvDAGs. (probably those which create new graphs based on an existing graph object)
details
nx.reverse_view() fails with the traceback below.
nx.subgraph_view(dag, filter_node = lambda x: x in nested_nodes) fails
nx.relabel_nodes also fails, unless copy=False.
I suspect this is an issue with the way we've reimplemented __init__. I suspect these functions are attempting to create new graphs/graphviews of the same type as the "parent" and then fill in the data, but are choking on the way ProvDAG is initialized. A few quick attempts didn't yield results.
None of these functions are quite critical at this time, but I'll have to come back to this. Union may also be affected if we're asking nx to create a new ProvDAG on its own. If addressing this directly proves problematic, we may be able to sidestep the issue by making ProvDAGs (or something with a better name) that simply have a DiGraph, and implement helpers that call DiGraph functions.
examples
Call:
nx.subgraph_view(dag, filter_node = lambda x: x in nested_nodes)
summary
Some nx functions fail with ProvDAGs. (probably those which create new graphs based on an existing graph object)
details
nx.reverse_view()
fails with the traceback below.nx.relabel_nodes
also fails, unless copy=False.I suspect this is an issue with the way we've reimplemented
__init__
. I suspect these functions are attempting to create new graphs/graphviews of the same type as the "parent" and then fill in the data, but are choking on the way ProvDAG is initialized. A few quick attempts didn't yield results.None of these functions are quite critical at this time, but I'll have to come back to this. Union may also be affected if we're asking nx to create a new ProvDAG on its own. If addressing this directly proves problematic, we may be able to sidestep the issue by making ProvDAGs (or something with a better name) that simply have a DiGraph, and implement helpers that call DiGraph functions.
examples
Call:
traceback:
Call:
Traceback:
References
The DiGraph source has a subclassing example near the end of the docstring