Query data from Google BigQuery and convert to evaluation format
EvaluationRow
format for evaluation.
Parameter | Type | Description |
---|---|---|
transform_fn | callable | Function to transform BigQuery rows |
dataset_id | string | Google Cloud project ID (optional) |
credentials_path | string | Path to service account JSON file (optional) |
location | string | Default location for BigQuery jobs (optional) |
Parameter | Type | Description |
---|---|---|
query | string | SQL query to execute |
query_params | List[QueryParameter] | Optional query parameters |
limit | int | Maximum number of rows to return |
offset | int | Number of rows to skip |
model_name | string | Model name for completion parameters |
temperature | float | Temperature for completion parameters |
max_tokens | int | Max tokens for completion parameters |
['item1', 'item2', 'item3']
)transform_fn
will receive Python lists that you need to handle appropriately - whether by joining them into strings, taking specific elements, or processing them as needed for your evaluation use case.tokens
(arrays) and years
(array of records)BigQuery Data Viewer
and BigQuery Job User
)
pip install 'eval-protocol[bigquery]'
LIMIT
clauses or breaking into smaller batches