tagoyal / sow-reap-paraphrasing

Contains data/code for the paper "Neural Syntactic Preordering for Controlled Paraphrase Generation" (ACL 2020).
76 stars 9 forks source link

Specify parser datatype for "device_ids" #4

Closed atreyasha closed 3 years ago

atreyasha commented 4 years ago

In the argument parsers for all the generate_paraphrases* python files, the argument device_ids does not have its data type specified. As a result, non-default specifications such as --device_ids 0 lead to the parser reading 0 as a string instead of an integer, which leads to CUDA runtime errors.

I propose the following amendment:

parser.add_argument('--device_ids', default=1, type=int,
                    help='device ids assignment')

The affected lines are below:

https://github.com/tagoyal/sow-reap-paraphrasing/blob/master/generate_paraphrases_baseline.py#L19

https://github.com/tagoyal/sow-reap-paraphrasing/blob/master/generate_paraphrases_gt_reap.py#L19

https://github.com/tagoyal/sow-reap-paraphrasing/blob/master/generate_paraphrases_sow_reap.py#L30