Skip to content

Commit

Permalink
Apply mdformat to optunahub-registry packages.
Browse files Browse the repository at this point in the history
  • Loading branch information
y0z committed Jul 5, 2024
1 parent dd5c6a5 commit 549aa14
Show file tree
Hide file tree
Showing 36 changed files with 340 additions and 224 deletions.
16 changes: 9 additions & 7 deletions package/pruners/median/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
---
author: 'Optuna team'
title: 'Median Pruner'
description: 'Pruner using the median stopping rule.'
tags: ['pruner', 'built-in']
optuna_versions: ['3.6.1']
license: 'MIT License'
author: Optuna team
title: Median Pruner
description: Pruner using the median stopping rule.
tags: [pruner, built-in]
optuna_versions: [3.6.1]
license: MIT License
---

## Class or Function Names

- MedianPruner

## Example

```python
import optuna
from optuna.pruners import MedianPruner
Expand All @@ -33,5 +35,5 @@ study.optimize(objective, n_trials=20)
```

## Others
See the [documentation](https://optuna.readthedocs.io/en/stable/reference/generated/optuna.pruners.MedianPruner.html) for more details.

See the [documentation](https://optuna.readthedocs.io/en/stable/reference/generated/optuna.pruners.MedianPruner.html) for more details.
16 changes: 9 additions & 7 deletions package/pruners/percentile/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
---
author: 'Optuna team'
title: 'Percentile Pruner'
description: 'Pruner to keep the specified percentile of the trials.'
tags: ['pruner', 'built-in']
optuna_versions: ['3.6.1']
license: 'MIT License'
author: Optuna team
title: Percentile Pruner
description: Pruner to keep the specified percentile of the trials.
tags: [pruner, built-in]
optuna_versions: [3.6.1]
license: MIT License
---

## Class or Function Names

- PercentilePruner

## Example

```python
import optuna
from optuna.pruners import PercentilePruner
Expand All @@ -33,5 +35,5 @@ study.optimize(objective, n_trials=20)
```

## Others
See the [documentation](https://optuna.readthedocs.io/en/stable/reference/generated/optuna.pruners.PercentilePruner.html) for more details.

See the [documentation](https://optuna.readthedocs.io/en/stable/reference/generated/optuna.pruners.PercentilePruner.html) for more details.
17 changes: 10 additions & 7 deletions package/samplers/botorch_sampler/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
---
author: 'Optuna team'
title: 'BoTorch Sampler'
description: 'A Sampler using botorch library as the backend.'
tags: ['sampler', 'built-in']
optuna_versions: ['3.6.1']
license: 'MIT License'
author: Optuna team
title: BoTorch Sampler
description: A Sampler using botorch library as the backend.
tags: [sampler, built-in]
optuna_versions: [3.6.1]
license: MIT License
---

## Class or Function Names

- BoTorchSampler

## Installation

```bash
pip install optuna-integration botorch
```

## Example

```python
from optuna_integration import BoTorchSampler
sampler = BoTorchSampler()
```

## Others
See the [documentation](https://optuna-integration.readthedocs.io/en/latest/reference/generated/optuna_integration.BoTorchSampler.html) for more details.

See the [documentation](https://optuna-integration.readthedocs.io/en/latest/reference/generated/optuna_integration.BoTorchSampler.html) for more details.
16 changes: 9 additions & 7 deletions package/samplers/brute_force/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
---
author: 'Optuna team'
title: 'Brute Force Search'
description: 'Sampler using brute force.'
tags: ['sampler', 'built-in']
optuna_versions: ['3.6.1']
license: 'MIT License'
author: Optuna team
title: Brute Force Search
description: Sampler using brute force.
tags: [sampler, built-in]
optuna_versions: [3.6.1]
license: MIT License
---

## Class or Function Names

- BruteForceSampler

## Example

```python
import optuna
from optuna.samplers import BruteForceSampler
Expand All @@ -27,5 +29,5 @@ study.optimize(objective, n_trials=10)
```

## Others
See the [documentation](https://optuna.readthedocs.io/en/stable/reference/samplers/generated/optuna.samplers.BruteForceSampler.html) for more details.

See the [documentation](https://optuna.readthedocs.io/en/stable/reference/samplers/generated/optuna.samplers.BruteForceSampler.html) for more details.
16 changes: 10 additions & 6 deletions package/samplers/cmaes/README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
---
author: 'Optuna team'
title: 'CMA-ES Sampler'
description: 'A sampler using cmaes as the backend.'
tags: ['sampler', 'built-in']
optuna_versions: ['3.6.1']
license: 'MIT License'
author: Optuna team
title: CMA-ES Sampler
description: A sampler using cmaes as the backend.
tags: [sampler, built-in]
optuna_versions: [3.6.1]
license: MIT License
---

## Class or Function Names

- CmaEsSampler

## Installation

```bash
pip install cmaes
```

## Example

```python
import optuna
from optuna.samplers import CmaEsSampler
Expand All @@ -33,4 +36,5 @@ study.optimize(objective, n_trials=20)
```

## Others

See the [documentation](https://optuna.readthedocs.io/en/stable/reference/samplers/generated/optuna.samplers.CmaEsSampler.html) for more details.
15 changes: 9 additions & 6 deletions package/samplers/demo/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
---
author: 'Optuna team'
title: 'Demo Sampler'
description: 'Demo Sampler of OptunaHub'
tags: ['sampler']
optuna_versions: ['3.6.1']
license: 'MIT License'
author: Optuna team
title: Demo Sampler
description: Demo Sampler of OptunaHub
tags: [sampler]
optuna_versions: [3.6.1]
license: MIT License
---

## Class or Function Names

- DemoSampler

## Example

```python
module = optunahub.load_module("samplers/demo")
sampler = module.DemoSampler(seed=42)
```

See [`example.py`](https://github.com/optuna/optunahub-registry/blob/main/package/samplers/demo/example.py) for more details.
15 changes: 10 additions & 5 deletions package/samplers/evo_merge/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
---
author: 'Optuna team'
title: 'Evolutionary LLM Merge Sampler'
description: 'A sampler for evolutionary LLM merge.'
tags: ['sampler', 'LLM']
author: Optuna team
title: Evolutionary LLM Merge Sampler
description: A sampler for evolutionary LLM merge.
tags: [sampler, LLM]
optuna_versions: [3.6.1]
license: 'MIT License'
license: MIT License
---

## Class or Function Names

- EvoMergeSampler
- EvoMergeTrial

## Installation

```bash
pip install git+https://github.com/arcee-ai/mergekit.git
pip install sentencepiece accelerate protobuf bitsandbytes langchain langchain-community datasets
Expand All @@ -20,6 +22,7 @@ export HF_TOKEN=xxx
```

## Example

```python
sampler = EvoMergeSampler(base_config="path/to/config/yml/file")
study = optuna.create_study(sampler=sampler)
Expand All @@ -35,6 +38,7 @@ for _ in range(100):

print(study.trials_dataframe(attrs=("number", "value")))
```

See [`example.py`](https://github.com/optuna/optunahub-registry/blob/main/package/samplers/evo_merge/example.py) for a full example. You need GPU with 16G VLAM to run this example.
The following figures are obtained from the analysis of the optimization.
![History Plot](images/history.png "History Plot")
Expand All @@ -43,4 +47,5 @@ The following figures are obtained from the analysis of the optimization.
## Others

### Reference

Akiba, T., Shing, M., Tang, Y., Sun, Q., & Ha, D. (2024). Evolutionary Optimization of Model Merging Recipes. arXiv preprint arXiv:2403.13187.
16 changes: 10 additions & 6 deletions package/samplers/gp/README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
---
author: 'Optuna team'
title: 'Gaussian Process-Based Sampler'
description: 'Sampler using Gaussian process-based Bayesian optimization.'
tags: ['sampler', 'built-in']
optuna_versions: ['3.6.1']
license: 'MIT License'
author: Optuna team
title: Gaussian Process-Based Sampler
description: Sampler using Gaussian process-based Bayesian optimization.
tags: [sampler, built-in]
optuna_versions: [3.6.1]
license: MIT License
---

## Class or Function Names

- GPSampler

## Installation

```bash
pip install scipy pytorch
```

## Example

```python
import optuna
from optuna.samplers import GPSampler
Expand All @@ -32,4 +35,5 @@ study.optimize(objective, n_trials=100)
```

## Others

See the [documentation](https://optuna.readthedocs.io/en/stable/reference/samplers/generated/optuna.samplers.GPSampler.html) for more details.
15 changes: 9 additions & 6 deletions package/samplers/grid_search/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
---
author: 'Optuna team'
title: 'Grid Search'
description: 'Sampler using grid search.'
tags: ['sampler', 'built-in']
optuna_versions: ['3.6.1']
license: 'MIT License'
author: Optuna team
title: Grid Search
description: Sampler using grid search.
tags: [sampler, built-in]
optuna_versions: [3.6.1]
license: MIT License
---

## Class or Function Names

- GridSampler

## Example

```python
import optuna
from optuna.samplers import GridSampler
Expand All @@ -29,4 +31,5 @@ study.optimize(objective)
```

## Others

See the [documentation](https://optuna.readthedocs.io/en/stable/reference/samplers/generated/optuna.samplers.GridSampler.html) for more details.
13 changes: 8 additions & 5 deletions package/samplers/hebo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
author: HideakiImamura
title: HEBO (Heteroscedastic and Evolutionary Bayesian Optimisation)
description: HEBO addresses the problem of noisy and heterogeneous objective functions by using a heteroscedastic Gaussian process and an evolutionary algorithm.
tags: ["sampler", "Bayesian optimization", "Heteroscedastic Gaussian process", "Evolutionary algorithm"]
optuna_versions: ["3.6.1"]
license: "MIT License"
tags: [sampler, Bayesian optimization, Heteroscedastic Gaussian process, Evolutionary algorithm]
optuna_versions: [3.6.1]
license: MIT License
---

## Class or Function Names

- HEBOSampler

## Installation

```bash
pip install -r requirements.txt
git clone [email protected]:huawei-noah/HEBO.git
Expand All @@ -19,6 +21,7 @@ pip install -e .
```

## Example

```python
search_space = {
"x": FloatDistribution(-10, 10),
Expand All @@ -28,13 +31,13 @@ search_space = {
sampler = HEBOSampler(search_space)
study = optuna.create_study(sampler=sampler)
```

See [`example.py`](https://github.com/optuna/optunahub-registry/blob/main/package/samplers/hebo/example.py) for a full example.
![History Plot](images/hebo_optimization_history.png "History Plot")


## Others

HEBO is the winning submission to the [NeurIPS 2020 Black-Box Optimisation Challenge](https://bbochallenge.com/leaderboard).
HEBO is the winning submission to the [NeurIPS 2020 Black-Box Optimisation Challenge](https://bbochallenge.com/leaderboard).
Please refer to [the official repository of HEBO](https://github.com/huawei-noah/HEBO/tree/master/HEBO) for more details.

### Reference
Expand Down
16 changes: 10 additions & 6 deletions package/samplers/implicit_natural_gradient/README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
---
author: 'Yuhei Otomo and Masashi Shibata'
title: 'Implicit Natural Gradient Sampler'
description: 'A sampler based on Implicit Natural Gradient.'
tags: ['sampler']
optuna_versions: ['3.6.1']
license: 'MIT License'
author: Yuhei Otomo and Masashi Shibata
title: Implicit Natural Gradient Sampler
description: A sampler based on Implicit Natural Gradient.
tags: [sampler]
optuna_versions: [3.6.1]
license: MIT License
---

## Class or Function Names

- ImplicitNaturalGradientSampler

## Example

```python
mod = optunahub.load_module("samplers/implicit_natural_gradient")
sampler = mod.ImplicitNaturalGradientSampler()
```

See [`example.py`](https://github.com/optuna/optunahub-registry/blob/main/package/samplers/implicit_natural_gradient/example.py) for more details.

## Others

### Reference

Yueming Lyu, Ivor W. Tsang (2019). Black-box Optimizer with Implicit Natural Gradient. arXiv:1910.04301
Loading

0 comments on commit 549aa14

Please sign in to comment.