-
Notifications
You must be signed in to change notification settings - Fork 1.3k
chore(wren-ai-service): fix eval issues #1987
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughRefactors SQL quoting/error handling across utils and engine by normalizing backticks to double quotes, improving error propagation/logging, and adjusting parameter passing. Extends prediction flow to load Spider datasets into Postgres. Updates environment version pins. Minor formatting and comment removals without functional impact. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor U as User/Runner
participant P as eval/prediction.py
participant FS as Filesystem
participant PG as Postgres
U->>P: run prediction(db_name, settings)
P->>FS: set eval_data_db_path
alt db_name starts with "spider_"
P->>PG: load_eval_data_db_to_postgres(db_name, path)
PG-->>P: load complete
else db_name starts with "bird_"
P->>PG: load_eval_data_db_to_postgres(db_name, path)
PG-->>P: load complete
end
P-->>U: continue prediction pipeline
sequenceDiagram
autonumber
participant C as Caller (utils/prep)
participant E as engine.add_quotes
participant G as sqlglot
note over E: Preprocess: replace ` with "
C->>E: add_quotes(sql)
E->>G: transpile(sql_normalized)
alt success
G-->>E: quoted_sql
E-->>C: quoted_sql, no error
else error
G-->>E: exception
E-->>C: original_sql, error
note over C: Log error with details, assert/fallback paths
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (6)
🧰 Additional context used🧬 Code graph analysis (3)wren-ai-service/eval/data_curation/utils.py (1)
wren-ai-service/eval/prediction.py (1)
wren-ai-service/eval/utils.py (1)
🪛 dotenv-linter (3.3.0)wren-ai-service/tools/dev/.env[warning] 14-14: [UnorderedKey] The WREN_ENGINE_VERSION key should go before the WREN_PRODUCT_VERSION key (UnorderedKey) [warning] 15-15: [UnorderedKey] The WREN_AI_SERVICE_VERSION key should go before the WREN_ENGINE_VERSION key (UnorderedKey) [warning] 16-16: [UnorderedKey] The IBIS_SERVER_VERSION key should go before the WREN_AI_SERVICE_VERSION key (UnorderedKey) ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (9)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit
Bug Fixes
Refactor
Chores