Skip to content

Commit fdbbc37

Browse files
authored
Merge pull request #68 from py-why/expanded-dir-structure
Created base structure for adding discovery and other algorithms
2 parents 4874ab1 + 2e4e115 commit fdbbc37

File tree

11 files changed

+2118
-1737
lines changed

11 files changed

+2118
-1737
lines changed

poetry.lock

Lines changed: 2057 additions & 1736 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ langchain-openai = "0.3.26"
6363
langchain-huggingface = ">=0.2.0"
6464
rank-bm25 = ">=0.2.2"
6565
sentence-transformers = ">=4.1.0"
66-
onnxruntime = "1.16.3"
66+
onnxruntime = "1.20.1"
67+
multidict = "^6.6.3"
6768

6869
[tool.poetry.group.dev.dependencies]
6970
poethepoet = "^0.33.0"

pywhyllm/data/__init__.py

Whitespace-only changes.

pywhyllm/data/dataset.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
from typing import List, Protocol
2+
3+
class Dataset(Protocol):
4+
5+
def graph(self):
6+
"""
7+
Output the ground truth graph associated with the dataset.
8+
9+
Returns:
10+
A networkx graph
11+
"""
12+
pass
13+
14+
def data(self):
15+
"""
16+
Output the data associated with the dataset.
17+
18+
Returns:
19+
A numpy array containing the data
20+
"""
21+
pass
22+

pywhyllm/data/generate_data.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
3+
def generate_data(graph, *args, **kwargs):
4+
"""
5+
Generate synthetic data based on a causal graph.
6+
Arguments may be added as the functionality is developed.
7+
Args:
8+
graph: A Networkx graph
9+
Returns:
10+
A numpy array containing the synthetic data
11+
"""
12+
pass

pywhyllm/data/metrics.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
3+
def accuracy(edges, true_edges):
4+
"""Accuracy metric for predicted edges for a given dataset
5+
"""
6+
pass
7+
8+
9+
def precision(edges, true_edges):
10+
"""Precision metric for predicted edges for a given dataset
11+
"""
12+
pass
13+
14+
15+
def recall(edges, true_edges):
16+
"""Recall metric for predicted edges for a given dataset
17+
"""
18+
pass
19+
20+
21+
def F1(edges, true_edges):
22+
"""F1 metric for predicted edges for a given dataset
23+
"""
24+
pass
25+

pywhyllm/identifiers/__init__.py

Whitespace-only changes.

pywhyllm/modelers/__init__.py

Whitespace-only changes.

pywhyllm/modelers/hybrid/__init__.py

Whitespace-only changes.

pywhyllm/modelers/llm/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)