mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-08-20 12:40:54 +08:00
issue #977 [object Object] in slice xaxis
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
*.pyc
|
||||
__pycache__/
|
||||
venv/
|
||||
.venv/
|
||||
.eggs/
|
||||
*.egg-info
|
||||
dist/
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
# https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updating
|
||||
```sh
|
||||
nvm install 16
|
||||
nvm use 16
|
||||
|
||||
# in one terminal
|
||||
cd optuna_dashboard/
|
||||
npm i
|
||||
npm run watch
|
||||
|
||||
|
||||
# npm install -g wasm-pack
|
||||
# sudo apt install rustup
|
||||
# rustup default stable
|
||||
# make serve-browser-app
|
||||
|
||||
# in another terminal python
|
||||
python3 -m venv .venv --prompt optunadashboard
|
||||
. ./.venv/bin/activate
|
||||
pip install -e .
|
||||
OPTUNA_DASHBOARD_DEBUG=1 optuna-dashboard sqlite:///optuna3.db --port=8089
|
||||
```
|
||||
@@ -45,7 +45,7 @@ const getAxisInfoForCategoricalParams = (
|
||||
)
|
||||
|
||||
const indices = distribution.choices
|
||||
.map((c) => c?.toString() ?? "null")
|
||||
.map((c) => c?.value?.toString() ?? "null")
|
||||
.sort((a, b) =>
|
||||
a.toLowerCase() < b.toLowerCase()
|
||||
? -1
|
||||
|
||||
@@ -222,10 +222,10 @@ const plotSlice = (
|
||||
)
|
||||
|
||||
const feasibleValues = feasibleTrials.map(
|
||||
(t) => selectedParamTarget.getTargetValue(t) as number
|
||||
(t) => selectedParamTarget.getTargetValue(t) as string | number
|
||||
)
|
||||
const infeasibleValues = infeasibleTrials.map(
|
||||
(t) => selectedParamTarget.getTargetValue(t) as number
|
||||
(t) => selectedParamTarget.getTargetValue(t) as string | number
|
||||
)
|
||||
const trace: plotly.Data[] = [
|
||||
{
|
||||
@@ -268,7 +268,7 @@ const plotSlice = (
|
||||
}
|
||||
} else {
|
||||
const vocabArr = selectedParamSpace.distribution.choices.map(
|
||||
(c) => c?.toString() ?? "null"
|
||||
(c) => c?.value?.toString() ?? "null"
|
||||
)
|
||||
const tickvals: number[] = vocabArr.map((_v, i) => i)
|
||||
layout.xaxis = {
|
||||
|
||||
@@ -78,7 +78,7 @@ export const TrialTable: FC<{
|
||||
const sortable = s.distribution.type !== "CategoricalDistribution"
|
||||
const filterChoices: (string | null)[] | undefined =
|
||||
s.distribution.type === "CategoricalDistribution"
|
||||
? s.distribution.choices.map((c) => c?.toString() ?? "null")
|
||||
? s.distribution.choices.map((c) => c?.value?.toString() ?? "null")
|
||||
: undefined
|
||||
const hasMissingValue = trials.some(
|
||||
(t) => !t.params.some((p) => p.name === s.name)
|
||||
|
||||
Reference in New Issue
Block a user