Commit 6398aa9e authored by Hafiz Shafruddin's avatar Hafiz Shafruddin Committed by Facebook Github Bot
Browse files

replace 'mkdir' with 'mkdir -p' (#997)

Summary:
Allow shell script to create sub directories with -p flag. Amends readme file too.
Pull Request resolved: https://github.com/pytorch/fairseq/pull/997

Differential Revision: D16710813

Pulled By: myleott

fbshipit-source-id: 89abefa27e8fac99d212fc9b7b0dbc3690043ba0
parent 439ead5a
...@@ -84,7 +84,7 @@ do ...@@ -84,7 +84,7 @@ do
# Strip out header and filter lines that don't have expected number of fields. # Strip out header and filter lines that don't have expected number of fields.
rm -rf "$TASK_DATA_FOLDER/processed" rm -rf "$TASK_DATA_FOLDER/processed"
mkdir "$TASK_DATA_FOLDER/processed" mkdir -p "$TASK_DATA_FOLDER/processed"
for SPLIT in $SPLITS for SPLIT in $SPLITS
do do
# CoLA train and dev doesn't have header. # CoLA train and dev doesn't have header.
...@@ -178,7 +178,7 @@ do ...@@ -178,7 +178,7 @@ do
--workers 60; --workers 60;
else else
# For STS-B output range is converted to be between: [0.0, 1.0] # For STS-B output range is converted to be between: [0.0, 1.0]
mkdir "$TASK-bin/label" mkdir -p "$TASK-bin/label"
awk '{print $1 / 5.0 }' "$TASK_DATA_FOLDER/processed/train.label" > "$TASK-bin/label/train.label" awk '{print $1 / 5.0 }' "$TASK_DATA_FOLDER/processed/train.label" > "$TASK-bin/label/train.label"
awk '{print $1 / 5.0 }' "$TASK_DATA_FOLDER/processed/dev.label" > "$TASK-bin/label/valid.label" awk '{print $1 / 5.0 }' "$TASK_DATA_FOLDER/processed/dev.label" > "$TASK-bin/label/valid.label"
fi fi
......
...@@ -17,7 +17,7 @@ Then: ...@@ -17,7 +17,7 @@ Then:
1. Extract the WMT'16 En-De data: 1. Extract the WMT'16 En-De data:
```bash ```bash
TEXT=wmt16_en_de_bpe32k TEXT=wmt16_en_de_bpe32k
mkdir $TEXT mkdir -p $TEXT
tar -xzvf wmt16_en_de.tar.gz -C $TEXT tar -xzvf wmt16_en_de.tar.gz -C $TEXT
``` ```
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment