Load_dataset error (running locally with my own dataset)

Hey everyone!

I have tried running the model locally using my own dataset its not working, I have tried it again with the lamini_docs.json file locally, still not working.

I have got this error:

FileNotFoundError: Couldn’t find any data file at \P4FineTuning\content\lamini_docs.jsonl.

I would appreciate any help.
Regards,
M

Hi @maalh13
The message says the code cannot find the json file. You can do some things:

  • Check if the path name is correct. It seems there is an extra ‘l’ in the extension name.
  • It seems you are running on Windows. It that is the case, add the driver letter in the pathname
  • In Windows, use double backslash (\)
    Hope this can help you.

Thank you Carlosrl for your replay.

  1. yes the name and extension are correct (“jsonl file extension is basically the same as JSON format but implemented using newline characters to separate JSON values”) It is the same as the dataset used in the labs " lamini_docs.jsonl"

  2. I have done that still doesn’t work.
    ((dataset_name = “P4.jsonl”
    dataset_path =
    "C:/Users/M/Drive/Desktop/P4FineTuning/MyData/{dataset_name}))

  3. to be honest I have not tried this one.

But I have tried this and it worked:
train_data_file = {“train_dataset”:“train_dataset.jsonl”}
train_dataset = load_dataset(path=‘C:/Path/to/My/file/MyData/’, data_files=train_data_file)

I still doesn’t know how or why, but it did.

I really appreciate your input.

when you run the files/metadata you download gets saved in a folder where you saved your file and that’s the same path you had to recall, and you did, so it worked.