Spaces:
Sleeping
Sleeping
github-actions[bot] commited on
Commit ·
7315a86
1
Parent(s): 4e73462
Sync from GitHub main @ 508802bb2319ec29cbe11d142c736177c0b438d9
Browse files- .dockerignore +6 -0
- nl2sql/pipeline.py +0 -24
.dockerignore
CHANGED
|
@@ -41,3 +41,9 @@ data/tmp/
|
|
| 41 |
# Generated benchmark outputs
|
| 42 |
benchmarks/results*/
|
| 43 |
benchmarks/results_pro/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
# Generated benchmark outputs
|
| 42 |
benchmarks/results*/
|
| 43 |
benchmarks/results_pro/
|
| 44 |
+
|
| 45 |
+
# temporary python files
|
| 46 |
+
*_temp.py
|
| 47 |
+
temp_*.py
|
| 48 |
+
**/temp_*.py
|
| 49 |
+
**/*_temp.py
|
nl2sql/pipeline.py
CHANGED
|
@@ -356,11 +356,6 @@ class Pipeline:
|
|
| 356 |
max_attempts=1,
|
| 357 |
**planner_kwargs,
|
| 358 |
)
|
| 359 |
-
dt = (time.perf_counter() - t0) * 1000.0
|
| 360 |
-
stage_duration_ms.labels("planner").observe(dt)
|
| 361 |
-
traces.extend(self._trace_list(r_plan))
|
| 362 |
-
if not getattr(r_plan, "trace", None):
|
| 363 |
-
_fallback_trace("planner", dt, r_plan.ok)
|
| 364 |
if not r_plan.ok:
|
| 365 |
pipeline_runs_total.labels(status="error").inc()
|
| 366 |
return FinalResult(
|
|
@@ -399,11 +394,6 @@ class Pipeline:
|
|
| 399 |
max_attempts=1,
|
| 400 |
**gen_kwargs,
|
| 401 |
)
|
| 402 |
-
dt = (time.perf_counter() - t0) * 1000.0
|
| 403 |
-
stage_duration_ms.labels("generator").observe(dt)
|
| 404 |
-
traces.extend(self._trace_list(r_gen))
|
| 405 |
-
if not getattr(r_gen, "trace", None):
|
| 406 |
-
_fallback_trace("generator", dt, r_gen.ok)
|
| 407 |
if not r_gen.ok:
|
| 408 |
pipeline_runs_total.labels(status="error").inc()
|
| 409 |
return FinalResult(
|
|
@@ -478,11 +468,6 @@ class Pipeline:
|
|
| 478 |
sql=sql,
|
| 479 |
traces=traces,
|
| 480 |
)
|
| 481 |
-
dt = (time.perf_counter() - t0) * 1000.0
|
| 482 |
-
stage_duration_ms.labels("safety").observe(dt)
|
| 483 |
-
traces.extend(self._trace_list(r_safe))
|
| 484 |
-
if not getattr(r_safe, "trace", None):
|
| 485 |
-
_fallback_trace("safety", dt, r_safe.ok)
|
| 486 |
if not r_safe.ok:
|
| 487 |
pipeline_runs_total.labels(status="error").inc()
|
| 488 |
return FinalResult(
|
|
@@ -511,11 +496,6 @@ class Pipeline:
|
|
| 511 |
sql=sql,
|
| 512 |
traces=traces,
|
| 513 |
)
|
| 514 |
-
dt = (time.perf_counter() - t0) * 1000.0
|
| 515 |
-
stage_duration_ms.labels("executor").observe(dt)
|
| 516 |
-
traces.extend(self._trace_list(r_exec))
|
| 517 |
-
if not getattr(r_exec, "trace", None):
|
| 518 |
-
_fallback_trace("executor", dt, r_exec.ok)
|
| 519 |
if not r_exec.ok and r_exec.error:
|
| 520 |
details.extend(
|
| 521 |
r_exec.error
|
|
@@ -536,10 +516,6 @@ class Pipeline:
|
|
| 536 |
exec_result=(r_exec.data or {}),
|
| 537 |
traces=traces,
|
| 538 |
)
|
| 539 |
-
dt = (time.perf_counter() - t0) * 1000.0
|
| 540 |
-
stage_duration_ms.labels("verifier").observe(dt)
|
| 541 |
-
|
| 542 |
-
# Traces
|
| 543 |
|
| 544 |
# If verifier (or its repair) produced a new SQL, consume it
|
| 545 |
if r_ver.data and isinstance(r_ver.data, dict):
|
|
|
|
| 356 |
max_attempts=1,
|
| 357 |
**planner_kwargs,
|
| 358 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 359 |
if not r_plan.ok:
|
| 360 |
pipeline_runs_total.labels(status="error").inc()
|
| 361 |
return FinalResult(
|
|
|
|
| 394 |
max_attempts=1,
|
| 395 |
**gen_kwargs,
|
| 396 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 397 |
if not r_gen.ok:
|
| 398 |
pipeline_runs_total.labels(status="error").inc()
|
| 399 |
return FinalResult(
|
|
|
|
| 468 |
sql=sql,
|
| 469 |
traces=traces,
|
| 470 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 471 |
if not r_safe.ok:
|
| 472 |
pipeline_runs_total.labels(status="error").inc()
|
| 473 |
return FinalResult(
|
|
|
|
| 496 |
sql=sql,
|
| 497 |
traces=traces,
|
| 498 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 499 |
if not r_exec.ok and r_exec.error:
|
| 500 |
details.extend(
|
| 501 |
r_exec.error
|
|
|
|
| 516 |
exec_result=(r_exec.data or {}),
|
| 517 |
traces=traces,
|
| 518 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 519 |
|
| 520 |
# If verifier (or its repair) produced a new SQL, consume it
|
| 521 |
if r_ver.data and isinstance(r_ver.data, dict):
|