Skip to content
This repository was archived by the owner on Jan 21, 2025. It is now read-only.

Remove unused vocab argument from dataset function calls. #217

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions mesh_tensorflow/transformer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1429,7 +1429,6 @@ def score_from_dataset(estimator, vocabulary, batch_size, sequence_length,
"""
scoring_datasets = score_dataset_fn(
sequence_length=sequence_length,
vocabulary=vocabulary,
dataset_split=dataset_split)

def input_fn(params):
Expand Down Expand Up @@ -1598,7 +1597,6 @@ def input_fn(params):

dataset = train_dataset_fn(
sequence_length=sequence_length,
vocabulary=vocabulary,
dataset_split=dataset_split)
dataset = dataset.repeat().batch(
batch_size * (ensemble_inputs or 1), drop_remainder=True)
Expand Down Expand Up @@ -1713,7 +1711,6 @@ def eval_model(estimator, vocabulary, sequence_length, batch_size,

eval_datasets = eval_dataset_fn(
sequence_length=sequence_length,
vocabulary=vocabulary,
dataset_split=dataset_split,
)

Expand Down Expand Up @@ -2356,7 +2353,6 @@ def run(tpu_job_name,
name="eval",
dataset_fn=functools.partial(train_dataset_fn,
sequence_length=sequence_length,
vocabulary=vocabulary,
dataset_split=dataset_split),
postprocess_fn=None,
metric_fns=None)]
Expand All @@ -2367,7 +2363,6 @@ def run(tpu_job_name,
else:
eval_datasets = eval_dataset_fn(
sequence_length=sequence_length,
vocabulary=vocabulary,
dataset_split=dataset_split,
)
def _input_fn(params, eval_dataset):
Expand Down