<p dir="auto">Hi everybody,</p>
<p dir="auto">I’ve tried using BART summarisation code, and I had a question about finetune.py</p>
<p dir="auto">Can SummarisationTrainer checkpoint be loaded as a BartForConditionalGeneration model from the evaluation script?</p>
<h1 dir="auto"><g-emoji class="g-emoji" alias="question" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2753.png">❓</g-emoji> Questions &amp; Help</h1>
<h2 dir="auto">Details</h2>
<p dir="auto">I fine-tuned the BART model on a custom summarization dataset using the <strong>transformers/examples/summarization/bart/finetune.py</strong> and <strong>transformers/examples/summarization/bart/run_train.sh</strong> files in the repository for training (which generated three <em>checkpointepoch=*.ckpt</em> files) and prediction (which generated a <em>.txt</em> file with the test loss scores).</p>
<p dir="auto">I have two questions on using this model for prediction:</p>
<ul dir="auto">
<li>
<p dir="auto">How can I modify <em>finetune.py</em> to generate predictions for the test set, in addition to the loss scores? I see some test functions in <em>finetune.py</em>, but I'm not sure how to use these for generating a <em>.txt</em> file with the predictions.</p>
</li>
<li>
<p dir="auto">How can I load the generated <em>.ckpt</em> files into BartForConditionalGeneration()? A <em>config.json</em> file was not generated along with the checkpoint files; there doesn't seem to be a TFBartForConditionalGeneration; and the <em>convert_tf_checkpoint_to_pytorch.py</em> script in the repo doesn't seem to support BART yet.</p>
</li>
</ul>
<p dir="auto">Thank you for your time!</p>