Closed sqhan-Husky closed 1 year ago
I find that the parameter skip_special_tokens
can output the split identification of <extra_id_x>
,and currently the output is <pad><s><extra_id_0>user = user print<extra_id_1>world!') print ( f'hello world!{user
.
The length of the output is truncated by the setting of max_length, and it cannot predict a correct ending label of the output.
If l set the max_length to 100
, the output is <pad><s><extra_id_0>user = user print<extra_id_1>world!') print ( f'hello world!{user}')print(f'hello world!{user}')print(f'hello world!{user}')print(f'hello world!{user}')print(f'hello world!{user}')print(f'hello world!{user}')print(f'hello world!{user}')print(f'hello world!{user}')print
.
Why this output?
Hello, thank you for the great work. l have a question about how to infer from multiple code spans related to the updation on Sep 24, 2021. The case you shown is that
"def greet(user): print(f'hello <extra_id_0>!')"
and the prediction is"{user.username}"
. What if l want to predict multiple spans in one code input?For example, l learned from T5 that a pair of input and its label can be:
However, this way seems to be failed in CodeT5. When l input
"def greet(user): <extra_id_0>(f'hello <extra_id_1>!')"
, the prediction outputs"user = user print"
, without any identification of which span the output belongs to.Can you show us some examples of the input and the corresponding label with multiple spans in one code input?