facebookresearch / SimulEval

SimulEval: A General Evaluation Toolkit for Simultaneous Translation
Creative Commons Attribution Share Alike 4.0 International
102 stars 36 forks source link

Auto register dataloader #90

Closed ibanesh closed 11 months ago

ibanesh commented 11 months ago

Registering a dataloader seems to happen when importing that daloader module, but if we want to use the simuleval cli for running inference directly we would want a way to register the dataloader that is passed in as an arg.

This PR will enable doing something like :

simuleval --agent seamless_communication/src/seamless_communication/agents/mma_m4t_s2t.py --agent-class seamless_communication.agents.mma_m4t_s2t.MonotonicM4TS2TSPMAgent --source-segment-size 320 --dataloader="fairseq2_s2tt" --data-file /large_experiments/seamless/ust/abinesh/data/m4tv2/dev_mtedx_filt_50-10_debug.tsv --task s2tt --device "cuda:0" --dtype fp16 --output MonotonicM4TS2TSPMAgent-debug --dataloader-class seamless_communication.agents.dataloader.SCSpeechToTextDataloader