Closed tfoslid closed 2 months ago
Boolean parameters not displaying correct in VS code extension.
Using the getting started example: https://github.com/optuna/optuna-examples/blob/main/quickstart.ipynb
Edit the cell after: Optimize hyperparameters of the model
bootstrap = trial.suggest_categorical("bootstrap", [True, False])
clf = sklearn.ensemble.RandomForestClassifier(n_estimators=n_estimators, max_depth=max_depth, bootstrap=bootstrap)
study = optuna.create_study(direction="maximize", storage="sqlite:///optuna_optimizer.db")
optuna_optimizer.py
Alternativly run:
`
import sklearn.datasets import sklearn.ensemble import sklearn.model_selection import optuna def objective(trial): iris = sklearn.datasets.load_iris() n_estimators = trial.suggest_int("n_estimators", 2, 20) max_depth = int(trial.suggest_float("max_depth", 1, 32, log=True)) bootstrap = trial.suggest_categorical("bootstrap", [True, False]) clf = sklearn.ensemble.RandomForestClassifier(n_estimators=n_estimators, max_depth=max_depth, bootstrap=bootstrap) return sklearn.model_selection.cross_val_score( clf, iris.data, iris.target, n_jobs=-1, cv=3 ).mean() study = optuna.create_study(direction="maximize") study.optimize(objective, n_trials=100) trial = study.best_trial print("Accuracy: {}".format(trial.value)) print("Best hyperparameters: {}".format(trial.params))
3.11.8
3.6.1
Optuna Dashboard v0.3.0
No response
Version: 1.91.1 (Universal) Commit: f1e16e1e6214d7c44d078b1f0607b2388f29d729 Date: 2024-07-09T22:07:54.982Z (2 wks ago) Electron: 29.4.0 ElectronBuildId: 9728852 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Darwin arm64 23.5.0
Description
Boolean parameters not displaying correct in VS code extension.
How to Reproduce
Using the getting started example: https://github.com/optuna/optuna-examples/blob/main/quickstart.ipynb
Edit the cell after: Optimize hyperparameters of the model
bootstrap = trial.suggest_categorical("bootstrap", [True, False])
clf = sklearn.ensemble.RandomForestClassifier(n_estimators=n_estimators, max_depth=max_depth, bootstrap=bootstrap)
study = optuna.create_study(direction="maximize", storage="sqlite:///optuna_optimizer.db")
optuna_optimizer.py
-> "open in Optuna Dashboard"Alternativly run:
`
`
Python version
3.11.8
Optuna version
3.6.1
optuna-dashboard version or git revision
Optuna Dashboard v0.3.0
Web browser
No response
VS Code
Version: 1.91.1 (Universal) Commit: f1e16e1e6214d7c44d078b1f0607b2388f29d729 Date: 2024-07-09T22:07:54.982Z (2 wks ago) Electron: 29.4.0 ElectronBuildId: 9728852 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Darwin arm64 23.5.0