Skip to content

Commit

Permalink
feat: add scipy Optimizer adapter (#231)
Browse files Browse the repository at this point in the history
* move parameter flattening code into separate private submodule
* add test for scipy Optimizer
* make scipy and optional dependency
  • Loading branch information
spflueger committed Mar 17, 2021
1 parent 96cb06f commit 7ad175f
Show file tree
Hide file tree
Showing 23 changed files with 302 additions and 105 deletions.
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@
"pwa": ("https://pwa.readthedocs.io", None),
"pycompwa": ("https://compwa.github.io", None),
"python": ("https://docs.python.org/3", None),
"scipy": ("https://docs.scipy.org/doc/scipy/reference/", None),
"sympy": ("https://docs.sympy.org/latest", None),
"tensorflow": (
"https://www.tensorflow.org/api_docs/python",
Expand Down
11 changes: 5 additions & 6 deletions reqs/3.6/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#
absl-py==0.12.0
alabaster==0.7.12
amplitf==0.0.1a2
anyio==2.2.0
apipkg==1.5
appdirs==1.4.4
Expand Down Expand Up @@ -53,7 +52,7 @@ gast==0.3.3
gitdb==4.0.5
gitpython==3.1.14
google-auth-oauthlib==0.4.3
google-auth==1.27.1
google-auth==1.28.0
google-pasta==0.2.0
gprof2dot==2021.2.21
graphviz==0.16
Expand Down Expand Up @@ -81,7 +80,7 @@ json5==0.9.5
jsonschema==3.2.0
jupyter-cache==0.4.2
jupyter-client==6.1.12
jupyter-console==6.2.0
jupyter-console==6.3.0
jupyter-core==4.7.1
jupyter-packaging==0.7.12
jupyter-server==1.4.1
Expand All @@ -102,7 +101,7 @@ markdown==3.3.4
markupsafe==1.1.1
matplotlib==3.3.4
mccabe==0.6.1
mdit-py-plugins==0.2.5
mdit-py-plugins==0.2.6
mistune==0.8.4
mpmath==1.2.1
mypy-extensions==0.4.3
Expand Down Expand Up @@ -166,7 +165,7 @@ pytoml==0.1.21
pytz==2021.1
pyyaml==5.4.1
pyzmq==22.0.3
qtconsole==5.0.2
qtconsole==5.0.3
qtpy==1.9.0
regex==2020.11.13
requests-oauthlib==1.3.0
Expand Down Expand Up @@ -213,7 +212,7 @@ traitlets==4.3.3
typed-ast==1.4.2
typing-extensions==3.7.4.3 ; python_version < "3.8.0"
urllib3==1.26.4
virtualenv==20.4.2
virtualenv==20.4.3
wcwidth==0.2.5
webencodings==0.5.1
werkzeug==1.0.1
Expand Down
9 changes: 4 additions & 5 deletions reqs/3.6/requirements-doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#
absl-py==0.12.0
alabaster==0.7.12
amplitf==0.0.1a2
argon2-cffi==20.1.0
astunparse==1.6.3
async-generator==1.10
Expand Down Expand Up @@ -35,7 +34,7 @@ gast==0.3.3
gitdb==4.0.5
gitpython==3.1.14
google-auth-oauthlib==0.4.3
google-auth==1.27.1
google-auth==1.28.0
google-pasta==0.2.0
graphviz==0.16
grpcio==1.32.0
Expand All @@ -57,7 +56,7 @@ jinja2==2.11.3
jsonschema==3.2.0
jupyter-cache==0.4.2
jupyter-client==6.1.12
jupyter-console==6.2.0
jupyter-console==6.3.0
jupyter-core==4.7.1
jupyter-sphinx==0.3.1
jupyter==1.0.0
Expand All @@ -68,7 +67,7 @@ markdown-it-py==0.6.2
markdown==3.3.4
markupsafe==1.1.1
matplotlib==3.3.4
mdit-py-plugins==0.2.5
mdit-py-plugins==0.2.6
mistune==0.8.4
mpmath==1.2.1
myst-nb==0.12.0
Expand Down Expand Up @@ -107,7 +106,7 @@ python-dateutil==2.8.1
pytz==2021.1
pyyaml==5.4.1
pyzmq==22.0.3
qtconsole==5.0.2
qtconsole==5.0.3
qtpy==1.9.0
requests-oauthlib==1.3.0
requests==2.25.1
Expand Down
5 changes: 2 additions & 3 deletions reqs/3.6/requirements-sty.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# pip-compile --no-annotate --output-file=reqs/3.6/requirements-sty.txt reqs/3.6/requirements-sty.in
#
absl-py==0.12.0
amplitf==0.0.1a2
apipkg==1.5
appdirs==1.4.4
astroid==2.5.1
Expand Down Expand Up @@ -37,7 +36,7 @@ flake8==3.9.0
flatbuffers==1.12
gast==0.3.3
google-auth-oauthlib==0.4.3
google-auth==1.27.1
google-auth==1.28.0
google-pasta==0.2.0
gprof2dot==2021.2.21
grpcio==1.32.0
Expand Down Expand Up @@ -122,7 +121,7 @@ traitlets==4.3.3
typed-ast==1.4.2
typing-extensions==3.7.4.3 ; python_version < "3.8.0"
urllib3==1.26.4
virtualenv==20.4.2
virtualenv==20.4.3
werkzeug==1.0.1
wheel==0.36.2
wrapt==1.12.1
Expand Down
3 changes: 1 addition & 2 deletions reqs/3.6/requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# pip-compile --no-annotate --output-file=reqs/3.6/requirements-test.txt reqs/3.6/requirements-test.in
#
absl-py==0.12.0
amplitf==0.0.1a2
apipkg==1.5
astunparse==1.6.3
attrs==20.3.0
Expand All @@ -22,7 +21,7 @@ expertsystem==0.7.0
flatbuffers==1.12
gast==0.3.3
google-auth-oauthlib==0.4.3
google-auth==1.27.1
google-auth==1.28.0
google-pasta==0.2.0
gprof2dot==2021.2.21
grpcio==1.32.0
Expand Down
3 changes: 1 addition & 2 deletions reqs/3.6/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# pip-compile --no-annotate --output-file=reqs/3.6/requirements.txt reqs/3.6/requirements.in
#
absl-py==0.12.0
amplitf==0.0.1a2
astunparse==1.6.3
attrs==20.3.0
cachetools==4.2.1
Expand All @@ -18,7 +17,7 @@ expertsystem==0.7.0
flatbuffers==1.12
gast==0.3.3
google-auth-oauthlib==0.4.3
google-auth==1.27.1
google-auth==1.28.0
google-pasta==0.2.0
grpcio==1.32.0
h5py==2.10.0
Expand Down
11 changes: 5 additions & 6 deletions reqs/3.7/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#
absl-py==0.12.0
alabaster==0.7.12
amplitf==0.0.1a2
anyio==2.2.0
apipkg==1.5
appdirs==1.4.4
Expand Down Expand Up @@ -51,7 +50,7 @@ gast==0.3.3
gitdb==4.0.5
gitpython==3.1.14
google-auth-oauthlib==0.4.3
google-auth==1.27.1
google-auth==1.28.0
google-pasta==0.2.0
gprof2dot==2021.2.21
graphviz==0.16
Expand All @@ -77,7 +76,7 @@ json5==0.9.5
jsonschema==3.2.0
jupyter-cache==0.4.2
jupyter-client==6.1.12
jupyter-console==6.2.0
jupyter-console==6.3.0
jupyter-core==4.7.1
jupyter-packaging==0.7.12
jupyter-server==1.4.1
Expand All @@ -98,7 +97,7 @@ markdown==3.3.4
markupsafe==1.1.1
matplotlib==3.3.4
mccabe==0.6.1
mdit-py-plugins==0.2.5
mdit-py-plugins==0.2.6
mistune==0.8.4
mpmath==1.2.1
mypy-extensions==0.4.3
Expand Down Expand Up @@ -162,7 +161,7 @@ pytoml==0.1.21
pytz==2021.1
pyyaml==5.4.1
pyzmq==22.0.3
qtconsole==5.0.2
qtconsole==5.0.3
qtpy==1.9.0
regex==2020.11.13
requests-oauthlib==1.3.0
Expand Down Expand Up @@ -209,7 +208,7 @@ traitlets==5.0.5
typed-ast==1.4.2
typing-extensions==3.7.4.3 ; python_version < "3.8.0"
urllib3==1.26.4
virtualenv==20.4.2
virtualenv==20.4.3
wcwidth==0.2.5
webencodings==0.5.1
werkzeug==1.0.1
Expand Down
9 changes: 4 additions & 5 deletions reqs/3.7/requirements-doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#
absl-py==0.12.0
alabaster==0.7.12
amplitf==0.0.1a2
argon2-cffi==20.1.0
astunparse==1.6.3
async-generator==1.10
Expand Down Expand Up @@ -35,7 +34,7 @@ gast==0.3.3
gitdb==4.0.5
gitpython==3.1.14
google-auth-oauthlib==0.4.3
google-auth==1.27.1
google-auth==1.28.0
google-pasta==0.2.0
graphviz==0.16
grpcio==1.32.0
Expand All @@ -56,7 +55,7 @@ jinja2==2.11.3
jsonschema==3.2.0
jupyter-cache==0.4.2
jupyter-client==6.1.12
jupyter-console==6.2.0
jupyter-console==6.3.0
jupyter-core==4.7.1
jupyter-sphinx==0.3.1
jupyter==1.0.0
Expand All @@ -67,7 +66,7 @@ markdown-it-py==0.6.2
markdown==3.3.4
markupsafe==1.1.1
matplotlib==3.3.4
mdit-py-plugins==0.2.5
mdit-py-plugins==0.2.6
mistune==0.8.4
mpmath==1.2.1
myst-nb==0.12.0
Expand Down Expand Up @@ -106,7 +105,7 @@ python-dateutil==2.8.1
pytz==2021.1
pyyaml==5.4.1
pyzmq==22.0.3
qtconsole==5.0.2
qtconsole==5.0.3
qtpy==1.9.0
requests-oauthlib==1.3.0
requests==2.25.1
Expand Down
5 changes: 2 additions & 3 deletions reqs/3.7/requirements-sty.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# pip-compile --no-annotate --output-file=reqs/3.7/requirements-sty.txt reqs/3.7/requirements-sty.in
#
absl-py==0.12.0
amplitf==0.0.1a2
apipkg==1.5
appdirs==1.4.4
astroid==2.5.1
Expand Down Expand Up @@ -36,7 +35,7 @@ flake8==3.9.0
flatbuffers==1.12
gast==0.3.3
google-auth-oauthlib==0.4.3
google-auth==1.27.1
google-auth==1.28.0
google-pasta==0.2.0
gprof2dot==2021.2.21
grpcio==1.32.0
Expand Down Expand Up @@ -120,7 +119,7 @@ traitlets==5.0.5
typed-ast==1.4.2
typing-extensions==3.7.4.3 ; python_version < "3.8.0"
urllib3==1.26.4
virtualenv==20.4.2
virtualenv==20.4.3
werkzeug==1.0.1
wheel==0.36.2
wrapt==1.12.1
Expand Down
3 changes: 1 addition & 2 deletions reqs/3.7/requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# pip-compile --no-annotate --output-file=reqs/3.7/requirements-test.txt reqs/3.7/requirements-test.in
#
absl-py==0.12.0
amplitf==0.0.1a2
apipkg==1.5
astunparse==1.6.3
attrs==20.3.0
Expand All @@ -22,7 +21,7 @@ expertsystem==0.7.0
flatbuffers==1.12
gast==0.3.3
google-auth-oauthlib==0.4.3
google-auth==1.27.1
google-auth==1.28.0
google-pasta==0.2.0
gprof2dot==2021.2.21
grpcio==1.32.0
Expand Down
3 changes: 1 addition & 2 deletions reqs/3.7/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# pip-compile --no-annotate --output-file=reqs/3.7/requirements.txt reqs/3.7/requirements.in
#
absl-py==0.12.0
amplitf==0.0.1a2
astunparse==1.6.3
attrs==20.3.0
cachetools==4.2.1
Expand All @@ -18,7 +17,7 @@ expertsystem==0.7.0
flatbuffers==1.12
gast==0.3.3
google-auth-oauthlib==0.4.3
google-auth==1.27.1
google-auth==1.28.0
google-pasta==0.2.0
grpcio==1.32.0
h5py==2.10.0
Expand Down
11 changes: 5 additions & 6 deletions reqs/3.8/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#
absl-py==0.12.0
alabaster==0.7.12
amplitf==0.0.1a2
anyio==2.2.0
apipkg==1.5
appdirs==1.4.4
Expand Down Expand Up @@ -51,7 +50,7 @@ gast==0.3.3
gitdb==4.0.5
gitpython==3.1.14
google-auth-oauthlib==0.4.3
google-auth==1.27.1
google-auth==1.28.0
google-pasta==0.2.0
gprof2dot==2021.2.21
graphviz==0.16
Expand All @@ -77,7 +76,7 @@ json5==0.9.5
jsonschema==3.2.0
jupyter-cache==0.4.2
jupyter-client==6.1.12
jupyter-console==6.2.0
jupyter-console==6.3.0
jupyter-core==4.7.1
jupyter-packaging==0.7.12
jupyter-server==1.4.1
Expand All @@ -98,7 +97,7 @@ markdown==3.3.4
markupsafe==1.1.1
matplotlib==3.3.4
mccabe==0.6.1
mdit-py-plugins==0.2.5
mdit-py-plugins==0.2.6
mistune==0.8.4
mpmath==1.2.1
mypy-extensions==0.4.3
Expand Down Expand Up @@ -162,7 +161,7 @@ pytoml==0.1.21
pytz==2021.1
pyyaml==5.4.1
pyzmq==22.0.3
qtconsole==5.0.2
qtconsole==5.0.3
qtpy==1.9.0
regex==2020.11.13
requests-oauthlib==1.3.0
Expand Down Expand Up @@ -209,7 +208,7 @@ traitlets==5.0.5
typed-ast==1.4.2
typing-extensions==3.7.4.3
urllib3==1.26.4
virtualenv==20.4.2
virtualenv==20.4.3
wcwidth==0.2.5
webencodings==0.5.1
werkzeug==1.0.1
Expand Down
Loading

0 comments on commit 7ad175f

Please sign in to comment.