[Python] Hugging face with Colab Running Error (DatasetGenerationError: An error occurred...

Discussão em 'Python' iniciado por Stack, Junho 3, 2025.

  1. Stack

    Stack Membro Participativo

    Step 1: I want to running the below code in google colab. https://github.com/sachink1729/Finetuning-Mistral-7B-Chat-Doctor-Huggingface-LoRA-PEFT

    Step 2: Actually, it's the first time about using hugging face. Instead of "load_from_disk" (patients_query_sampled folder). Why? I don't know how I make this downloaded (Not github!. Donwloaded my personal PC). So, I've changed first code to below code.

    First code.

    from datasets import load_dataset, load_from_disk

    dataset = load_from_disk("patients_query_sampled/")

    train_dataset = dataset['train']
    eval_dataset = dataset['test']


    Modified Code

    !pip install -U datasets huggingface_hub fsspec

    from datasets import load_dataset, load_from_disk

    dataset = load_dataset("MyOwnHunggingFadce/patients_query_sampled")

    train_dataset = dataset['train']
    eval_dataset = dataset['test']


    But the error happened:


    DatasetGenerationError: An error occurred while generating the dataset
    ​

    I want to running this code block well running

    Continue reading...

Compartilhe esta Página