Open bachml opened 11 months ago
您好! @bachml 推测这里您没有指定数据所在的路径,因此RecBole-CDR无法找到对应的数据。 您可以通过设置'data_path'参数来制定数据路径,修改我们的标准配置如下:
source_domain:
dataset: DoubanBook
data_path: dataset/Douban/
USER_ID_FIELD: user_id
ITEM_ID_FIELD: item_id
RATING_FIELD: rating
TIME_FIELD: timestamp
NEG_PREFIX: neg_
LABEL_FIELD: label
load_col:
inter: [user_id, item_id, rating]
user_inter_num_interval: "[5,inf)"
item_inter_num_interval: "[5,inf)"
val_interval:
rating: "[3,inf)"
drop_filter_field: True
target_domain:
dataset: DoubanMovie
data_path: dataset/Douban/
USER_ID_FIELD: user_id
ITEM_ID_FIELD: item_id
RATING_FIELD: rating
TIME_FIELD: timestamp
NEG_PREFIX: neg_
LABEL_FIELD: label
load_col:
inter: [user_id, item_id, rating]
user_inter_num_interval: "[5,inf)"
item_inter_num_interval: "[5,inf)"
val_interval:
rating: "[3,inf)"
drop_filter_field: True
epochs: 500
train_batch_size: 4096
eval_batch_size: 409600
valid_metric: NDCG@10
另外关于使用文档,我们继承自主工具包RecBole,绝大多数使用细节是相通的,您可以参考RecBole的使用文档来进行对照。
@bachml [Solved] Solution: change the local "overall.yaml" file I had faced similar error: you can edit in this file --RecBole/recbole/properties/overall.yaml --line number 8: "data_path: 'dataset/" to >> data_path: '/content/RecBole/dataset/' (i was using Google colab)
你好,当我试图把训练数据集改为DoubanBook和DoubanMoive的时候报了以下错误:(我按照https://github.com/RUCAIBox/RecBole-CDR/blob/main/results/Douban.md的内容修改properties文件)
<module 'recbole_cdr.data.dataset' from '/data/guzeng/RecBole-CDR/recbole_cdr/data/dataset.py'> Traceback (most recent call last): File "run_recbole_cdr.py", line 22, in
run_recbole_cdr(model=args.model, config_file_list=config_file_list)
File "/data/guzeng/RecBole-CDR/recbole_cdr/quick_start/quick_start.py", line 41, in run_recbole_cdr
dataset = create_dataset(config)
File "/data/guzeng/RecBole-CDR/recbole_cdr/data/utils.py", line 72, in create_dataset
dataset = dataset_class(config)
File "/data/guzeng/RecBole-CDR/recbole_cdr/data/dataset.py", line 312, in init
self.source_domain_dataset = CrossDomainSingleDataset(source_config, domain='source')
File "/data/guzeng/RecBole-CDR/recbole_cdr/data/dataset.py", line 31, in init
super().init(config)
File "/data/guzeng/anaconda3/envs/py37/lib/python3.7/site-packages/recbole/data/dataset/dataset.py", line 96, in init
self._from_scratch()
File "/data/guzeng/anaconda3/envs/py37/lib/python3.7/site-packages/recbole/data/dataset/dataset.py", line 106, in _from_scratch
self._load_data(self.dataset_name, self.dataset_path)
File "/data/guzeng/anaconda3/envs/py37/lib/python3.7/site-packages/recbole/data/dataset/dataset.py", line 246, in _load_data
self._download()
File "/data/guzeng/anaconda3/envs/py37/lib/python3.7/site-packages/recbole/data/dataset/dataset.py", line 218, in _download
url = self._get_download_url('url')
File "/data/guzeng/anaconda3/envs/py37/lib/python3.7/site-packages/recbole/data/dataset/dataset.py", line 213, in _get_download_url
f'Neither [{self.dataset_path}] exists in the device'
ValueError: Neither [dataset/DoubanBook] exists in the devicenor [DoubanBook] a known dataset name.
请问RecBole-CDR有相关的使用文档吗?谢谢