Closed cartisan closed 5 days ago
Ah I think I found it. It seems that the way categorical as stored has changed.
So
(c) => c?.toString() ?? "null"
to
(c) => c?.value?.toString() ?? "null"
everywhere it occurs
But I haven't run unit tests on it to check if this fix causes unintended problems, so I can't make it a PR yet
@wassname Thanks for this. Can you tell what the last working version would be?
I'm not sure sorry, I've only recently starting using it, so I don't know if it was ever working. But that's normal, it's a active volunteer project.
Description
Observed behavior: When I select a categorical parameter that contains boolean values in the slice plot (first plot shown in the analytics page) then both values on the x-axis are represented as
[Object object]
.Expected behavior: The plot shows the actual values,
True
andFalse
on the x-axis.Observations: This seems a problem with optuna-dashbord and not optuna, when I create a slice plot in optuna (code below) I see the values represented correctly in the plotly graph.
I'm not familiar with React, but the problem seems to be here:
where the code assumes the values of the x-axis are numbers, which is not the case for boolean hyperspace parameters. I would guess that this also breaks for string values of categorical parameters.
Code to reproduce optuna plot
How to Reproduce
Python version
3.11
Optuna version
3.6.1
optuna-dashboard version or git revision
0.16.2
Web browser
Google Chrome