Skip to content
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

Add new Loader from Huggingface space #857

Closed
yoavkatz opened this issue May 21, 2024 · 0 comments
Closed

Add new Loader from Huggingface space #857

yoavkatz opened this issue May 21, 2024 · 0 comments
Assignees

Comments

@yoavkatz
Copy link
Member

Some data is available in Huggingface spaces and not HF datasets.

We'd like a custom loader from Huggingface spaces.

class LoadFromHFSpace(Loader):
    user_name: str
    space_name:str
    data_files: Mapping[str, str]]

    _requirements_list: List[str] = ["hf_hub_download"]

    def process(self):
      ... Use hf_hub_download API to download the data_files and create a dataseg

As an example, download the file

https://github.com/lm-sys/FastChat/blob/main/fastchat/llm_judge/data/mt_bench/question.jsonl

and use it

in

prepare/cards/mt_bench/generation/english_single_turn.py

Later replace the use OfirArviv/mt_bench_pairwise_comparison_gpt4_judgments

in unitxt/prepare/cards/mt_bench/response_assessment/pairwise_comparison/single_turn_gpt4_judgement.py

with download of the files from

https://github.com/lm-sys/FastChat/blob/main/fastchat/llm_judge/data/mt_bench/reference_answer/gpt-4.jsonl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants