Skip to content

Commit

Permalink
Merge branch 'release/0.7.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Deathn0t committed Apr 4, 2024
2 parents 92b8bf9 + b7257ae commit 739bf66
Show file tree
Hide file tree
Showing 71 changed files with 4,174 additions and 1,382 deletions.
28 changes: 0 additions & 28 deletions .devcontainer/DockerfileDev

This file was deleted.

49 changes: 0 additions & 49 deletions .devcontainer/devcontainer.json

This file was deleted.

6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ jobs:
strategy:
matrix:
python-version:
- "3.7"
- "3.9"
- "3.10"
- "3.11"
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -30,5 +32,5 @@ jobs:
- name: Run tests with tox
run: tox -e py3
- name: Upload coverage report
if: ${{ matrix.python-version == 3.7 }} # Only upload coverage once
if: ${{ matrix.python-version == 3.11 }} # Only upload coverage once
uses: codecov/codecov-action@v1
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ More details about the installation process can be found at [DeepHyper Installat

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deephyper/tutorials/blob/main/tutorials/colab/DeepHyper_101.ipynb)

The black-box function named `run` is defined by taking an input dictionary named `config`` which contains the different variables to optimize. Then the run-function is bound to an `Evaluator` in charge of distributing the computation of multiple evaluations. Finally, a Bayesian search named `CBO` is created and executed to find the values of config which **MAXIMIZE** the return value of `run(config)`.
The black-box function named `run` is defined by taking an input job named `job` which contains the different variables to optimize `job.parameters`. Then the run-function is bound to an `Evaluator` in charge of distributing the computation of multiple evaluations. Finally, a Bayesian search named `CBO` is created and executed to find the values of config which **MAXIMIZE** the return value of `run(job)`.

```python
def run(job):
Expand Down Expand Up @@ -129,11 +129,11 @@ If you wish to cite the Software, please use the following:

```
@misc{deephyper_software,
title = {"DeepHyper: A Python Package for Scalable Neural Architecture and Hyperparameter Search"},
author = {{DeepHyper Development Team}},
organization = {DeepHyper Team},
year = 2018,
url = {https://github.com/deephyper/deephyper}
title = {"DeepHyper: A Python Package for Scalable Neural Architecture and Hyperparameter Search"},
author = {Balaprakash, Prasanna and Egele, Romain and Salim, Misha and Maulik, Romit and Vishwanath, Venkat and Wild, Stefan and others},
organization = {DeepHyper Team},
year = 2018,
url = {https://github.com/deephyper/deephyper}
}
```

Expand Down
2 changes: 1 addition & 1 deletion deephyper/__version__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = (0, 6, 0)
VERSION = (0, 7, 0)

__version__ = ".".join(map(str, VERSION))

Expand Down
55 changes: 55 additions & 0 deletions deephyper/analysis/_matplotlib.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import matplotlib as mpl


def figure_size(width, fraction=1):
"""Set figure dimensions to avoid scaling in LaTeX.
Args:
width (float): Document textwidth or columnwidth in pts.
fraction (float, optional) Fraction of the width which you wish the figure to occupy.
Returns:
tuple: Dimensions of figure in inches.
"""
# Width of figure (in pts)
fig_width_pt = width * fraction

# Convert from pt to inches
inches_per_pt = 1 / 72.27

# Golden ratio to set aesthetic figure height
# https://disq.us/p/2940ij3
golden_ratio = (5**0.5 - 1) / 2

# Figure width in inches
fig_width_in = fig_width_pt * inches_per_pt
# Figure height in inches
fig_height_in = fig_width_in * golden_ratio

fig_dim = (fig_width_in, fig_height_in)

return fig_dim


def update_matplotlib_rc(width=252 * 1.8, fraction=1.0, fontsize=10):
mpl.rcParams.update(
{
"figure.figsize": figure_size(width=width, fraction=fraction),
"figure.facecolor": "white",
"figure.edgecolor": "white",
"savefig.dpi": 360,
"figure.subplot.bottom": 0.5,
# Use LaTeX to write all text
"text.usetex": True,
# "font.family": "serif",
# Use 10pt font in plots, to match 10pt font in document
"axes.labelsize": fontsize,
"font.size": fontsize,
# Make the legend/label fonts a little smaller
"legend.fontsize": fontsize - 3,
"xtick.labelsize": fontsize - 1,
"ytick.labelsize": fontsize - 1,
# tight layout,
"figure.autolayout": True,
}
)

0 comments on commit 739bf66

Please sign in to comment.