Skip to content

Commit

Permalink
readme and run fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Shayne13 committed Apr 10, 2023
1 parent 4fde744 commit 7b33ac0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
3 changes: 1 addition & 2 deletions flan/v2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ The Flan Collection of datasets and data augmentation methods for instruction tu

## Setup
```
pip install --upgrade pip
pip install -r flan/v2/requirements.txt
bash setup.sh
```

## List of Mixtures
Expand Down
5 changes: 3 additions & 2 deletions flan/v2/run_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,11 @@
# If you would like to take min(1 epoch, NUM_SAMPLES) then use dataset.take(NUM_SAMPLES)
# Or if you would like to gather a full epoch, simply `enumerate(dataset)` until completion.
for i, ex in enumerate(dataset.take(NUM_SAMPLES)):
source_counter[ex["_task_source"].numpy()] += 1
source_counter[ex["_task_name"].numpy()] += 1
save_data.append((ex["inputs_pretokenized"].numpy().decode(),
ex["targets_pretokenized"].numpy().decode()))
if i % 100000 == 0:
print(i)

print(f"Data Submixture Counts: {source_counter}")

print(save_data[0])
13 changes: 13 additions & 0 deletions flan/v2/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
pip install --upgrade pip
pip install -r flan/v2/requirements.txt

unzip flan/v2/niv2_few_shot_data/niv2_exemplars.jsonl-00000-of-00010.zip -d flan/v2/niv2_few_shot_data/
unzip flan/v2/niv2_few_shot_data/niv2_exemplars.jsonl-00001-of-00010.zip -d flan/v2/niv2_few_shot_data/
unzip flan/v2/niv2_few_shot_data/niv2_exemplars.jsonl-00002-of-00010.zip -d flan/v2/niv2_few_shot_data/
unzip flan/v2/niv2_few_shot_data/niv2_exemplars.jsonl-00003-of-00010.zip -d flan/v2/niv2_few_shot_data/
unzip flan/v2/niv2_few_shot_data/niv2_exemplars.jsonl-00004-of-00010.zip -d flan/v2/niv2_few_shot_data/
unzip flan/v2/niv2_few_shot_data/niv2_exemplars.jsonl-00005-of-00010.zip -d flan/v2/niv2_few_shot_data/
unzip flan/v2/niv2_few_shot_data/niv2_exemplars.jsonl-00006-of-00010.zip -d flan/v2/niv2_few_shot_data/
unzip flan/v2/niv2_few_shot_data/niv2_exemplars.jsonl-00007-of-00010.zip -d flan/v2/niv2_few_shot_data/
unzip flan/v2/niv2_few_shot_data/niv2_exemplars.jsonl-00008-of-00010.zip -d flan/v2/niv2_few_shot_data/
unzip flan/v2/niv2_few_shot_data/niv2_exemplars.jsonl-00009-of-00010.zip -d flan/v2/niv2_few_shot_data/

0 comments on commit 7b33ac0

Please sign in to comment.