Delete data file
Browse files- process.txt +0 -65
process.txt
DELETED
|
@@ -1,65 +0,0 @@
|
|
| 1 |
-
|
| 2 |
-
# this is a small derivative from 8M-big openwebtext dataset for testing
|
| 3 |
-
|
| 4 |
-
# how this build script and dataset_infos.json were generated
|
| 5 |
-
|
| 6 |
-
#
|
| 7 |
-
|
| 8 |
-
mkdir openwebtext-10k
|
| 9 |
-
cd openwebtext-10k
|
| 10 |
-
|
| 11 |
-
# data
|
| 12 |
-
wget https://zenodo.org/record/3834942/files/openwebtext.tar.xz
|
| 13 |
-
tar xf openwebtext.tar.xz
|
| 14 |
-
cd openwebtext
|
| 15 |
-
rename.pl 's|-|-00|; s|-00(\d\d\d)|-$1|; s|-00(\d\d)|-0$1|;' *xz
|
| 16 |
-
|
| 17 |
-
# now open the first 30 archives
|
| 18 |
-
mkdir subset
|
| 19 |
-
cp urlsf_subset00-0[0-2]*_data.xz subset
|
| 20 |
-
cd subset
|
| 21 |
-
find . -name "*xz" -exec tar xf {} \;
|
| 22 |
-
mkdir 10k
|
| 23 |
-
find . -name "*txt" | sort | head -10000 | xargs mv -t 10k
|
| 24 |
-
tar cfJ 10k.xz -C 10k .
|
| 25 |
-
mkdir openwebtext-10k
|
| 26 |
-
mv 10k.xz openwebtext-10k
|
| 27 |
-
tar cfJ openwebtext-10k.tar.xz openwebtext-10k
|
| 28 |
-
# the openwebtext subdir gets created on the fly
|
| 29 |
-
aws s3 cp openwebtext-10k.tar.xz s3://datasets.huggingface.co/nlp/datasets/openwebtext/
|
| 30 |
-
|
| 31 |
-
# script
|
| 32 |
-
wget https://raw.githubusercontent.com/huggingface/datasets/master/datasets/openwebtext/openwebtext.py
|
| 33 |
-
mv openwebtext.py openwebtext-10k.py
|
| 34 |
-
perl -pi -e 's|openwebtext|openwebtext-10k|g' openwebtext-10k.py
|
| 35 |
-
perl -pi -e 's|https://zenodo.org/record/3834942/files/|https://cdn-datasets.huggingface.co/nlp/datasets/openwebtext/|g' openwebtext-10k.py
|
| 36 |
-
perl -pi -e 's|Openwebtext|Openwebtext10k|g' openwebtext-10k.py
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
# manually check that the script is correct - edit the descriptions
|
| 41 |
-
|
| 42 |
-
# create a new dataset entry on the hub
|
| 43 |
-
https://huggingface.co/new-dataset
|
| 44 |
-
|
| 45 |
-
# once created clone it
|
| 46 |
-
git clone https://huggingface.co/datasets/stas/openwebtext-10k
|
| 47 |
-
cp openwebtext-10k.py process.txt openwebtext-10k
|
| 48 |
-
cd openwebtext-10k
|
| 49 |
-
|
| 50 |
-
git add openwebtext-10k.py process.txt
|
| 51 |
-
git commit -m "build script" openwebtext-10k.py process.txt
|
| 52 |
-
git push
|
| 53 |
-
|
| 54 |
-
# test and generate config file
|
| 55 |
-
cd ..
|
| 56 |
-
datasets-cli test ./openwebtext-10k --save_infos --all_configs
|
| 57 |
-
|
| 58 |
-
# add and push the generated config
|
| 59 |
-
cd openwebtext-10k
|
| 60 |
-
git add dataset_infos.json
|
| 61 |
-
git commit -m "add dataset_infos.json" dataset_infos.json
|
| 62 |
-
git push
|
| 63 |
-
|
| 64 |
-
# test that the dataset is working
|
| 65 |
-
python -c "from datasets import load_dataset; ds=load_dataset('stas/openwebtext-10k'); print(ds)"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|