ise-uiuc / TitanFuzz

64 stars 8 forks source link

Cannot set a non-string value as the PAD token when running bash scripts/demo_run_tf.sh #1

Open vraebfdsb opened 11 months ago

vraebfdsb commented 11 months ago

When I try to run bash scripts/demo_run_tf.sh, I encounter "Cannot set a non-string value as the PAD token". How can I resolve this?

Complete Output:

Current directory:  /home/src/run
Results will be dumped to:  /home/src/run/Results
[0 / 2] tf.nn.conv2d
output.returncode:  0
stdout>  Current directory:  /home/src/run
Results will be dumped to:  /home/src/run/Results
api:  tf.nn.conv2d
Initializing a SpanLM based model: facebook/incoder-1B ...
Max length: 2048
Cannot set a non-string value as the PAD token
vraebfdsb commented 11 months ago

This issue seems to be with the line self.tokenizer.pad_token = 0 in model.py.

stmzyh commented 8 months ago

Same problem. Have you solved this yet?

yonghyeon1064 commented 7 months ago

I have the same problem too. To solve this problem, I replaced self.tokenizer.pad_token = 0 with self.tokenizer.pad_token = '0' and it generated Results file. However, I'm wondering if this is the right result and if there is any impact on the algorithm.

TomasAndersonFang commented 2 weeks ago

I have the same problem too. To solve this problem, I replaced self.tokenizer.pad_token = 0 with self.tokenizer.pad_token = '0' and it generated Results file. However, I'm wondering if this is the right result and if there is any impact on the algorithm.

I think the authors should set the pad_token_id to 0 rather than pad_token, so we can fix it by setting self.tokenizer.pad_token_id = 0