Skip to content

Commit

Permalink
fix: add args.min_target_length (#1560)
Browse files Browse the repository at this point in the history
  • Loading branch information
gongenlei authored Jan 7, 2022
1 parent 54f2f06 commit be5299e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/text_summarization/bart/run_summarization.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import sys
import os
import argparse
import random
Expand Down Expand Up @@ -303,7 +302,8 @@ def do_train(args):
if global_step % args.save_steps == 0 or global_step == num_training_steps:
tic_eval = time.time()
evaluate(model, dev_data_loader, tokenizer,
args.ignore_pad_token_for_loss, args.max_target_length)
args.ignore_pad_token_for_loss, args.min_target_length,
args.max_target_length)
logger.info("eval done total : %s s" % (time.time() - tic_eval))
if paddle.distributed.get_rank() == 0:
output_dir = os.path.join(
Expand Down

0 comments on commit be5299e

Please sign in to comment.