-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Fix smolagents benchmark #1377
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
Fix smolagents benchmark #1377
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"execution_count": 17, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
|
@@ -23,15 +23,15 @@ | |
"\n", | ||
"# Evaluation dataset\n", | ||
"# - the dataset is gated, so you must first visit its page to request access: https://huggingface.co/datasets/smolagents-benchmark/benchmark-v1\n", | ||
"EVAL_DATASET = \"smolagents-benchmark/benchmark-v1\"\n", | ||
"EVAL_DATASET = \"smolagents/benchmark-v1\"\n", | ||
"\n", | ||
"# Answers dataset: it must be a gated dataset; required to score the answers\n", | ||
"ANSWERS_DATASET = \"smolagents-benchmark/answers\"\n", | ||
"ANSWERS_DATASET = \"smolagents/answers\"\n", | ||
"# Whether to push the answers dataset to the Hub\n", | ||
"PUSH_ANSWERS_DATASET_TO_HUB = True\n", | ||
"\n", | ||
"# Results dataset\n", | ||
"RESULTS_DATASET = \"smolagents-benchmark/results\"\n", | ||
"RESULTS_DATASET = \"smolagents/results\"\n", | ||
"# Whether to push the results dataset to the Hub\n", | ||
"PUSH_RESULTS_DATASET_TO_HUB = True" | ||
] | ||
|
@@ -45,7 +45,7 @@ | |
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"execution_count": 18, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
|
@@ -189,6 +189,18 @@ | |
" push_to_hub_dataset=RESULTS_DATASET if PUSH_RESULTS_DATASET_TO_HUB else None,\n", | ||
" set_default=True,\n", | ||
"):\n", | ||
" \"\"\"\n", | ||
" Score answers from the given dataset subsets.\n", | ||
"\n", | ||
" Parameters:\n", | ||
" answers_subsets: List of dataset subsets to score\n", | ||
" answers_dataset: Dataset containing the answers\n", | ||
" date: Date to use for the config name\n", | ||
" push_to_hub_dataset: Dataset ID to push results to, or None to skip pushing\n", | ||
" set_default: If True, sets this config as the default config in the Hugging Face Hub dataset.\n", | ||
" This means when users load the dataset without specifying a config,\n", | ||
" this version will be loaded by default.\n", | ||
" \"\"\"\n", | ||
" if not answers_dataset:\n", | ||
" raise ValueError(\"Pass 'answers_dataset' to load the answers from it\")\n", | ||
" date = date or datetime.date.today().isoformat()\n", | ||
|
@@ -206,10 +218,7 @@ | |
" if push_to_hub_dataset:\n", | ||
" ds = datasets.Dataset.from_pandas(df)\n", | ||
" config = date\n", | ||
" set_default = set_default\n", | ||
" ds.push_to_hub(\n", | ||
" push_to_hub_dataset, config_name=config, set_default=set_default, commit_message=f\"Upload {config} results\"\n", | ||
" )\n", | ||
" ds.push_to_hub(push_to_hub_dataset, config_name=config, commit_message=f\"Upload {config} results\")\n", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @albertvillanova removed the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am trying to figure out what the error was, when it was generated, and how to fix it... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I opened a PR in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Until the fix is released, I would suggest not passing |
||
" return df" | ||
] | ||
}, | ||
|
@@ -244,7 +253,7 @@ | |
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"execution_count": 12, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
|
@@ -370,9 +379,9 @@ | |
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "test", | ||
"display_name": "agents", | ||
"language": "python", | ||
"name": "test" | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
|
Uh oh!
There was an error while loading. Please reload this page.