Bug: "Best val_accuracy So Far" is mistaken for "Best val_loss So Far"
baolongnguyenmac opened this issue · 0 comments
baolongnguyenmac commented
Bug Description
When I changed the objective from val_loss
to val_accuracy
, the value of "Best val_accuracy So Far" was wrong.
It displayed the maximum value of loss (only those which were smaller than 1)
# metrics was extracted from file `trial.json`
val_loss = np.array(metrics['list_val_loss'])
max(val_loss[val_loss < 1])
Bug Reproduction
You can try fitting the model with objective='val_loss'
, then stop the training process and change the objective to val_accuracy
and the bug will appear.
I think that any data can be used to re-produce this error.
Expected Behavior
It should print out the accuracy instead of the loss value
Setup Details
Include the details about the versions of:
- OS type and version: Ubuntu 20.04.2 LTS
- Python: 3.11.8
- autokeras: 2.0.0
- keras-tuner: 1.4.7
- scikit-learn: 1.4.1.post1
- numpy: 1.26.4
- pandas: 2.2.1
- tensorflow: 2.16.1