You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
总是报错这个问题:
Traceback (most recent call last):
File "/home/izuna/zyx/RecBole-GNN-main/run_recbole_gnn.py", line 19, in
run_recbole_gnn(model=args.model, dataset=args.dataset, config_file_list=config_file_list)
File "/home/izuna/zyx/RecBole-GNN-main/recbole_gnn/quick_start.py", line 48, in run_recbole_gnn
best_valid_score, best_valid_result = trainer.fit(
File "/home/izuna/zyx/rec/recbole/trainer/trainer.py", line 466, in fit
valid_score, valid_result = self._valid_epoch(
File "/home/izuna/zyx/rec/recbole/trainer/trainer.py", line 285, in _valid_epoch
valid_result = self.evaluate(
File "/opt/miniconda/envs/bole/lib/python3.10/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/home/izuna/zyx/rec/recbole/trainer/trainer.py", line 618, in evaluate
interaction, scores, positive_u, positive_i = eval_func(batched_data)
File "/home/izuna/zyx/rec/recbole/trainer/trainer.py", line 556, in _neg_sample_batch_eval
batch_user_num = positive_u[-1] + 1
TypeError: 'NoneType' object is not subscriptable
总是报错这个问题:
Traceback (most recent call last):
File "/home/izuna/zyx/RecBole-GNN-main/run_recbole_gnn.py", line 19, in
run_recbole_gnn(model=args.model, dataset=args.dataset, config_file_list=config_file_list)
File "/home/izuna/zyx/RecBole-GNN-main/recbole_gnn/quick_start.py", line 48, in run_recbole_gnn
best_valid_score, best_valid_result = trainer.fit(
File "/home/izuna/zyx/rec/recbole/trainer/trainer.py", line 466, in fit
valid_score, valid_result = self._valid_epoch(
File "/home/izuna/zyx/rec/recbole/trainer/trainer.py", line 285, in _valid_epoch
valid_result = self.evaluate(
File "/opt/miniconda/envs/bole/lib/python3.10/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/home/izuna/zyx/rec/recbole/trainer/trainer.py", line 618, in evaluate
interaction, scores, positive_u, positive_i = eval_func(batched_data)
File "/home/izuna/zyx/rec/recbole/trainer/trainer.py", line 556, in _neg_sample_batch_eval
batch_user_num = positive_u[-1] + 1
TypeError: 'NoneType' object is not subscriptable
我的配置文件如下:
embedding_size: 64
leakyrelu_alpha: 0.2
dropout_local: 0.
dropout_global: 0.5
dropout_gcn: 0.
loss_type: CE
gnn_transform: sess_graph
global
build_global_graph: True
sample_num: 12
hop: 1
field: ~
topk: [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
use_gpu: True
gpu_id: 0 # 根据实际情况设置 GPU 设备编号
seed: 2
dataset config
field_separator: " " #指定数据集field的分隔符
seq_separator: " " #指定数据集中token_seq或者float_seq域里的分隔符
USER_ID_FIELD: user_id #指定用户id域
ITEM_ID_FIELD: item_id #指定物品id域
RATING_FIELD: rating #指定打分rating域
#指定从什么文件里读什么列,这里就是从ml-1m.inter里面读取user_id, item_id, rating, timestamp这四列
load_col:
inter: [user_id, item_id, timestamp, rating]
TIME_FIELD: timestamp
training settings
#epochs: 2000 #训练的最大轮数
epochs: 2000 #训练的最大轮数
train_batch_size: 2048
learner: adam #使用的pytorch内置优化器
learning_rate: 0.01 #学习率
training_neg_sample_num: 0 #负采样数目
LABEL_FIELD: label #指定标签域
eval_type: 2
The text was updated successfully, but these errors were encountered: