Skip to content

Commit

Permalink
Update for release 0.2.1 (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrapin authored May 16, 2019
1 parent 0ea4503 commit 947bfd7
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
13 changes: 11 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,20 @@

## master

N/A

## v0.2.1

### Breaking changes

- changed `tanh` to `arctan` as default for bounded variables (much wider range).
- changed cumulative Gaussian density to `arctan` for rescaling in `BO` (much wider range).
- renamed `Array.asfloat` method to `Array.asscalar` and allow casting to `int` as well through an argument.

### Other changes

- fixed `tell_not_asked` for `DE` family of optimizers.
- added `dump` and `load` method to `Optimizer`.
- changed `tanh` to `arctan` as default for bounded variables (much wider range).
- changed cumulative Gaussian density to `arctan` for rescaling in `BO` (much wider range).
- Added warnings against inefficient settings: `BO` algorithms with dis-continuous or noisy instrumentations
without appropriate parametrization, `PSO` and `DE` for low budget.
- improved benchmark plots legend.
Expand Down
2 changes: 1 addition & 1 deletion nevergrad/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

__version__ = "0.2.0"
__version__ = "0.2.1"
17 changes: 11 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@
from setuptools import setup
from setuptools import find_packages


# read requirements

requirements: Dict[str, List[str]] = {}
for extra in ["dev", "bench", "main"]:
with open(f"requirements/{extra}.txt") as f:
requirements[extra] = f.read().splitlines()
requirements[extra] = Path(f"requirements/{extra}.txt").read_text().splitlines()


# build long description
Expand All @@ -29,8 +31,9 @@ def _replace_relative_links(regex: Match[str]) -> str:
link = regex.group("link")
name = regex.group("name")
if not link.startswith("http") and Path(link).exists():
string = f"[{name}](https://github.com/facebookresearch/nevergrad/blob/master/{link})"
print(string)
githuburl = ("github.com/facebookresearch/nevergrad/blob/master" if not link.endswith(".gif") else
"raw.githubusercontent.com/facebookresearch/nevergrad/master")
string = f"[{name}](https://{githuburl}/{link})"
return string


Expand All @@ -39,13 +42,15 @@ def _replace_relative_links(regex: Match[str]) -> str:


# find version
with open("nevergrad/__init__.py", "r", encoding="utf-8") as fh:
init_str = fh.read()

init_str = Path("nevergrad/__init__.py").read_text()
match = re.search(r"^__version__ = \"(?P<version>[\w\.]+?)\"$", init_str, re.MULTILINE)
assert match is not None, "Could not find version in nevergrad/__init__.py"
version = match.group("version")


# setup

setup(
name="nevergrad",
version=version,
Expand Down

0 comments on commit 947bfd7

Please sign in to comment.