Created
March 26, 2020 05:46
-
-
Save mikewcasale/99f786c20e213d097c9c005c625466fb to your computer and use it in GitHub Desktop.
narcissus
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
t5.data.TaskRegistry.remove('narcissus') | |
t5.data.TaskRegistry.add( | |
"narcissus", | |
# Supply a function which returns a tf.data.Dataset. | |
dataset_fn=ds_func, | |
splits=["train", "valid"], | |
# Supply a function which preprocesses text from the tf.data.Dataset. | |
text_preprocessor=[, | |
lambda sample: t5.data.preprocessors.prefix_lm(sample, label='article: ') | |
], | |
# Use the same vocabulary that we used for pre-training. | |
sentencepiece_model_path=t5.data.DEFAULT_SPM_PATH, | |
# Lowercase targets before computing metrics. | |
postprocess_fn=t5.data.postprocessors.lower_text, | |
# We'll use accuracy as our evaluation metric. | |
metric_fns=[t5.evaluation.metrics.accuracy], | |
# Not required, but helps for mixing and auto-caching. | |
num_input_examples=num_nq_examples | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment