Skip to content

Commit b496f15

Browse files
Updated according example folder
1 parent 8f2f5dd commit b496f15

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

dialogue2graph/pipelines/core/dialogue_sampling.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
from metrics.automatic_metrics import all_utterances_present
66

77

8-
# @AlgorithmRegistry.register(input_type=BaseGraph, output_type=Dialogue)
8+
@AlgorithmRegistry.register(input_type=BaseGraph, output_type=Dialogue)
99
class RecursiveDialogueSampler(DialogueGenerator):
1010
def _list_in(self, a: list, b: list) -> bool:
1111
"""Check if sequence a exists within sequence b."""
1212
return any(map(lambda x: b[x : x + len(a)] == a, range(len(b) - len(a) + 1)))
1313

1414
def invoke(self, graph: BaseGraph, upper_limit: int) -> list[Dialogue]:
15+
# TODO: how to add caching?
1516
repeats = 1
1617
while repeats <= upper_limit:
1718
dialogues = get_dialogues(graph, repeats)
@@ -25,6 +26,10 @@ def invoke(self, graph: BaseGraph, upper_limit: int) -> list[Dialogue]:
2526

2627
async def ainvoke(self, *args, **kwargs):
2728
return self.invoke(*args, **kwargs)
29+
30+
async def eval(self, graph, dialogues, report_type=Union[dict, DataFrame]) -> Union[dict, DataFrame]:
31+
# return results of evaluation (metrics:results)
32+
pass
2833

2934

3035

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
from dialogue2graph.pipelines.core.pipeline import Pipeline
22

33

4+
pipe = Pipeline(cache_path="./cache", algos=[TopicGenerator, AnotherDialogueSampler])

experiments/exp2025_02_07_example/src/exp2025_02_07_example/__init__.py renamed to experiments/exp2025_02_07_example/exp2025_02_07_example/__init__.py

File renamed without changes.

experiments/exp2025_02_07_example/exp2025_02_07_example/your_notebook.ipynb

Whitespace-only changes.

0 commit comments

Comments
 (0)