Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f0e6aa9
text2sql execution accuracy update
oktie Jun 3, 2025
4c9aa16
refactoring text2sql metrics
oktie Jun 3, 2025
8909d08
text2sql metric subset score fix
oktie Jun 5, 2025
aa3b49d
more refactoring of text2sql metrics
oktie Jun 6, 2025
407f204
new text2sql metric
oktie Jun 7, 2025
8abb08b
Add Multi Turn Metrics Support (#1579)
elronbandel Jun 4, 2025
9121fa6
adding text2sql_logic task
oktie Jun 7, 2025
c713e54
changing default api_key_env_var to None
oktie Jun 7, 2025
d5b3e33
Merge remote-tracking branch 'origin/main' into text2sql-metrics-update
oktie Jun 17, 2025
40f5ec8
text2sql bird metric + bug fix
oktie Jun 24, 2025
86480bf
fix bug when WML does not return any content or tool call (#1835)
yoavkatz Jun 19, 2025
2d21259
Arena hard fix (#1836)
bnayahu Jun 23, 2025
eb49d91
Add full generated text when running infer_log_prob() with meta data…
yoavkatz Jun 23, 2025
07ea3e4
Improved parsing of MT bench style scores (#1839)
yoavkatz Jun 23, 2025
3db214e
Use os.path.join to create infer cache dir path (#1840)
martinscooper Jun 23, 2025
77b7999
changing text2sql subset metric logic
oktie Jun 24, 2025
4cd9b94
Merge remote-tracking branch 'origin/main' into text2sql-metrics-update
oktie Jun 24, 2025
49997db
text2sql subset metric fix
oktie Jun 24, 2025
717f0da
fixing text2sql tests
oktie Jun 25, 2025
bc89e2c
docs for text2sql util functions
oktie Jun 25, 2025
c1cc594
Merge branch 'main' into text2sql-metrics-update
oktie Jun 25, 2025
d4590bf
Merge branch 'main' into text2sql-metrics-update
elronbandel Jun 25, 2025
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
508 changes: 359 additions & 149 deletions prepare/metrics/text2sql_accuracy.py

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions prepare/tasks/text2sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,23 @@
"tasks.text2sql",
overwrite=True,
)

add_to_catalog(
Task(
input_fields={
"id": str,
"utterance": str,
"hint": Optional[str],
"db": SQLDatabase,
},
reference_fields={"query": str},
prediction_type=str,
metrics=[
"metrics.text2sql.execution_logic_accuracy",
"metrics.text2sql.non_execution_accuracy",
"metrics.anls",
],
),
"tasks.text2sql_logic",
overwrite=True,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"__type__": "sql_execution_accuracy"
}
18 changes: 18 additions & 0 deletions src/unitxt/catalog/tasks/text2sql_logic.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"__type__": "task",
"input_fields": {
"id": "str",
"utterance": "str",
"hint": "Optional[str]",
"db": "SQLDatabase"
},
"reference_fields": {
"query": "str"
},
"prediction_type": "str",
"metrics": [
"metrics.text2sql.execution_logic_accuracy",
"metrics.text2sql.non_execution_accuracy",
"metrics.anls"
]
}
2 changes: 1 addition & 1 deletion src/unitxt/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
from .span_lableing_operators import __file__ as _
from .split_utils import __file__ as _
from .splitters import __file__ as _
from .sql_utils import __file__ as _
from .standard import __file__ as _
from .stream import __file__ as _
from .stream_operators import __file__ as _
Expand All @@ -62,6 +61,7 @@
from .system_prompts import __file__ as _
from .task import __file__ as _
from .templates import __file__ as _
from .text2sql_utils import __file__ as _
from .text_utils import __file__ as _
from .type_utils import __file__ as _
from .types import __file__ as _
Expand Down
2 changes: 1 addition & 1 deletion src/unitxt/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,7 @@ class LoadFromAPI(Loader):
chunksize: int = 100000
loader_limit: Optional[int] = None
streaming: bool = False
api_key_env_var: Optional[str] = ""
api_key_env_var: Optional[str] = None
headers: Optional[Dict[str, Any]] = None
data_field: str = "data"
method: str = "GET"
Expand Down
2 changes: 1 addition & 1 deletion src/unitxt/metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
from .span_lableing_operators import __file__ as _
from .split_utils import __file__ as _
from .splitters import __file__ as _
from .sql_utils import __file__ as _
from .standard import __file__ as _
from .stream import __file__ as _
from .stream_operators import __file__ as _
Expand All @@ -60,6 +59,7 @@
from .system_prompts import __file__ as _
from .task import __file__ as _
from .templates import __file__ as _
from .text2sql_utils import __file__ as _
from .text_utils import __file__ as _
from .type_utils import __file__ as _
from .types import __file__ as _
Expand Down
Loading
Loading