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

scheduler.step(log_info[f"R@1"]) KeyError: 'R@1' #8

Open
Samonsix opened this issue Sep 21, 2020 · 4 comments
Open

scheduler.step(log_info[f"R@1"]) KeyError: 'R@1' #8

Samonsix opened this issue Sep 21, 2020 · 4 comments

Comments

@Samonsix
Copy link

CUDA_VISIBLE_DEVICES=0 python3 tools/train_net.py --cfg configs/sample_config.yaml

Traceback (most recent call last):
File "tools/train_net.py", line 81, in
train(cfg)
File "tools/train_net.py", line 64, in train
criterion, checkpointer, writer, device, checkpoint_period, arguments, logger,)
File "/home/shengyang/work/hg-git/HS/research-xbm/ret_benchmark/engine/trainer.py", line 74, in do_train
scheduler.step(log_info[f"R@1"])
KeyError: 'R@1'

torch: 1.4.0
GTX 1080ti

what's wrong with it?

@jingyang2017
Copy link

I meet the same problem, how did you solve it?

@NanAlbert
Copy link

It seems that replacing scheduler.step(log_info[f"R@1"]) with scheduler.step(log_info[f"e_precision_at_1"]) will work. It works to me.

@XinyiXuXD
Copy link

It seems that replacing scheduler.step(log_info[f"R@1"]) with scheduler.step(log_info[f"e_precision_at_1"]) will work. It works to me.

I came across the same problem and your solution works for me too. May I ask that can you reproduce the performance on the stanford_online_products dataset reported in the XBM paper?

@NanAlbert
Copy link

It seems that replacing scheduler.step(log_info[f"R@1"]) with scheduler.step(log_info[f"e_precision_at_1"]) will work. It works to me.

I came across the same problem and your solution works for me too. May I ask that can you reproduce the performance on the stanford_online_products dataset reported in the XBM paper?

I don’t remember the specific results. I just referred to the implementation part of the model and did not pay attention to the accuracy of this model. Sorry for not being able to help you.

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

4 participants