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

有bug,找不到生成的tokenizer_config.json文件 #1

Open
tian211 opened this issue Apr 11, 2024 · 5 comments
Open

有bug,找不到生成的tokenizer_config.json文件 #1

tian211 opened this issue Apr 11, 2024 · 5 comments

Comments

@tian211
Copy link

tian211 commented Apr 11, 2024


FileNotFoundError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_9052/2870374046.py in
31 best_step = global_step
32 model.save_pretrained(save_dir)
---> 33 tokenizer.save_pretrained(save_dir)
34
35 loss.backward() # 反向传播计算梯度

c:\Users\86199\anaconda3\lib\site-packages\paddlenlp\transformers\tokenizer_utils_base.py in save_pretrained(self, save_directory, filename_prefix, **kwargs)
1708 tokenizer_config["tokenizer_class"] = tokenizer_class
1709
-> 1710 with io.open(tokenizer_config_file, "w", encoding="utf-8") as f:
1711 f.write(json.dumps(tokenizer_config, ensure_ascii=False))
1712 logger.info(f"tokenizer config file saved in {tokenizer_config_file}")

FileNotFoundError: [Errno 2] No such file or directory: 'model/2024-04-11/lr=1e-05-epochs=10-wp=0.1-wd=0.01\tokenizer_config.json'

@haolian123
Copy link
Owner

haolian123 commented Apr 14, 2024 via email

@tian211
Copy link
Author

tian211 commented Apr 14, 2024 via email

@tian211
Copy link
Author

tian211 commented Apr 15, 2024

@haolian123 非常感谢作者大大百忙之中抽出时间解答了我的问题,确实是文件路径的格式问题,目前正在学习nip方向,感觉内容很丰富,所以下载学习学习。再次感谢您

@tian211
Copy link
Author

tian211 commented Apr 25, 2024 via email

@tian211
Copy link
Author

tian211 commented Jun 17, 2024

你用的是什么系统?如果是windows,可能是反斜杠导致的,不同系统的反斜杠可能会导致路径问题,\tokenizer_config.json'这个斜杠的方向和其它不一样,可以自己改改。

------------------ 原始邮件 ------------------ 发件人: "haolian123/Sentence-level-sentiment-analysis-and-depression-risk-inference" @.>; 发送时间: 2024年4月12日(星期五) 上午6:47 @.>; @.**>; 主题: [haolian123/Sentence-level-sentiment-analysis-and-depression-risk-inference] 有bug,找不到生成的tokenizer_config.json文件 (Issue #1) FileNotFoundError Traceback (most recent call last) ~\AppData\Local\Temp/ipykernel_9052/2870374046.py in 31 best_step = global_step 32 model.save_pretrained(save_dir) ---> 33 tokenizer.save_pretrained(save_dir) 34 35 loss.backward() # 反向传播计算梯度 c:\Users\86199\anaconda3\lib\site-packages\paddlenlp\transformers\tokenizer_utils_base.py in save_pretrained(self, save_directory, filename_prefix, kwargs) 1708 tokenizer_config["tokenizer_class"] = tokenizer_class 1709 -> 1710 with io.open(tokenizer_config_file, "w", encoding="utf-8") as f: 1711 f.write(json.dumps(tokenizer_config, ensure_ascii=False)) 1712 logger.info(f"tokenizer config file saved in {tokenizer_config_file}") FileNotFoundError: [Errno 2] No such file or directory: 'model/2024-04-11/lr=1e-05-epochs=10-wp=0.1-wd=0.01\tokenizer_config.json' — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.>

@tian211 tian211 closed this as completed Jun 17, 2024
@tian211 tian211 reopened this Jun 17, 2024
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

2 participants