Commit 8cbb5924 authored by Hongkun Yu's avatar Hongkun Yu Committed by A. Unique TensorFlower
Browse files

Rename tagging_data_loader to tagging_dataloader for consistent naming.

PiperOrigin-RevId: 327179271
parent 1b5b2fe4
......@@ -19,7 +19,7 @@ import os
import numpy as np
import tensorflow as tf
from official.nlp.data import tagging_data_loader
from official.nlp.data import tagging_dataloader
def _create_fake_dataset(output_path, seq_length):
......@@ -51,12 +51,12 @@ class TaggingDataLoaderTest(tf.test.TestCase):
batch_size = 10
train_data_path = os.path.join(self.get_temp_dir(), 'train.tf_record')
_create_fake_dataset(train_data_path, seq_length)
data_config = tagging_data_loader.TaggingDataConfig(
data_config = tagging_dataloader.TaggingDataConfig(
input_path=train_data_path,
seq_length=seq_length,
global_batch_size=batch_size)
dataset = tagging_data_loader.TaggingDataLoader(data_config).load()
dataset = tagging_dataloader.TaggingDataLoader(data_config).load()
features, labels = next(iter(dataset))
self.assertCountEqual(['input_word_ids', 'input_mask', 'input_type_ids'],
features.keys())
......
......@@ -23,7 +23,7 @@ import tensorflow as tf
from official.nlp.bert import configs
from official.nlp.bert import export_tfhub
from official.nlp.configs import encoders
from official.nlp.data import tagging_data_loader
from official.nlp.data import tagging_dataloader
from official.nlp.tasks import tagging
......@@ -56,7 +56,7 @@ class TaggingTest(tf.test.TestCase):
super(TaggingTest, self).setUp()
self._encoder_config = encoders.EncoderConfig(
bert=encoders.BertEncoderConfig(vocab_size=30522, num_layers=1))
self._train_data_config = tagging_data_loader.TaggingDataConfig(
self._train_data_config = tagging_dataloader.TaggingDataConfig(
input_path="dummy", seq_length=128, global_batch_size=1)
def _run_task(self, config):
......@@ -181,7 +181,7 @@ class TaggingTest(tf.test.TestCase):
seq_length=seq_length,
num_labels=len(task_config.class_names),
num_examples=num_examples)
test_data_config = tagging_data_loader.TaggingDataConfig(
test_data_config = tagging_dataloader.TaggingDataConfig(
input_path=test_data_path,
seq_length=seq_length,
is_training=False,
......
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