amazon-science / polygon-transformer

Apache License 2.0
128 stars 8 forks source link

Single-task training #20

Closed LFUSST closed 4 months ago

LFUSST commented 9 months ago

Excellent work, thank you for the open source! But I meet with some problems.I would like to know that two individual tasks, REC and RIS, can be trained and tested separately without using pre-training. Looking forward to hearing from you!

joellliu commented 9 months ago

Hi, you can modify the codes for individual tasks. Please refer to https://github.com/amazon-science/polygon-transformer/issues/15 as well.

LFUSST commented 8 months ago

Hello and thanks for your reply. I made the modification as described above, but I ran into a new issue. I got the following key error.

Traceback (most recent call last): File "../../evaluate.py", line 185, in cli_main() File "../../evaluate.py", line 180, in cli_main vis_dir=args.vis_dir, vis=args.vis, result_dir=args.result_dir File "//mnt/sda/lf/polyformer/fairseq/fairseq/distributed/utils.py", line 372, in call_main distributed_main(cfg.distributed_training.device_id, main, cfg, kwargs) File "//mnt/sda/lf/polyformer/fairseq/fairseq/distributed/utils.py", line 346, in distributed_main main(cfg, kwargs) File "../../evaluate.py", line 151, in main result, scores, f_scores, ap_scores, cum_I, cum_U = eval_step(task, generator, models, sample, kwargs) File "/mnt/sda/lf/polyformer/utils/eval_utils.py", line 210, in eval_step return eval_refcoco(task, generator, models, sample, **kwargs) File "/mnt/sda/lf/polyformer/utils/eval_utils.py", line 187, in eval_refcoco gt = sample['label'] KeyError: 'label'