(args)
| 380 | |
| 381 | |
| 382 | def create_module(args): |
| 383 | t5 = "t5" in args.model_name_or_path |
| 384 | if args.no_teacher: |
| 385 | assert not args.enc_only |
| 386 | module_cls = SummarizationModule |
| 387 | elif t5: |
| 388 | module_cls = T5SummarizationDistiller |
| 389 | elif args.enc_only: |
| 390 | raise ValueError("Deleted that") |
| 391 | else: |
| 392 | module_cls = BartSummarizationDistiller |
| 393 | args.setup_cls: str = module_cls.__name__ |
| 394 | model = module_cls(args) |
| 395 | return model |
| 396 | |
| 397 | |
| 398 | def evaluate_checkpoint(ckpt_path: Path, dest_dir=None): |
no outgoing calls
no test coverage detected