Skip to content

Commit d25d4c2

Browse files
authored
Make tranquilo an optional dependency (#464)
1 parent dfc968c commit d25d4c2

File tree

82 files changed

+133
-11955
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+133
-11955
lines changed

.envs/testenv-linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ dependencies:
1616
- click # run, tests
1717
- cloudpickle # run, tests
1818
- joblib # run, tests
19-
- numba # run, tests
2019
- numpy>=1.17.0 # run, tests
2120
- pandas # run, tests
2221
- plotly # run, tests
2322
- pybaum >= 0.1.2 # run, tests
2423
- scipy>=1.2.1 # run, tests
2524
- sqlalchemy # run, tests
25+
- tranquilo>=0.0.4 # dev, tests
2626
- pip: # dev, tests, docs
2727
- DFO-LS # dev, tests
2828
- Py-BOBYQA # dev, tests

.envs/testenv-others.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ dependencies:
1515
- click # run, tests
1616
- cloudpickle # run, tests
1717
- joblib # run, tests
18-
- numba # run, tests
1918
- numpy>=1.17.0 # run, tests
2019
- pandas # run, tests
2120
- plotly # run, tests
2221
- pybaum >= 0.1.2 # run, tests
2322
- scipy>=1.2.1 # run, tests
2423
- sqlalchemy # run, tests
24+
- tranquilo>=0.0.4 # dev, tests
2525
- pip: # dev, tests, docs
2626
- DFO-LS # dev, tests
2727
- Py-BOBYQA # dev, tests

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ jobs:
2121
os:
2222
- ubuntu-latest
2323
python-version:
24-
- '3.8'
2524
- '3.9'
2625
- '3.10'
26+
- '3.11'
2727
steps:
2828
- uses: actions/checkout@v3
2929
- name: create build environment
@@ -54,9 +54,9 @@ jobs:
5454
- macos-latest
5555
- windows-latest
5656
python-version:
57-
- '3.8'
5857
- '3.9'
5958
- '3.10'
59+
- '3.11'
6060
steps:
6161
- uses: actions/checkout@v3
6262
- name: create build environment

CHANGES.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,27 @@ This is a record of all past estimagic releases and what went into them in rever
44
chronological order. We follow [semantic versioning](https://semver.org/) and all
55
releases are available on [Anaconda.org](https://anaconda.org/OpenSourceEconomics/estimagic).
66

7+
Following the [scientific python guidelines](https://scientific-python.org/specs/spec-0000/)
8+
we drop the official support for Python 3.8.
9+
10+
11+
## 0.4.6
12+
13+
This release drastically improves the optimizer benchmarking capabilities, especially
14+
with noisy functions and parallel optimizers. It makes tranquilo and numba optional
15+
dependencies and is the first version of estimagic to be compatible with Python
16+
3.11.
17+
18+
19+
- {gh}`464` Makes tranquilo and numba optional dependencies ({ghuser}`janosg`)
20+
- {gh}`461` Updates docstrings for procss_benchmark_results ({ghuser}`segsell`)
21+
- {gh}`460` Fixes several bugs in the processing of benchmark results with noisy
22+
functions ({ghuser}`janosg`)
23+
- {gh}`459` Prepares benchmarking functionality for parallel optimizers
24+
({ghuser}`mpetrosian` and {ghuser}`janosg`)
25+
- {gh}`457` Removes some unused files ({ghuser}`segsell`)
26+
- {gh}`455` Improves a local pre-commit hook ({ghuser}`ChristianZimpelmann`)
27+
728

829
## 0.4.5
930

docs/rtd_environment.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ dependencies:
1717
- ipython_genutils
1818
- myst-nb
1919
- pydata-sphinx-theme<=0.12.0
20-
- numba
2120
- pybaum
2221
- matplotlib
2322
- seaborn

docs/source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
"petsc4py",
7878
"statsmodels",
7979
"numba",
80+
"tranquilo",
8081
]
8182

8283
extlinks = {

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ dependencies:
2222
- click # run, tests
2323
- cloudpickle # run, tests
2424
- joblib # run, tests
25-
- numba # run, tests
2625
- numpy>=1.17.0 # run, tests
2726
- pandas # run, tests
2827
- plotly # run, tests
@@ -35,6 +34,7 @@ dependencies:
3534
- sphinx-copybutton # docs
3635
- sphinx-panels # docs
3736
- sphinxcontrib-bibtex # docs
37+
- tranquilo>=0.0.4 # dev, tests
3838
- pip: # dev, tests, docs
3939
- DFO-LS # dev, tests
4040
- Py-BOBYQA # dev, tests

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ filterwarnings = [
9191
"ignore:Widget._widget_types is deprecated",
9292
"ignore:Widget.widget_types is deprecated",
9393
"ignore:Widget.widgets is deprecated",
94+
"ignore:Parallelization together with",
9495
]
9596
addopts = ["--doctest-modules"]
9697
markers = [

setup.cfg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ install_requires =
3939
click
4040
cloudpickle
4141
joblib
42-
numba
4342
numpy>=1.17.0
4443
pandas
4544
plotly

src/estimagic/algorithms.py

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import inspect
2+
3+
from estimagic.optimization import (
4+
bhhh,
5+
cyipopt_optimizers,
6+
fides_optimizers,
7+
nag_optimizers,
8+
neldermead,
9+
nlopt_optimizers,
10+
pounders,
11+
pygmo_optimizers,
12+
scipy_optimizers,
13+
simopt_optimizers,
14+
tao_optimizers,
15+
tranquilo,
16+
)
17+
18+
MODULES = [
19+
cyipopt_optimizers,
20+
fides_optimizers,
21+
nag_optimizers,
22+
nlopt_optimizers,
23+
pygmo_optimizers,
24+
scipy_optimizers,
25+
simopt_optimizers,
26+
tao_optimizers,
27+
bhhh,
28+
neldermead,
29+
pounders,
30+
tranquilo,
31+
]
32+
33+
ALL_ALGORITHMS = {}
34+
AVAILABLE_ALGORITHMS = {}
35+
for module in MODULES:
36+
func_dict = dict(inspect.getmembers(module, inspect.isfunction))
37+
for name, func in func_dict.items():
38+
if hasattr(func, "_algorithm_info"):
39+
ALL_ALGORITHMS[name] = func
40+
if func._algorithm_info.is_available:
41+
AVAILABLE_ALGORITHMS[name] = func
42+
43+
44+
GLOBAL_ALGORITHMS = [
45+
name for name, func in ALL_ALGORITHMS.items() if func._algorithm_info.is_global
46+
]

0 commit comments

Comments
 (0)