[s2s] save first batch to json for debugging purposes (#6810)

This commit is contained in:
Sam Shleifer
2020-10-06 16:11:56 -04:00
committed by GitHub
parent 2b574e7c60
commit 500be01c5d
2 changed files with 20 additions and 0 deletions

View File

@@ -422,6 +422,10 @@ def test_finetune(model):
assert bart.decoder.embed_tokens == bart.encoder.embed_tokens
assert bart.decoder.embed_tokens == bart.shared
example_batch = load_json(module.output_dir / "text_batch.json")
assert isinstance(example_batch, dict)
assert len(example_batch) >= 4
def test_finetune_extra_model_args():
args_d: dict = CHEAP_ARGS.copy()