tensor2tensor
tensor2tensor copied to clipboard
seq2edits_textnorm NotImplementedError
Description
I am very happy to see that seq2edits code can open source. I printed the “problems.available()“ of tensor2ten and found that there are 12 PROBLEMs about seq2edits. I selected "PROBLEM = "seq2edits_gec"" and run the following code:
$ PROBLEM = "seq2edits_gec"
$ t2t-datagen \
--data_dir=$DATA_DIR \
--tmp_dir=$TMP_DIR \
--problem=$PROBLEM \
--t2t_usr_dir=$USR_DIR
Error logs:
File "*/tensor2tensor/data_generators/text_problems.py", line 360, in generate_data
if self.is_generate_per_split:
File "*/tensor2tensor/data_generators/text_problems.py", line 89, in is_generate_per_split
raise NotImplementedError()
NotImplementedError
So, I checked "*/tensor2tensor/data_generators/seq2edits.py" and found that there is no implementation of the function "is_generate_per_split" in all classes of seq2edits.py, and there is also no implementation of the function "generate_samples".
How can I implement the two keys functions of "is_generate_per_split" and "generate_samples" in seq2edits.py.
I am very much looking forward to getting a reply. Thanks.