bighuang624/Troika

Error

Opened this issue · 6 comments

if val_result[config.val_metric] < best_loss:
KeyError: 'best_loss'

@PanXGzhu Sorry, it seems that we missed this case while testing the open-source code.
Try to change test_saved_results['loss'] = loss_avg to test_saved_results['best_loss'] = loss_avg, Line 129 in train.py
However, we currently do not have the conditions to test whether this will lead to other bugs. Please feel free to report if it happens.

The error occurred on line 85 (train.py).

Iraceback(most recent call last):
File "/home/px/code/Troika-master/code/train.py", line 171, in
train model(model, optimizer, config, train dataset, val dataset, test dataset)
File "/home/px/code/Troika-master/code/train.py", line 85, in train_model
if yal result[config,val metricl < best loss:
KeyError:'best loss'
进程已结束,退出代码为 1

@PanXGzhu So have you tried to change test_saved_results['loss'] = loss_avg to test_saved_results['best_loss'] = loss_avg in Line 129, train.py?

Hello, author. I want to ask you if you have any situations in the open world where the results without feasibility scores are better than the results with feasibility scores

@mjjc111 To be honest, I haven't conducted any experiments on this area, so I don't have any conclusions to draw as a reference.