Skip to content

Commit

Permalink
added proper paths in dataprocesser
Browse files Browse the repository at this point in the history
  • Loading branch information
kamalkraj committed Nov 4, 2019
1 parent 02df084 commit bc80452
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ following sections:
export GLUE_DIR=glue_data/
export ALBERT_DIR=large/

export TASK_NAME=COLA
export TASK_NAME=CoLA
export OUTPUT_DIR=cola_processed
mkdir $OUTPUT_DIR

python create_finetuning_data.py \
--input_data_dir=${GLUE_DIR}/${TASK_NAME}/ \
--input_data_dir=${GLUE_DIR}/ \
--spm_model_file=${ALBERT_DIR}/vocab/30k-clean.model \
--train_data_output_path=${OUTPUT_DIR}/${TASK_NAME}_train.tf_record \
--eval_data_output_path=${OUTPUT_DIR}/${TASK_NAME}_eval.tf_record \
Expand Down
18 changes: 9 additions & 9 deletions classifier_data_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,18 +173,18 @@ class MnliProcessor(DataProcessor):
def get_train_examples(self, data_dir):
"""See base class."""
return self._create_examples(
self._read_tsv(os.path.join(data_dir, "train.tsv")), "train")
self._read_tsv(os.path.join(data_dir, "MNLI", "train.tsv")), "train")

def get_dev_examples(self, data_dir):
"""See base class."""
return self._create_examples(
self._read_tsv(os.path.join(data_dir, "dev_matched.tsv")),
self._read_tsv(os.path.join(data_dir, "MNLI", "dev_matched.tsv")),
"dev_matched")

def get_test_examples(self, data_dir):
"""See base class."""
return self._create_examples(
self._read_tsv(os.path.join(data_dir, "test_matched.tsv")), "test")
self._read_tsv(os.path.join(data_dir, "MNLI", "test_matched.tsv")), "test")

def get_labels(self):
"""See base class."""
Expand Down Expand Up @@ -220,17 +220,17 @@ class MrpcProcessor(DataProcessor):
def get_train_examples(self, data_dir):
"""See base class."""
return self._create_examples(
self._read_tsv(os.path.join(data_dir, "train.tsv")), "train")
self._read_tsv(os.path.join(data_dir, "MRPC", "train.tsv")), "train")

def get_dev_examples(self, data_dir):
"""See base class."""
return self._create_examples(
self._read_tsv(os.path.join(data_dir, "dev.tsv")), "dev")
self._read_tsv(os.path.join(data_dir, "MRPC", "dev.tsv")), "dev")

def get_test_examples(self, data_dir):
"""See base class."""
return self._create_examples(
self._read_tsv(os.path.join(data_dir, "test.tsv")), "test")
self._read_tsv(os.path.join(data_dir, "MRPC", "test.tsv")), "test")

def get_labels(self):
"""See base class."""
Expand Down Expand Up @@ -266,17 +266,17 @@ class ColaProcessor(DataProcessor):
def get_train_examples(self, data_dir):
"""See base class."""
return self._create_examples(
self._read_tsv(os.path.join(data_dir, "train.tsv")), "train")
self._read_tsv(os.path.join(data_dir, "CoLA", "train.tsv")), "train")

def get_dev_examples(self, data_dir):
"""See base class."""
return self._create_examples(
self._read_tsv(os.path.join(data_dir, "dev.tsv")), "dev")
self._read_tsv(os.path.join(data_dir, "CoLA", "dev.tsv")), "dev")

def get_test_examples(self, data_dir):
"""See base class."""
return self._create_examples(
self._read_tsv(os.path.join(data_dir, "test.tsv")), "test")
self._read_tsv(os.path.join(data_dir, "CoLA", "test.tsv")), "test")

def get_labels(self):
"""See base class."""
Expand Down

0 comments on commit bc80452

Please sign in to comment.