# How to modify loaded dataset

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-modify-loaded-dataset%2F31870%3E%5C
**Category:** 🤗Datasets\
**Created:** [February 16, 2023, 11:41pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-modify-loaded-dataset%2F31870 "2023-02-16T23:41:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yolo1](https://avatars.discourse-cdn.com/v4/letter/y/51bf81/32.png) [@yolo1](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fyolo1)%5C
**Post date:** [February 16, 2023, 11:41pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-modify-loaded-dataset%2F31870%2F1 "2023-02-16T23:41:30Z")

</div>

Hi,  
I would like to ask how can I modify a loaded dataset to change the values of passages? and how can I check the details of the dataset? Currently, I am runing the example script from hugging face([transformers/run\_squad.py at main · huggingface/transformers · GitHub](https://github.com/huggingface/transformers/blob/main/examples/legacy/question-answering/run_squad.py)).

Besides, when I run the code by: python run\_squad.py --model\_type bert --model\_name\_or\_path bert-base-cased --do\_train --do\_eval --do\_lower\_case --train\_file $SQUAD\_DIR/train-v1.1.json --predict\_file $SQUAD\_DIR/dev-v1.1.json --per\_gpu\_train\_batch\_size 12 --learning\_rate 3e-5 --num\_train\_epochs 2.0 --max\_seq\_length 384 --doc\_stride 128 --output\_dir /tmp/debug\_squad/ .  
I have got an error: FileNotFoundError: [Errno 2] No such file or directory: ‘/train-v1.1.json’.  
How can I fix this problem?

Could someone please give me some ideas about how to operate the dataset. that would be much appreciated!!

---

<div class="post-metadata">

**Author:** ![polinaeterna](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/polinaeterna/32/19055_2.png) [@polinaeterna](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fpolinaeterna)%5C
**Post date:** [February 27, 2023, 1:10pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-modify-loaded-dataset%2F31870%2F2 "2023-02-27T13:10:36Z")

</div>

Hi @yolo1 ! You can use [`Dataset.map`](https://huggingface.co/docs/datasets/process#map) function to change values of examples. And with [`load_dataset_builder("your_dataset_name").info`](https://huggingface.co/docs/datasets/load_hub#load-a-dataset) you can check some metadata information about the dataset, as well as information about the features and sometimes dataset size.
