mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-31 16:01:46 +00:00
move dataset to hf llamastack repo
This commit is contained in:
parent
72b2c885ee
commit
58c6138df1
3 changed files with 13 additions and 7 deletions
|
@ -9,13 +9,19 @@ from llama_stack.apis.common.type_system import ChatCompletionInputType, StringT
|
|||
from llama_stack.apis.datasetio import DatasetDef
|
||||
|
||||
# TODO: migrate these to meta-llama/ HF repo with finalized schema
|
||||
llamastack_mmlu_loose = DatasetDef(
|
||||
identifier="llamastack_mmlu_loose",
|
||||
url=URL(uri="https://huggingface.co/datasets/yanxi0830/ls-mmlu"),
|
||||
llamastack_mmlu = DatasetDef(
|
||||
identifier="llamastack_mmlu",
|
||||
url=URL(
|
||||
uri="https://huggingface.co/datasets/llamastack/Llama-3.2-1B-Instruct-evals"
|
||||
),
|
||||
dataset_schema={
|
||||
"input_query": StringType(),
|
||||
"expected_answer": StringType(),
|
||||
"chat_completion_input": ChatCompletionInputType(),
|
||||
},
|
||||
metadata={"path": "yanxi0830/ls-mmlu", "split": "train"},
|
||||
metadata={
|
||||
"path": "llamastack/Llama-3.2-1B-Instruct-evals",
|
||||
"name": "Llama-3.2-1B-Instruct-evals__mmlu__details",
|
||||
"split": "train",
|
||||
},
|
||||
)
|
|
@ -13,7 +13,7 @@ from llama_stack.providers.datatypes import DatasetsProtocolPrivate
|
|||
from llama_stack.providers.utils.datasetio.url_utils import get_dataframe_from_url
|
||||
|
||||
from .config import HuggingfaceDatasetIOConfig
|
||||
from .dataset_defs.llamastack_mmlu_loose import llamastack_mmlu_loose
|
||||
from .dataset_defs.llamastack_mmlu import llamastack_mmlu
|
||||
|
||||
|
||||
def load_hf_dataset(dataset_def: DatasetDef):
|
||||
|
@ -37,7 +37,7 @@ class HuggingfaceDatasetIOImpl(DatasetIO, DatasetsProtocolPrivate):
|
|||
|
||||
async def initialize(self) -> None:
|
||||
# pre-registered benchmark datasets
|
||||
self.pre_registered_datasets = [llamastack_mmlu_loose]
|
||||
self.pre_registered_datasets = [llamastack_mmlu]
|
||||
self.dataset_infos = {x.identifier: x for x in self.pre_registered_datasets}
|
||||
|
||||
async def shutdown(self) -> None: ...
|
||||
|
|
|
@ -8,6 +8,6 @@ from llama_stack.apis.eval import EvalTaskDef
|
|||
|
||||
meta_reference_mmlu = EvalTaskDef(
|
||||
identifier="meta-reference-mmlu",
|
||||
dataset_id="llamastack_mmlu_loose",
|
||||
dataset_id="llamastack_mmlu",
|
||||
scoring_functions=["meta-reference::regex_parser_multiple_choice_answer"],
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue