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

About consis_model.py : Using reberta-base instead of xlm-roberta-base? #4

Open
Fang-git0 opened this issue Nov 1, 2023 · 4 comments

Comments

@Fang-git0
Copy link

The line: AutoTokenizer.from_pretrained("/data/lilinfang/clv/xlm-roberta-base")
use this can work out well.

however your code is
The line: RobertaTokenizer.from_pretrained("/data/lilinfang/clv/xlm-roberta-base")
got problem as follows
OSError: Can't load tokenizer for '/data/lilinfang/clv/xlm-roberta-base'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure '/data/lilinfang/clv/xlm-roberta-base' is the correct path to a directory containing all relevant files for a RobertaTokenizer tokenizer.

I guess you maybe use reberta-base instead of xlm-roberta-base?
thank you and looking for replying.

您好我想知道您用的reberta是xlm-reberta-base还是reberta-base,根据加载方式我判断是后者,前者运行会出错。感谢您的回复

@Toyhom
Copy link
Owner

Toyhom commented Nov 1, 2023 via email

@Fang-git0
Copy link
Author

Fang-git0 commented Nov 1, 2023

感谢您的回复,我已经调整。
运行过程中产生了一些新的问题,
Traceback (most recent call last):
File "/data/lilinfang/clv/Consis_Model.py", line 362, in
dm.setup('fit')
File "/data/lilinfang/clv/Consis_Model.py", line 40, in setup
with open(os.getcwd() + self.data_path[0] + "_train.txt",encoding='utf-8') as f:
AttributeError: 'Consis_Data' object has no attribute 'data_path'

代码这里
class Consis_Data(pl.LightningDataModule):
def init(self):
super().init()
self.dataset_train = None
self.dataset_valid = None
self.batch_size = 16
config = Config()
data_language = config.data_language
请问使用的数据集文件还是code中Data文件夹内的相同格式数据集吗?这里valid和train对应test和train的俩个文件路径吗?

@Toyhom
Copy link
Owner

Toyhom commented Nov 1, 2023 via email

@Fang-git0
Copy link
Author

Fang-git0 commented Nov 1, 2023 via email

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