(args)
| 187 | |
| 188 | |
| 189 | def start_train(args): |
| 190 | cfg = setup(args) |
| 191 | if args.eval_only: |
| 192 | model = Trainer.build_model(cfg) |
| 193 | DetectionCheckpointer(model, save_dir=cfg.OUTPUT_DIR).resume_or_load( |
| 194 | cfg.MODEL.WEIGHTS, resume=args.resume |
| 195 | ) |
| 196 | res = Trainer.test(cfg, model) |
| 197 | if cfg.TEST.AUG.ENABLED: |
| 198 | res.update(Trainer.test_with_TTA(cfg, model)) |
| 199 | if comm.is_main_process(): |
| 200 | verify_results(cfg, res) |
| 201 | return res |
| 202 | trainer = Trainer(cfg, resume=args.resume, reuse_ckpt=args.no_pretrain) |
| 203 | return trainer.train() |
nothing calls this directly
no test coverage detected