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] GCMC Hyper_tuning 'numpy.random.mtrand.RandomState' object has no attribute 'integers' #1240

Closed
GitHub-ZHY opened this issue Apr 7, 2022 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@GitHub-ZHY
Copy link

描述这个 bug
GCMC Hyper_tuning 代码不通,总是有不同的模型会在Hp时报这个Bug,rng.integers(low, high, size) no intergers。

如何复现
复现这个 bug 的步骤:

  1. 您引入的额外 yaml 文件
  • gcmc.yaml
    embedding_size: 64
    sparse_feature: True
    class_num: 2
    learner: adam
    weight_decay: 0.995
    train_batch_size: 4096
    eval_batch_size: 40960000
    metrics: ["Recall","NDCG","Hit","Precision","MRR"]
    topk: [ 1,2,5,10,20,40,50,60,80,100 ]
    valid_metric: Recall@20

  • hyper.gcmc
    learning_rate choice [0.01]
    dropout_prob choice [0.3,0.4,0.5,0.6,0.7,0.8]
    accum choice ['stack','sum']
    gcn_output_dim choice [256,500,1024]
    num_basis_functions choice ['2']

  1. 您的代码

  2. 您的运行脚本
    --model=GCMC --config_files=GCMC.yaml --dataset='ml-1m' --config_files=GCMC.yaml --params_file=hyper.gcmc --output_file=hyper_gcmc_ml1m.result

预期
通。

屏幕截图
Connected to pydev debugger (build 211.6693.115)

ERROR in rec_eval
EXCEPTION
<class 'AttributeError'>
'numpy.random.mtrand.RandomState' object has no attribute 'integers'
NODE
0 randint
1 Literal{1}
2 size =
3 len
4 array_union
5 array_union
6 array_union
7 Literal{new_ids}
8 rng =
9 Literal{rng-placeholder}

0%| | 0/36 [00:00<?, ?trial/s, best loss=?]
Traceback (most recent call last):
File "/home//anaconda3/envs//lib/python3.8/contextlib.py", line 131, in exit
self.gen.throw(type, value, traceback)
File "/home//anaconda3/envs//lib/python3.8/site-packages/hyperopt/progress.py", line 25, in tqdm_progress_callback
yield pbar
File "/home//anaconda3/envs//lib/python3.8/site-packages/hyperopt/fmin.py", line 278, in run
new_trials = algo(
File "/home///RecBole/recbole/trainer/hyper_tuning.py", line 110, in exhaustive_search
idxs, vals = pyll.rec_eval(domain.s_idxs_vals, memo={
File "/home//anaconda3/envs//lib/python3.8/site-packages/hyperopt/pyll/base.py", line 902, in rec_eval
rval = scope._impls[node.name](*args, **kwargs)
File "/home//anaconda3/envs//lib/python3.8/site-packages/hyperopt/pyll/stochastic.py", line 100, in randint
return rng.integers(low, high, size)
AttributeError: 'numpy.random.mtrand.RandomState' object has no attribute 'integers'

Process finished with exit code 1

链接
None

实验环境(请补全下列信息):

  • 操作系统: [Windows]
  • RecBole 版本 [0.1.0]
  • Python 版本 [3.8]
  • PyTorch 版本 [如 1.8.1]
  • cudatoolkit 版本 [11.4]
@GitHub-ZHY GitHub-ZHY added the bug Something isn't working label Apr 7, 2022
@Ethan-TZ Ethan-TZ self-assigned this Apr 7, 2022
@Ethan-TZ
Copy link
Member

Ethan-TZ commented Apr 7, 2022

@GitHub-ZHY 您好,感谢您的关注!
我们在#1192中修复了这个bug,请使用最新源码重新安装RecBole。

@Ethan-TZ
Copy link
Member

Ethan-TZ commented Apr 7, 2022 via email

@GitHub-ZHY
Copy link
Author

@chenyuwuxin 您好,上述问题或因服务器环境问题引起,然而我又发现一个新问题。即yaml内配置 learner 后,虽运行单组run_recbole调试时打印出相应的 learner 但是训练结果损失函数不下降,与此同时,指标结果时有下降时而保持不变,而且最终训练结果是保持不变的,无论其他参数如何修改。

@GitHub-ZHY
Copy link
Author

@chenyuwuxin 配置文件如下:# general
gpu_id: 0
use_gpu: True
seed: 2022
state: INFO
reproducibility: True
#data_path: 'dataset/ml-1m'
checkpoint_dir: 'saved'
show_progress: True
save_dataset: False
dataset_save_path: None
save_dataloaders: False
dataloaders_save_path: None
log_wandb: False
wandb_project: 'recbole'

training settings

epochs: 300
train_batch_size: 4096
learner: adam
learning_rate: 0.01
neg_sampling:
uniform: 1
eval_step: 1
stopping_step: 10
#clip_grad_norm: ~

clip_grad_norm: {'max_norm': 5, 'norm_type': 2}

weight_decay: 0.995
loss_decimal_place: 4
require_pow: False

evaluation settings

eval_args:
split: {'RS':[0.8,0.1,0.1]}
group_by: user
order: RO
mode: full
repeatable: False
metrics: ["Recall","NDCG","Hit","Precision","MRR"]
topk: [ 1,2,5,10,20,40,50,60,80,100 ]
valid_metric: Recall@20
valid_metric_bigger: True
eval_batch_size: 40960000
metric_decimal_place: 4

Other Hyper Parameters:

#accum: stack
embedding_size: 64
sparse_feature: True
class_num: 2
dropout_prob: 0.3
gcn_output_dim: 256
num_basis_functions: 2

@GitHub-ZHY
Copy link
Author

Trainable parameters: 4914196
Train 0: 100%|████████████████████████| 197/197 [00:14<00:00, 13.62it/s, GPU RAM: 0.28 G/6.00 G]
07 Apr 23:13 INFO epoch 0 training [time: 14.47s, train loss: 136.5497]
Evaluate : 100%|████████████████████████████| 1/1 [00:00<00:00, 3.95it/s, GPU RAM: 0.78 G/6.00 G]
07 Apr 23:13 INFO epoch 0 evaluating [time: 0.29s, valid_score: 0.007500]
07 Apr 23:13 INFO valid result:
recall@10 : 0.0024 mrr@10 : 0.0075 ndcg@10 : 0.0032 hit@10 : 0.0311 precision@10 : 0.0032
07 Apr 23:13 INFO Saving current: saved\GCMC-Apr-07-2022_23-13-04.pth
Train 1: 100%|████████████████████████| 197/197 [00:14<00:00, 14.04it/s, GPU RAM: 0.78 G/6.00 G]
07 Apr 23:13 INFO epoch 1 training [time: 14.03s, train loss: 136.5497]
Evaluate : 100%|████████████████████████████| 1/1 [00:00<00:00, 4.08it/s, GPU RAM: 0.78 G/6.00 G]
07 Apr 23:13 INFO epoch 1 evaluating [time: 0.31s, valid_score: 0.004600]
07 Apr 23:13 INFO valid result:
recall@10 : 0.0022 mrr@10 : 0.0046 ndcg@10 : 0.0026 hit@10 : 0.0275 precision@10 : 0.003
Train 2: 100%|████████████████████████| 197/197 [00:13<00:00, 14.15it/s, GPU RAM: 0.78 G/6.00 G]
07 Apr 23:13 INFO epoch 2 training [time: 13.92s, train loss: 136.5497]
Evaluate : 100%|████████████████████████████| 1/1 [00:00<00:00, 4.05it/s, GPU RAM: 0.78 G/6.00 G]
07 Apr 23:13 INFO epoch 2 evaluating [time: 0.29s, valid_score: 0.068100]
07 Apr 23:13 INFO valid result:
recall@10 : 0.0185 mrr@10 : 0.0681 ndcg@10 : 0.0299 hit@10 : 0.2066 precision@10 : 0.0269
07 Apr 23:13 INFO Saving current: saved\GCMC-Apr-07-2022_23-13-04.pth
Train 3: 100%|████████████████████████| 197/197 [00:14<00:00, 13.93it/s, GPU RAM: 0.78 G/6.00 G]
07 Apr 23:14 INFO epoch 3 training [time: 14.15s, train loss: 136.5497]
Evaluate : 100%|████████████████████████████| 1/1 [00:00<00:00, 3.91it/s, GPU RAM: 0.78 G/6.00 G]
07 Apr 23:14 INFO epoch 3 evaluating [time: 0.31s, valid_score: 0.068100]
07 Apr 23:14 INFO valid result:
recall@10 : 0.0185 mrr@10 : 0.0681 ndcg@10 : 0.0299 hit@10 : 0.2066 precision@10 : 0.0269
07 Apr 23:14 INFO Saving current: saved\GCMC-Apr-07-2022_23-13-04.pth

@GitHub-ZHY
Copy link
Author

accum:sum, dropout_prob:0.8, gcn_output_dim:256, learning_rate:0.01, num_basis_functions:2
Valid result:
recall@1 : 0.0013 recall@2 : 0.0027 recall@5 : 0.0074 recall@10 : 0.0134 recall@20 : 0.0258 recall@40 : 0.0568 recall@50 : 0.072 recall@60 : 0.0858 recall@80 : 0.1162 recall@100 : 0.1511 ndcg@1 : 0.022 ndcg@2 : 0.023 ndcg@5 : 0.0242 ndcg@10 : 0.0245 ndcg@20 : 0.0276 ndcg@40 : 0.0382 ndcg@50 : 0.0437 ndcg@60 : 0.0486 ndcg@80 : 0.0589 ndcg@100 : 0.0703 hit@1 : 0.022 hit@2 : 0.0455 hit@5 : 0.1093 hit@10 : 0.1811 hit@20 : 0.2889 hit@40 : 0.4546 hit@50 : 0.5157 hit@60 : 0.5596 hit@80 : 0.6399 hit@100 : 0.706 precision@1 : 0.022 precision@2 : 0.0233 precision@5 : 0.024 precision@10 : 0.0225 precision@20 : 0.0219 precision@40 : 0.0228 precision@50 : 0.0231 precision@60 : 0.0229 precision@80 : 0.0228 precision@100 : 0.0232 mrr@1 : 0.022 mrr@2 : 0.0338 mrr@5 : 0.051 mrr@10 : 0.0603 mrr@20 : 0.0676 mrr@40 : 0.0733 mrr@50 : 0.0747 mrr@60 : 0.0754 mrr@80 : 0.0766 mrr@100 : 0.0773
Test result:
recall@1 : 0.0015 recall@2 : 0.003 recall@5 : 0.0076 recall@10 : 0.0133 recall@20 : 0.0252 recall@40 : 0.0588 recall@50 : 0.0762 recall@60 : 0.0914 recall@80 : 0.1217 recall@100 : 0.1572 ndcg@1 : 0.0265 ndcg@2 : 0.0266 ndcg@5 : 0.0259 ndcg@10 : 0.026 ndcg@20 : 0.0288 ndcg@40 : 0.0399 ndcg@50 : 0.0461 ndcg@60 : 0.0513 ndcg@80 : 0.0616 ndcg@100 : 0.0734 hit@1 : 0.0265 hit@2 : 0.0522 hit@5 : 0.1127 hit@10 : 0.1844 hit@20 : 0.2907 hit@40 : 0.4634 hit@50 : 0.5306 hit@60 : 0.5715 hit@80 : 0.6411 hit@100 : 0.7099 precision@1 : 0.0265 precision@2 : 0.0266 precision@5 : 0.025 precision@10 : 0.0236 precision@20 : 0.023 precision@40 : 0.0241 precision@50 : 0.0245 precision@60 : 0.0243 precision@80 : 0.024 precision@100 : 0.0245 mrr@1 : 0.0265 mrr@2 : 0.0393 mrr@5 : 0.0555 mrr@10 : 0.0649 mrr@20 : 0.072 mrr@40 : 0.0781 mrr@50 : 0.0796 mrr@60 : 0.0803 mrr@80 : 0.0813 mrr@100 : 0.0821

accum:sum, dropout_prob:0.5, gcn_output_dim:256, learning_rate:0.01, num_basis_functions:2
Valid result:
recall@1 : 0.0013 recall@2 : 0.0027 recall@5 : 0.0074 recall@10 : 0.0134 recall@20 : 0.0258 recall@40 : 0.0568 recall@50 : 0.072 recall@60 : 0.0858 recall@80 : 0.1162 recall@100 : 0.1511 ndcg@1 : 0.022 ndcg@2 : 0.023 ndcg@5 : 0.0242 ndcg@10 : 0.0245 ndcg@20 : 0.0276 ndcg@40 : 0.0382 ndcg@50 : 0.0437 ndcg@60 : 0.0486 ndcg@80 : 0.0589 ndcg@100 : 0.0703 hit@1 : 0.022 hit@2 : 0.0455 hit@5 : 0.1093 hit@10 : 0.1811 hit@20 : 0.2889 hit@40 : 0.4546 hit@50 : 0.5157 hit@60 : 0.5596 hit@80 : 0.6399 hit@100 : 0.706 precision@1 : 0.022 precision@2 : 0.0233 precision@5 : 0.024 precision@10 : 0.0225 precision@20 : 0.0219 precision@40 : 0.0228 precision@50 : 0.0231 precision@60 : 0.0229 precision@80 : 0.0228 precision@100 : 0.0232 mrr@1 : 0.022 mrr@2 : 0.0338 mrr@5 : 0.051 mrr@10 : 0.0603 mrr@20 : 0.0676 mrr@40 : 0.0733 mrr@50 : 0.0747 mrr@60 : 0.0754 mrr@80 : 0.0766 mrr@100 : 0.0773
Test result:
recall@1 : 0.0015 recall@2 : 0.003 recall@5 : 0.0076 recall@10 : 0.0133 recall@20 : 0.0252 recall@40 : 0.0588 recall@50 : 0.0762 recall@60 : 0.0914 recall@80 : 0.1217 recall@100 : 0.1572 ndcg@1 : 0.0265 ndcg@2 : 0.0266 ndcg@5 : 0.0259 ndcg@10 : 0.026 ndcg@20 : 0.0288 ndcg@40 : 0.0399 ndcg@50 : 0.0461 ndcg@60 : 0.0513 ndcg@80 : 0.0616 ndcg@100 : 0.0734 hit@1 : 0.0265 hit@2 : 0.0522 hit@5 : 0.1127 hit@10 : 0.1844 hit@20 : 0.2907 hit@40 : 0.4634 hit@50 : 0.5306 hit@60 : 0.5715 hit@80 : 0.6411 hit@100 : 0.7099 precision@1 : 0.0265 precision@2 : 0.0266 precision@5 : 0.025 precision@10 : 0.0236 precision@20 : 0.023 precision@40 : 0.0241 precision@50 : 0.0245 precision@60 : 0.0243 precision@80 : 0.024 precision@100 : 0.0245 mrr@1 : 0.0265 mrr@2 : 0.0393 mrr@5 : 0.0555 mrr@10 : 0.0649 mrr@20 : 0.072 mrr@40 : 0.0781 mrr@50 : 0.0796 mrr@60 : 0.0803 mrr@80 : 0.0813 mrr@100 : 0.0821

accum:sum, dropout_prob:0.3, gcn_output_dim:1024, learning_rate:0.01, num_basis_functions:2
Valid result:
recall@1 : 0.0013 recall@2 : 0.0027 recall@5 : 0.0074 recall@10 : 0.0134 recall@20 : 0.0258 recall@40 : 0.0568 recall@50 : 0.072 recall@60 : 0.0858 recall@80 : 0.1162 recall@100 : 0.1511 ndcg@1 : 0.022 ndcg@2 : 0.023 ndcg@5 : 0.0242 ndcg@10 : 0.0245 ndcg@20 : 0.0276 ndcg@40 : 0.0382 ndcg@50 : 0.0437 ndcg@60 : 0.0486 ndcg@80 : 0.0589 ndcg@100 : 0.0703 hit@1 : 0.022 hit@2 : 0.0455 hit@5 : 0.1093 hit@10 : 0.1811 hit@20 : 0.2889 hit@40 : 0.4546 hit@50 : 0.5157 hit@60 : 0.5596 hit@80 : 0.6399 hit@100 : 0.706 precision@1 : 0.022 precision@2 : 0.0233 precision@5 : 0.024 precision@10 : 0.0225 precision@20 : 0.0219 precision@40 : 0.0228 precision@50 : 0.0231 precision@60 : 0.0229 precision@80 : 0.0228 precision@100 : 0.0232 mrr@1 : 0.022 mrr@2 : 0.0338 mrr@5 : 0.051 mrr@10 : 0.0603 mrr@20 : 0.0676 mrr@40 : 0.0733 mrr@50 : 0.0747 mrr@60 : 0.0754 mrr@80 : 0.0766 mrr@100 : 0.0773
Test result:
recall@1 : 0.0015 recall@2 : 0.003 recall@5 : 0.0076 recall@10 : 0.0133 recall@20 : 0.0252 recall@40 : 0.0588 recall@50 : 0.0762 recall@60 : 0.0914 recall@80 : 0.1217 recall@100 : 0.1572 ndcg@1 : 0.0265 ndcg@2 : 0.0266 ndcg@5 : 0.0259 ndcg@10 : 0.026 ndcg@20 : 0.0288 ndcg@40 : 0.0399 ndcg@50 : 0.0461 ndcg@60 : 0.0513 ndcg@80 : 0.0616 ndcg@100 : 0.0734 hit@1 : 0.0265 hit@2 : 0.0522 hit@5 : 0.1127 hit@10 : 0.1844 hit@20 : 0.2907 hit@40 : 0.4634 hit@50 : 0.5306 hit@60 : 0.5715 hit@80 : 0.6411 hit@100 : 0.7099 precision@1 : 0.0265 precision@2 : 0.0266 precision@5 : 0.025 precision@10 : 0.0236 precision@20 : 0.023 precision@40 : 0.0241 precision@50 : 0.0245 precision@60 : 0.0243 precision@80 : 0.024 precision@100 : 0.0245 mrr@1 : 0.0265 mrr@2 : 0.0393 mrr@5 : 0.0555 mrr@10 : 0.0649 mrr@20 : 0.072 mrr@40 : 0.0781 mrr@50 : 0.0796 mrr@60 : 0.0803 mrr@80 : 0.0813 mrr@100 : 0.0821

accum:stack, dropout_prob:0.4, gcn_output_dim:500, learning_rate:0.01, num_basis_functions:2
Valid result:
recall@1 : 0.0013 recall@2 : 0.0027 recall@5 : 0.0074 recall@10 : 0.0134 recall@20 : 0.0258 recall@40 : 0.0568 recall@50 : 0.072 recall@60 : 0.0858 recall@80 : 0.1162 recall@100 : 0.1511 ndcg@1 : 0.022 ndcg@2 : 0.023 ndcg@5 : 0.0242 ndcg@10 : 0.0245 ndcg@20 : 0.0276 ndcg@40 : 0.0382 ndcg@50 : 0.0437 ndcg@60 : 0.0486 ndcg@80 : 0.0589 ndcg@100 : 0.0703 hit@1 : 0.022 hit@2 : 0.0455 hit@5 : 0.1093 hit@10 : 0.1811 hit@20 : 0.2889 hit@40 : 0.4546 hit@50 : 0.5157 hit@60 : 0.5596 hit@80 : 0.6399 hit@100 : 0.706 precision@1 : 0.022 precision@2 : 0.0233 precision@5 : 0.024 precision@10 : 0.0225 precision@20 : 0.0219 precision@40 : 0.0228 precision@50 : 0.0231 precision@60 : 0.0229 precision@80 : 0.0228 precision@100 : 0.0232 mrr@1 : 0.022 mrr@2 : 0.0338 mrr@5 : 0.051 mrr@10 : 0.0603 mrr@20 : 0.0676 mrr@40 : 0.0733 mrr@50 : 0.0747 mrr@60 : 0.0754 mrr@80 : 0.0766 mrr@100 : 0.0773
Test result:
recall@1 : 0.0015 recall@2 : 0.003 recall@5 : 0.0076 recall@10 : 0.0133 recall@20 : 0.0252 recall@40 : 0.0588 recall@50 : 0.0762 recall@60 : 0.0914 recall@80 : 0.1217 recall@100 : 0.1572 ndcg@1 : 0.0265 ndcg@2 : 0.0266 ndcg@5 : 0.0259 ndcg@10 : 0.026 ndcg@20 : 0.0288 ndcg@40 : 0.0399 ndcg@50 : 0.0461 ndcg@60 : 0.0513 ndcg@80 : 0.0616 ndcg@100 : 0.0734 hit@1 : 0.0265 hit@2 : 0.0522 hit@5 : 0.1127 hit@10 : 0.1844 hit@20 : 0.2907 hit@40 : 0.4634 hit@50 : 0.5306 hit@60 : 0.5715 hit@80 : 0.6411 hit@100 : 0.7099 precision@1 : 0.0265 precision@2 : 0.0266 precision@5 : 0.025 precision@10 : 0.0236 precision@20 : 0.023 precision@40 : 0.0241 precision@50 : 0.0245 precision@60 : 0.0243 precision@80 : 0.024 precision@100 : 0.0245 mrr@1 : 0.0265 mrr@2 : 0.0393 mrr@5 : 0.0555 mrr@10 : 0.0649 mrr@20 : 0.072 mrr@40 : 0.0781 mrr@50 : 0.0796 mrr@60 : 0.0803 mrr@80 : 0.0813 mrr@100 : 0.0821

accum:stack, dropout_prob:0.3, gcn_output_dim:500, learning_rate:0.01, num_basis_functions:2
Valid result:
recall@1 : 0.0013 recall@2 : 0.0027 recall@5 : 0.0074 recall@10 : 0.0134 recall@20 : 0.0258 recall@40 : 0.0568 recall@50 : 0.072 recall@60 : 0.0858 recall@80 : 0.1162 recall@100 : 0.1511 ndcg@1 : 0.022 ndcg@2 : 0.023 ndcg@5 : 0.0242 ndcg@10 : 0.0245 ndcg@20 : 0.0276 ndcg@40 : 0.0382 ndcg@50 : 0.0437 ndcg@60 : 0.0486 ndcg@80 : 0.0589 ndcg@100 : 0.0703 hit@1 : 0.022 hit@2 : 0.0455 hit@5 : 0.1093 hit@10 : 0.1811 hit@20 : 0.2889 hit@40 : 0.4546 hit@50 : 0.5157 hit@60 : 0.5596 hit@80 : 0.6399 hit@100 : 0.706 precision@1 : 0.022 precision@2 : 0.0233 precision@5 : 0.024 precision@10 : 0.0225 precision@20 : 0.0219 precision@40 : 0.0228 precision@50 : 0.0231 precision@60 : 0.0229 precision@80 : 0.0228 precision@100 : 0.0232 mrr@1 : 0.022 mrr@2 : 0.0338 mrr@5 : 0.051 mrr@10 : 0.0603 mrr@20 : 0.0676 mrr@40 : 0.0733 mrr@50 : 0.0747 mrr@60 : 0.0754 mrr@80 : 0.0766 mrr@100 : 0.0773
Test result:
recall@1 : 0.0015 recall@2 : 0.003 recall@5 : 0.0076 recall@10 : 0.0133 recall@20 : 0.0252 recall@40 : 0.0588 recall@50 : 0.0762 recall@60 : 0.0914 recall@80 : 0.1217 recall@100 : 0.1572 ndcg@1 : 0.0265 ndcg@2 : 0.0266 ndcg@5 : 0.0259 ndcg@10 : 0.026 ndcg@20 : 0.0288 ndcg@40 : 0.0399 ndcg@50 : 0.0461 ndcg@60 : 0.0513 ndcg@80 : 0.0616 ndcg@100 : 0.0734 hit@1 : 0.0265 hit@2 : 0.0522 hit@5 : 0.1127 hit@10 : 0.1844 hit@20 : 0.2907 hit@40 : 0.4634 hit@50 : 0.5306 hit@60 : 0.5715 hit@80 : 0.6411 hit@100 : 0.7099 precision@1 : 0.0265 precision@2 : 0.0266 precision@5 : 0.025 precision@10 : 0.0236 precision@20 : 0.023 precision@40 : 0.0241 precision@50 : 0.0245 precision@60 : 0.0243 precision@80 : 0.024 precision@100 : 0.0245 mrr@1 : 0.0265 mrr@2 : 0.0393 mrr@5 : 0.0555 mrr@10 : 0.0649 mrr@20 : 0.072 mrr@40 : 0.0781 mrr@50 : 0.0796 mrr@60 : 0.0803 mrr@80 : 0.0813 mrr@100 : 0.0821

@Ethan-TZ
Copy link
Member

Ethan-TZ commented Apr 8, 2022

@GitHub-ZHY 可能是配置出现了问题,general 类模型在ml-1m数据集运行的示例配置文件为:

# dataset config
field_separator: "\t"
seq_separator: " "
USER_ID_FIELD: user_id
ITEM_ID_FIELD: item_id
RATING_FIELD: rating
NEG_PREFIX: neg_
LABEL_FIELD: label
load_col:
    inter: [user_id, item_id, rating]
val_interval:
    rating: "[3,inf)"    
unused_col: 
    inter: [rating]

# training and evaluation
epochs: 500
train_batch_size: 4096
valid_metric: MRR@10

# model
embedding_size: 64

@wuxinran-Angel
Copy link

@GitHub-ZHY 您好,感谢您的关注! 我们在#1192中修复了这个bug,请使用最新源码重新安装RecBole。

您好 我在使用最新源码后 出现了和上述同样的问题;但使用之前的版本不会出现bug;

config

environment setting

show_progress: False

dataset settings

dataset: 'yoochoose-sample'
field_separator: "\t"
seq_separator: " "
USER_ID_FIELD: 'session_id'
load_col:
unused_col:
inter: [timestamp]

training settings

epochs: 300
train_batch_size: 4096
neg_sampling:

evaluation settings

eval_args:
split: {'RS': [0.8,0.1,0.1]}

split: {'LS': 'valid_and_test'}

order: 'TO'
mode: 'full'
group_by: 'none'
metrics: ['MRR', 'Recall']
topk: [20]
valid_metric: 'MRR@20'
stopping_step: 10

model config

model: 'GRU4Rec'
embedding_size: 64

@Ethan-TZ
Copy link
Member

@wuxinran-Angel 您好,这个问题是由于hyperopt包的版本与numpy不匹配,而与RecBole的版本无关,如果出现冲突,请尝试降低hyperopt的版本(例如降低到0.2.5)。

@wuxinran-Angel
Copy link

wuxinran-Angel commented Apr 12, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants