Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
jjmachan committed Sep 28, 2024
1 parent d6e4c3a commit 6372d1e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 3 additions & 0 deletions docs/howtos/integrations/langfuse.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -424,14 +424,17 @@
"from langfuse.decorators import observe, langfuse_context\n",
"from asyncio import run\n",
"\n",
"\n",
"@observe()\n",
"def retriver(question: str):\n",
" return q_to_c[question]\n",
"\n",
"\n",
"@observe()\n",
"def generator(question):\n",
" return q_to_a[question]\n",
"\n",
"\n",
"@observe()\n",
"def rag_pipeline(question):\n",
" q_hash = hash_string(question)\n",
Expand Down
6 changes: 3 additions & 3 deletions src/ragas/experimental/testset/generators/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ async def generate_scenarios(
self, n: int, knowledge_graph: KnowledgeGraph
) -> t.List[AbstractQuestionScenario]:
node_clusters = knowledge_graph.find_clusters(
relationship_condition=lambda rel: True
if rel.get_property("cosine_similarity")
else False
relationship_condition=lambda rel: (
True if rel.get_property("cosine_similarity") else False
)
)
logger.info("found %d clusters", len(node_clusters))

Expand Down
1 change: 0 additions & 1 deletion src/ragas/experimental/testset/generators/generator.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from __future__ import annotations

import math
import typing as t
from dataclasses import dataclass, field

Expand Down
1 change: 0 additions & 1 deletion src/ragas/experimental/testset/transforms/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import asyncio
import logging
import typing as t
from dataclasses import dataclass

from ragas.executor import as_completed, is_event_loop_running, tqdm
from ragas.experimental.testset.graph import KnowledgeGraph
Expand Down

0 comments on commit 6372d1e

Please sign in to comment.