[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-9631":3},{"id":4,"name":5,"fullName":6,"owner":5,"repo":5,"description":7,"homepage":8,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":9,"rankLanguage":9,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":9,"pushedAt":9,"updatedAt":31,"readmeContent":32,"aiSummary":33,"trendingCount":15,"starSnapshotCount":15,"syncStatus":34,"lastSyncTime":35,"discoverSource":36},9631,"optuna","optuna\u002Foptuna","A hyperparameter optimization framework","https:\u002F\u002Foptuna.org",null,"Python",14346,1338,122,24,0,5,36,206,25,107.38,"MIT License",false,"master",true,[26,27,28,29,30],"distributed","hyperparameter-optimization","machine-learning","parallel","python","2026-06-12 04:00:46","\u003Cdiv align=\"center\">\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Foptuna\u002Foptuna\u002Fmaster\u002Fdocs\u002Fimage\u002Foptuna-logo.png\" width=\"800\"\u002F>\u003C\u002Fdiv>\n\n# Optuna: A hyperparameter optimization framework\n\n[![Python](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpython-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue)](https:\u002F\u002Fwww.python.org)\n[![pypi](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Foptuna.svg)](https:\u002F\u002Fpypi.python.org\u002Fpypi\u002Foptuna)\n[![conda](https:\u002F\u002Fimg.shields.io\u002Fconda\u002Fvn\u002Fconda-forge\u002Foptuna.svg)](https:\u002F\u002Fanaconda.org\u002Fconda-forge\u002Foptuna)\n[![GitHub license](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-blue.svg)](https:\u002F\u002Fgithub.com\u002Foptuna\u002Foptuna)\n[![Read the Docs](https:\u002F\u002Freadthedocs.org\u002Fprojects\u002Foptuna\u002Fbadge\u002F?version=stable)](https:\u002F\u002Foptuna.readthedocs.io\u002Fen\u002Fstable\u002F)\n\n:link: [**Website**](https:\u002F\u002Foptuna.org\u002F)\n| :page_with_curl: [**Docs**](https:\u002F\u002Foptuna.readthedocs.io\u002Fen\u002Fstable\u002F)\n| :gear: [**Install Guide**](https:\u002F\u002Foptuna.readthedocs.io\u002Fen\u002Fstable\u002Finstallation.html)\n| :pencil: [**Tutorial**](https:\u002F\u002Foptuna.readthedocs.io\u002Fen\u002Fstable\u002Ftutorial\u002Findex.html)\n| :bulb: [**Examples**](https:\u002F\u002Fgithub.com\u002Foptuna\u002Foptuna-examples)\n| [**Twitter**](https:\u002F\u002Ftwitter.com\u002FOptunaAutoML)\n| [**LinkedIn**](https:\u002F\u002Fwww.linkedin.com\u002Fshowcase\u002Foptuna\u002F)\n| [**Medium**](https:\u002F\u002Fmedium.com\u002Foptuna)\n\n*Optuna* is an automatic hyperparameter optimization software framework, particularly designed\nfor machine learning. It features an imperative, *define-by-run* style user API. Thanks to our\n*define-by-run* API, the code written with Optuna enjoys high modularity, and the user of\nOptuna can dynamically construct the search spaces for the hyperparameters.\n\n## :loudspeaker: News\nHelp us create the next version of Optuna!\n\nOptuna 5.0 Roadmap published for review. Please take a look at [the planned improvements to Optuna](https:\u002F\u002Fmedium.com\u002Foptuna\u002Foptuna-v5-roadmap-ac7d6935a878), and share your feedback in [the github issues](https:\u002F\u002Fgithub.com\u002Foptuna\u002Foptuna\u002Flabels\u002Fv5). PR contributions also welcome!\n\nPlease take a few minutes to fill in [this survey](https:\u002F\u002Fforms.gle\u002FwVwLCQ9g6st6AXuq9), and let us know how you use Optuna now and what improvements you'd like.🤔\nAll questions are optional. 🙇‍♂️\n\n\u003C!-- TODO: when you add a new line, please delete the oldest line -->\n* **Mar 16, 2026**: Optuna 4.8.0 is out! Check out [the release note](https:\u002F\u002Fgithub.com\u002Foptuna\u002Foptuna\u002Freleases\u002Ftag\u002Fv4.8.0) for details.\n* **Jan 19, 2026**: Optuna 4.7.0 is out! Check out [the release note](https:\u002F\u002Fgithub.com\u002Foptuna\u002Foptuna\u002Freleases\u002Ftag\u002Fv4.7.0) for details.\n* **Nov 10, 2025**: A new article [Announcing Optuna 4.6](https:\u002F\u002Fmedium.com\u002Foptuna\u002Fannouncing-optuna-4-6-a9e82183ab07) has been published.\n* **Oct 28, 2025**: A new article [AutoSampler: Full Support for Multi-Objective & Constrained Optimization](https:\u002F\u002Fmedium.com\u002Foptuna\u002Fautosampler-full-support-for-multi-objective-constrained-optimization-c1c4fc957ba2) has been published.\n* **Sep 22, 2025**: A new article [[Optuna v4.5] Gaussian Process-Based Sampler (GPSampler) Can Now Perform Constrained Multi-Objective Optimization](https:\u002F\u002Fmedium.com\u002Foptuna\u002Foptuna-v4-5-81e78d8e077a) has been published.\n* **Jun 16, 2025**: Optuna 4.4.0 has been released! Check out [the release blog](https:\u002F\u002Fmedium.com\u002Foptuna\u002Fannouncing-optuna-4-4-ece661493126).\n\n## :fire: Key Features\n\nOptuna has modern functionalities as follows:\n\n- [Lightweight, versatile, and platform agnostic architecture](https:\u002F\u002Foptuna.readthedocs.io\u002Fen\u002Fstable\u002Ftutorial\u002F10_key_features\u002F001_first.html)\n  - Handle a wide variety of tasks with a simple installation that has few requirements.\n- [Pythonic search spaces](https:\u002F\u002Foptuna.readthedocs.io\u002Fen\u002Fstable\u002Ftutorial\u002F10_key_features\u002F002_configurations.html)\n  - Define search spaces using familiar Python syntax including conditionals and loops.\n- [Efficient optimization algorithms](https:\u002F\u002Foptuna.readthedocs.io\u002Fen\u002Fstable\u002Ftutorial\u002F10_key_features\u002F003_efficient_optimization_algorithms.html)\n  - Adopt state-of-the-art algorithms for sampling hyperparameters and efficiently pruning unpromising trials.\n- [Easy parallelization](https:\u002F\u002Foptuna.readthedocs.io\u002Fen\u002Fstable\u002Ftutorial\u002F10_key_features\u002F004_distributed.html)\n  - Scale studies to tens or hundreds of workers with little or no changes to the code.\n- [Quick visualization](https:\u002F\u002Foptuna.readthedocs.io\u002Fen\u002Fstable\u002Ftutorial\u002F10_key_features\u002F005_visualization.html)\n  - Inspect optimization histories from a variety of plotting functions.\n\n\n## Basic Concepts\n\nWe use the terms *study* and *trial* as follows:\n\n- Study: optimization based on an objective function\n- Trial: a single execution of the objective function\n\nPlease refer to the sample code below. The goal of a *study* is to find out the optimal set of\nhyperparameter values (e.g., `regressor` and `svr_c`) through multiple *trials* (e.g.,\n`n_trials=100`). Optuna is a framework designed for automation and acceleration of\noptimization *studies*.\n\n\u003Cdetails open>\n\u003Csummary>Sample code with scikit-learn\u003C\u002Fsummary>\n\n[![Open in Colab](https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg)](http:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Foptuna\u002Foptuna-examples\u002Fblob\u002Fmain\u002Fquickstart.ipynb)\n\n```python\nimport optuna\nimport sklearn\n\n\n# Define an objective function to be minimized.\ndef objective(trial):\n\n    # Invoke suggest methods of a Trial object to generate hyperparameters.\n    regressor_name = trial.suggest_categorical(\"regressor\", [\"SVR\", \"RandomForest\"])\n    if regressor_name == \"SVR\":\n        svr_c = trial.suggest_float(\"svr_c\", 1e-10, 1e10, log=True)\n        regressor_obj = sklearn.svm.SVR(C=svr_c)\n    else:\n        rf_max_depth = trial.suggest_int(\"rf_max_depth\", 2, 32)\n        regressor_obj = sklearn.ensemble.RandomForestRegressor(max_depth=rf_max_depth)\n\n    X, y = sklearn.datasets.fetch_california_housing(return_X_y=True)\n    X_train, X_val, y_train, y_val = sklearn.model_selection.train_test_split(X, y, random_state=0)\n\n    regressor_obj.fit(X_train, y_train)\n    y_pred = regressor_obj.predict(X_val)\n\n    error = sklearn.metrics.mean_squared_error(y_val, y_pred)\n\n    return error  # An objective value linked with the Trial object.\n\n\nstudy = optuna.create_study()  # Create a new study.\nstudy.optimize(objective, n_trials=100)  # Invoke optimization of the objective function.\n```\n\u003C\u002Fdetails>\n\n> [!NOTE]\n> More examples can be found in [optuna\u002Foptuna-examples](https:\u002F\u002Fgithub.com\u002Foptuna\u002Foptuna-examples).\n>\n> The examples cover diverse problem setups such as multi-objective optimization, constrained optimization, pruning, and distributed optimization.\n\n## Installation\n\nOptuna is available at [the Python Package Index](https:\u002F\u002Fpypi.org\u002Fproject\u002Foptuna\u002F) and on [Anaconda Cloud](https:\u002F\u002Fanaconda.org\u002Fconda-forge\u002Foptuna).\n\n```bash\n# PyPI\n$ pip install optuna\n```\n\n```bash\n# Anaconda Cloud\n$ conda install -c conda-forge optuna\n```\n\n> [!IMPORTANT]\n> Optuna supports Python 3.9 or newer.\n\n## Integrations\n\nOptuna has integration features with various third-party libraries. Integrations can be found in [optuna\u002Foptuna-integration](https:\u002F\u002Fgithub.com\u002Foptuna\u002Foptuna-integration) and the document is available [here](https:\u002F\u002Foptuna-integration.readthedocs.io\u002Fen\u002Fstable\u002Findex.html).\n\n\u003Cdetails>\n\u003Csummary>Supported integration libraries\u003C\u002Fsummary>\n\n* [Catboost](https:\u002F\u002Fgithub.com\u002Foptuna\u002Foptuna-examples\u002Ftree\u002Fmain\u002Fcatboost\u002Fcatboost_pruning.py)\n* [Dask](https:\u002F\u002Fgithub.com\u002Foptuna\u002Foptuna-examples\u002Ftree\u002Fmain\u002Fdask\u002Fdask_simple.py)\n* [fastai](https:\u002F\u002Fgithub.com\u002Foptuna\u002Foptuna-examples\u002Ftree\u002Fmain\u002Ffastai\u002Ffastai_simple.py)\n* [Keras](https:\u002F\u002Fgithub.com\u002Foptuna\u002Foptuna-examples\u002Ftree\u002Fmain\u002Fkeras\u002Fkeras_integration.py)\n* [LightGBM](https:\u002F\u002Fgithub.com\u002Foptuna\u002Foptuna-examples\u002Ftree\u002Fmain\u002Flightgbm\u002Flightgbm_integration.py)\n* [MLflow](https:\u002F\u002Fgithub.com\u002Foptuna\u002Foptuna-examples\u002Ftree\u002Fmain\u002Fmlflow\u002Fkeras_mlflow.py)\n* [PyTorch](https:\u002F\u002Fgithub.com\u002Foptuna\u002Foptuna-examples\u002Ftree\u002Fmain\u002Fpytorch\u002Fpytorch_simple.py)\n* [PyTorch Ignite](https:\u002F\u002Fgithub.com\u002Foptuna\u002Foptuna-examples\u002Ftree\u002Fmain\u002Fpytorch\u002Fpytorch_ignite_simple.py)\n* [PyTorch Lightning](https:\u002F\u002Fgithub.com\u002Foptuna\u002Foptuna-examples\u002Ftree\u002Fmain\u002Fpytorch\u002Fpytorch_lightning_simple.py)\n* [TensorBoard](https:\u002F\u002Fgithub.com\u002Foptuna\u002Foptuna-examples\u002Ftree\u002Fmain\u002Ftensorboard\u002Ftensorboard_simple.py)\n* [TensorFlow](https:\u002F\u002Fgithub.com\u002Foptuna\u002Foptuna-examples\u002Ftree\u002Fmain\u002Ftensorflow\u002Ftensorflow_estimator_integration.py)\n* [tf.keras](https:\u002F\u002Fgithub.com\u002Foptuna\u002Foptuna-examples\u002Ftree\u002Fmain\u002Ftfkeras\u002Ftfkeras_integration.py)\n* [Weights & Biases](https:\u002F\u002Fgithub.com\u002Foptuna\u002Foptuna-examples\u002Ftree\u002Fmain\u002Fwandb\u002Fwandb_integration.py)\n* [XGBoost](https:\u002F\u002Fgithub.com\u002Foptuna\u002Foptuna-examples\u002Ftree\u002Fmain\u002Fxgboost\u002Fxgboost_integration.py)\n\u003C\u002Fdetails>\n\n## Web Dashboard\n\n[Optuna Dashboard](https:\u002F\u002Fgithub.com\u002Foptuna\u002Foptuna-dashboard) is a real-time web dashboard for Optuna.\nYou can check the optimization history, hyperparameter importance, etc. in graphs and tables.\nYou don't need to create a Python script to call [Optuna's visualization](https:\u002F\u002Foptuna.readthedocs.io\u002Fen\u002Fstable\u002Freference\u002Fvisualization\u002Findex.html) functions.\nFeature requests and bug reports are welcome!\n\n![optuna-dashboard](https:\u002F\u002Fuser-images.githubusercontent.com\u002F5564044\u002F204975098-95c2cb8c-0fb5-4388-abc4-da32f56cb4e5.gif)\n\n`optuna-dashboard` can be installed via pip:\n\n```shell\n$ pip install optuna-dashboard\n```\n\n> [!TIP]\n> Please check out the convenience of Optuna Dashboard using the sample code below.\n\n\u003Cdetails>\n\u003Csummary>Sample code to launch Optuna Dashboard\u003C\u002Fsummary>\n\nSave the following code as `optimize_toy.py`.\n\n```python\nimport optuna\n\n\ndef objective(trial):\n    x1 = trial.suggest_float(\"x1\", -100, 100)\n    x2 = trial.suggest_float(\"x2\", -100, 100)\n    return x1**2 + 0.01 * x2**2\n\n\nstudy = optuna.create_study(storage=\"sqlite:\u002F\u002F\u002Fdb.sqlite3\")  # Create a new study with database.\nstudy.optimize(objective, n_trials=100)\n```\n\nThen try the commands below:\n\n```shell\n# Run the study specified above\n$ python optimize_toy.py\n\n# Launch the dashboard based on the storage `sqlite:\u002F\u002F\u002Fdb.sqlite3`\n$ optuna-dashboard sqlite:\u002F\u002F\u002Fdb.sqlite3\n...\nListening on http:\u002F\u002Flocalhost:8080\u002F\nHit Ctrl-C to quit.\n```\n\n\u003C\u002Fdetails>\n\n\n## OptunaHub\n\n[OptunaHub](https:\u002F\u002Fhub.optuna.org\u002F) is a feature-sharing platform for Optuna.\nYou can use the registered features and publish your packages.\n\n### Use registered features\n\n`optunahub` can be installed via pip:\n\n```shell\n$ pip install optunahub\n# Install AutoSampler dependencies (CPU only is sufficient for PyTorch)\n$ pip install cmaes scipy torch --extra-index-url https:\u002F\u002Fdownload.pytorch.org\u002Fwhl\u002Fcpu\n```\n\nYou can load registered module with `optunahub.load_module`.\n\n```python\nimport optuna\nimport optunahub\n\n\ndef objective(trial: optuna.Trial) -> float:\n    x = trial.suggest_float(\"x\", -5, 5)\n    y = trial.suggest_float(\"y\", -5, 5)\n    return x**2 + y**2\n\n\nmodule = optunahub.load_module(package=\"samplers\u002Fauto_sampler\")\nstudy = optuna.create_study(sampler=module.AutoSampler())\nstudy.optimize(objective, n_trials=10)\n\nprint(study.best_trial.value, study.best_trial.params)\n```\n\nFor more details, please refer to [the optunahub documentation](https:\u002F\u002Foptuna.github.io\u002Foptunahub\u002F).\n\n### Publish your packages\n\nYou can publish your package via [optunahub-registry](https:\u002F\u002Fgithub.com\u002Foptuna\u002Foptunahub-registry).\nSee the [Tutorials for Contributors](https:\u002F\u002Foptuna.github.io\u002Foptunahub\u002Ftutorials_for_contributors.html) in OptunaHub.\n\n\n## Communication\n\n- [GitHub Discussions] for questions.\n- [GitHub Issues] for bug reports and feature requests.\n\n[GitHub Discussions]: https:\u002F\u002Fgithub.com\u002Foptuna\u002Foptuna\u002Fdiscussions\n[GitHub issues]: https:\u002F\u002Fgithub.com\u002Foptuna\u002Foptuna\u002Fissues\n\n\n## Contribution\n\nAny contributions to Optuna are more than welcome!\n\nIf you are new to Optuna, please check the [good first issues](https:\u002F\u002Fgithub.com\u002Foptuna\u002Foptuna\u002Flabels\u002Fgood%20first%20issue). They are relatively simple, well-defined, and often good starting points for you to get familiar with the contribution workflow and other developers.\n\nIf you already have contributed to Optuna, we recommend the other [contribution-welcome issues](https:\u002F\u002Fgithub.com\u002Foptuna\u002Foptuna\u002Flabels\u002Fcontribution-welcome).\n\nFor general guidelines on how to contribute to the project, take a look at [CONTRIBUTING.md](.\u002FCONTRIBUTING.md).\n\n\n## Reference\n\nIf you use Optuna in one of your research projects, please cite [our KDD paper](https:\u002F\u002Fdoi.org\u002F10.1145\u002F3292500.3330701) \"Optuna: A Next-generation Hyperparameter Optimization Framework\":\n\n\u003Cdetails open>\n\u003Csummary>BibTeX\u003C\u002Fsummary>\n\n```bibtex\n@inproceedings{akiba2019optuna,\n  title={{O}ptuna: A Next-Generation Hyperparameter Optimization Framework},\n  author={Akiba, Takuya and Sano, Shotaro and Yanase, Toshihiko and Ohta, Takeru and Koyama, Masanori},\n  booktitle={The 25th ACM SIGKDD International Conference on Knowledge Discovery \\& Data Mining},\n  pages={2623--2631},\n  year={2019}\n}\n```\n\u003C\u002Fdetails>\n\n\n## License\n\nMIT License (see [LICENSE](.\u002FLICENSE)).\n\nOptuna uses the codes from SciPy and fdlibm projects (see [LICENSE_THIRD_PARTY](.\u002FLICENSE_THIRD_PARTY)).\n","Optuna 是一个用于机器学习的超参数优化框架。它采用定义即运行（define-by-run）的编程风格，使得用户可以灵活地构建和调整搜索空间，从而提高代码的模块化程度。Optuna 支持分布式并行计算，能够有效加速优化过程，并且易于集成到现有的机器学习工作流中。此外，Optuna 还提供了丰富的采样算法和可视化工具，帮助用户更好地理解和调试优化过程。适用于需要对模型性能进行精细化调优的各种机器学习应用场景，如深度学习、传统机器学习等。",2,"2026-06-11 03:23:53","top_topic"]