-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy path__init__.py
More file actions
117 lines (92 loc) · 2.56 KB
/
__init__.py
File metadata and controls
117 lines (92 loc) · 2.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
"""Data source adapters for Eval Protocol.
This package provides adapters for integrating with various data sources
and converting them to EvaluationRow format for use in evaluation pipelines.
Available adapters:
- BaseAdapter: Abstract base class for all adapters
- LangfuseAdapter: Pull data from Langfuse deployments
- FireworksTracingAdapter: Pull data from Langfuse via Fireworks tracing proxy
- HuggingFaceAdapter: Load datasets from HuggingFace Hub
- BigQueryAdapter: Query data from Google BigQuery
- TRL integration (legacy)
"""
# Always available
from .base import BaseAdapter
__all__ = ["BaseAdapter"]
# Conditional imports based on available dependencies
try:
from .langfuse import LangfuseAdapter, create_langfuse_adapter
__all__.extend(["LangfuseAdapter", "create_langfuse_adapter"])
except ImportError:
pass
from .fireworks_tracing import FireworksTracingAdapter
__all__.extend(["FireworksTracingAdapter"])
try:
from .huggingface import (
HuggingFaceAdapter,
create_gsm8k_adapter,
create_huggingface_adapter,
create_math_adapter,
)
__all__.extend(
[
"HuggingFaceAdapter",
"create_huggingface_adapter",
"create_gsm8k_adapter",
"create_math_adapter",
]
)
except ImportError:
pass
try:
from .bigquery import (
BigQueryAdapter,
create_bigquery_adapter,
)
__all__.extend(
[
"BigQueryAdapter",
"create_bigquery_adapter",
]
)
except ImportError:
pass
try:
from .braintrust import BraintrustAdapter, create_braintrust_adapter
__all__.extend(["BraintrustAdapter", "create_braintrust_adapter"])
except ImportError:
pass
# Legacy adapters (always available)
try:
from .trl import create_trl_adapter
__all__.extend(["create_trl_adapter"])
except ImportError:
pass
try:
from .openai_responses import OpenAIResponsesAdapter
__all__.extend(["OpenAIResponsesAdapter"])
except ImportError:
pass
try:
from .langsmith import LangSmithAdapter
__all__.extend(["LangSmithAdapter"])
except ImportError:
pass
try:
from .weave import WeaveAdapter
__all__.extend(["WeaveAdapter"])
except ImportError:
pass
# DataFrame adapter (pandas integration for Lilac, etc.)
try:
from .dataframe import (
evaluation_rows_to_dataframe,
dataframe_to_evaluation_rows,
)
__all__.extend(
[
"evaluation_rows_to_dataframe",
"dataframe_to_evaluation_rows",
]
)
except ImportError:
pass