-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversion API to other causal libraries' graph #57
Comments
I would also be happy to extend the API to ananke! |
I think based on today's discussion, this seems pretty high value. So I'ma start chipping away at this. Happy to review PR related to ananke. Re all these packages btw, we'll only add them as soft dependencies for unit-testing purposes. This will go into the poetry group |
Will get started on this later this week, on the ananke side I need to remove a hard dependency on |
Is there a rough sketch of how the api should look? Presumably we want to expose a set of functions that all look and behave roughly the same. One idea that comes to mind is the pandas export functionality, where |
Currently, I have a functional API, which is just
You can keep it if you want, and just make |
Everything is done that is doable except Ananke now. Note: some of the other packages which only supports DAGs, I did not handle or implement. I think those work fine w/ nx.DiGraph for now, so community can PR that if they want it. |
Example about tetrad conversion and other library conversion in examples script. |
Is your feature request related to a problem? Please describe.
We should expose an API (there is one untested really rn) for exporting to the following packages:
This will enable pywhy-graphs to be interoperable across many other packages and also allow other users to take their graphs and convert to pywhy-graphs for the sake of using it in
dodiscover
anddowhy
.Describe the solution you'd like
If the other package is not in R, we can directly test roundtrip compatibility.
If the other package is in R, we should just do some basic testing that the format is "as expected". I think loading in R runtime is a whole other beast we don't want to figure out how to do in the CI pipeline.
The solution requires the following for each export:
io roundtrip: That is the basic graph structure should be preserved. Some metadata might be lost depending on the format each package stores graphs in. When possible, metadata should be preserved. A unit test would look like the following where the edge and node structure is preserved.
Additional context
n/a
The text was updated successfully, but these errors were encountered: