Skip to content

Created base structure for adding discovery and other algorithms #68

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

Merged
merged 10 commits into from
Aug 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,793 changes: 2,057 additions & 1,736 deletions poetry.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ langchain-openai = "0.3.26"
langchain-huggingface = ">=0.2.0"
rank-bm25 = ">=0.2.2"
sentence-transformers = ">=4.1.0"
onnxruntime = "1.16.3"
onnxruntime = "1.20.1"
multidict = "^6.6.3"

[tool.poetry.group.dev.dependencies]
poethepoet = "^0.33.0"
Expand Down
Empty file added pywhyllm/data/__init__.py
Empty file.
22 changes: 22 additions & 0 deletions pywhyllm/data/dataset.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from typing import List, Protocol

class Dataset(Protocol):

def graph(self):
"""
Output the ground truth graph associated with the dataset.

Returns:
A networkx graph
"""
pass

def data(self):
"""
Output the data associated with the dataset.

Returns:
A numpy array containing the data
"""
pass

12 changes: 12 additions & 0 deletions pywhyllm/data/generate_data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@


def generate_data(graph, *args, **kwargs):
"""
Generate synthetic data based on a causal graph.
Arguments may be added as the functionality is developed.
Args:
graph: A Networkx graph
Returns:
A numpy array containing the synthetic data
"""
pass
25 changes: 25 additions & 0 deletions pywhyllm/data/metrics.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@


def accuracy(edges, true_edges):
"""Accuracy metric for predicted edges for a given dataset
"""
pass


def precision(edges, true_edges):
"""Precision metric for predicted edges for a given dataset
"""
pass


def recall(edges, true_edges):
"""Recall metric for predicted edges for a given dataset
"""
pass


def F1(edges, true_edges):
"""F1 metric for predicted edges for a given dataset
"""
pass

Empty file.
Empty file added pywhyllm/modelers/__init__.py
Empty file.
Empty file.
Empty file.
Empty file added pywhyllm/refuters/__init__.py
Empty file.