Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vraebfdsb opened this issue Oct 11, 2023 · 4 comments

Comments

@vraebfdsb
Copy link

vraebfdsb commented Oct 11, 2023

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
Copy link
Author

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

@stmzyh
Copy link

stmzyh commented Jan 17, 2024

Same problem. Have you solved this yet?

@yonghyeon1064
Copy link

yonghyeon1064 commented Feb 21, 2024

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants