-
Notifications
You must be signed in to change notification settings - Fork 620
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
Comments
@GitHub-ZHY 您好,感谢您的关注! |
你可以参考 #1181的解决方案
…------------------ 原始邮件 ------------------
发件人: "RUCAIBox/RecBole" ***@***.***>;
发送时间: 2022年4月7日(星期四) 下午4:33
***@***.***>;
***@***.******@***.***>;
主题: Re: [RUCAIBox/RecBole] [🐛BUG] GCMC Hyper_tuning 'numpy.random.mtrand.RandomState' object has no attribute 'integers' (Issue #1240)
@chenyuwuxin 您好,我已经使用了最新的RecBole,#1192也是我提的Issue,好像问题并不出现在此,目前我仍在debug,烦请您再看下。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@chenyuwuxin 您好,上述问题或因服务器环境问题引起,然而我又发现一个新问题。即yaml内配置 learner 后,虽运行单组run_recbole调试时打印出相应的 learner 但是训练结果损失函数不下降,与此同时,指标结果时有下降时而保持不变,而且最终训练结果是保持不变的,无论其他参数如何修改。 |
@chenyuwuxin 配置文件如下:# general training settingsepochs: 300 clip_grad_norm: {'max_norm': 5, 'norm_type': 2}weight_decay: 0.995 evaluation settingseval_args: Other Hyper Parameters:#accum: stack |
Trainable parameters: 4914196 |
accum:sum, dropout_prob:0.8, gcn_output_dim:256, learning_rate:0.01, num_basis_functions:2 accum:sum, dropout_prob:0.5, gcn_output_dim:256, learning_rate:0.01, num_basis_functions:2 accum:sum, dropout_prob:0.3, gcn_output_dim:1024, learning_rate:0.01, num_basis_functions:2 accum:stack, dropout_prob:0.4, gcn_output_dim:500, learning_rate:0.01, num_basis_functions:2 accum:stack, dropout_prob:0.3, gcn_output_dim:500, learning_rate:0.01, num_basis_functions:2 |
@GitHub-ZHY 可能是配置出现了问题,general 类模型在ml-1m数据集运行的示例配置文件为:
|
您好 我在使用最新源码后 出现了和上述同样的问题;但使用之前的版本不会出现bug; configenvironment settingshow_progress: False dataset settingsdataset: 'yoochoose-sample' training settingsepochs: 300 evaluation settingseval_args: split: {'LS': 'valid_and_test'}order: 'TO' model configmodel: 'GRU4Rec' |
@wuxinran-Angel 您好,这个问题是由于hyperopt包的版本与numpy不匹配,而与RecBole的版本无关,如果出现冲突,请尝试降低hyperopt的版本(例如降低到0.2.5)。 |
谢谢您的回复
我昨天尝试了这个问题 还没有来得及在github上回复。
我之前采用了hyperopt 0.2.7版本(用pip安装recbole 1.1可以正常运行);现在下降到0.2.5版本(用git clone最新的包可以运行)。
谢谢您的解答
吴忻冉
…------------------ Original ------------------
From: Tian Zhen ***@***.***>
Date: Tue,Apr 12,2022 8:55 AM
To: RUCAIBox/RecBole ***@***.***>
Cc: Xinran Wu ***@***.***>, Mention ***@***.***>
Subject: Re: [RUCAIBox/RecBole] [��BUG] GCMC Hyper_tuning 'numpy.random.mtrand.RandomState' object has no attribute 'integers' (Issue #1240)
|
描述这个 bug
GCMC Hyper_tuning 代码不通,总是有不同的模型会在Hp时报这个Bug,rng.integers(low, high, size) no intergers。
如何复现
复现这个 bug 的步骤:
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']
您的代码
您的运行脚本
--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
实验环境(请补全下列信息):
The text was updated successfully, but these errors were encountered: