Skip to content

Commit

Permalink
Update gordo-core and gordo-client (#1313)
Browse files Browse the repository at this point in the history
* Update gordo-core and gordo-client

* Update README.md

* Update scripts/tests.sh

* asset_ calls for mocks

* ModelBuilder should not call report. report has called from cli build command

* Black reformating

* Fix test_gunicorn_execution_hosts

* black reformating
  • Loading branch information
koropets authored Apr 13, 2023
1 parent 8a5b671 commit 2b81986
Show file tree
Hide file tree
Showing 11 changed files with 93 additions and 83 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ Gordo fulfills the role of inhaling config files and supplying components to the

## Components

* [gordo-controller](https://github.com/equinor/gordo-controller/) - Kubernetes controller for the Gordo CRD.
* [gordo-controller](https://github.com/equinor/gordo-controller/) - Kubernetes controller for the Gordo CRDs.
* [gordo-core](https://github.com/equinor/gordo-core/) - Gordo core library.
* [gordo-client](https://github.com/equinor/gordo-client/) - Gordo server's client. It is able to make predictions from deployed models.
* [gordo-client](https://github.com/equinor/gordo-client/) - Gordo server's client. It can make predictions from deployed models.

---
## Install
Expand Down
47 changes: 23 additions & 24 deletions requirements/full_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ adal==1.2.7
# via
# azureml-core
# msrestazure
alembic==1.10.2
alembic==1.10.3
# via mlflow
argcomplete==2.1.2
# via
Expand All @@ -29,7 +29,7 @@ azure-common==1.1.28
# azure-mgmt-resource
# azure-mgmt-storage
# azureml-core
azure-core==1.26.3
azure-core==1.26.4
# via
# azure-mgmt-core
# azureml-core
Expand All @@ -40,20 +40,20 @@ azure-mgmt-authorization==3.0.0
# via azureml-core
azure-mgmt-containerregistry==10.1.0
# via azureml-core
azure-mgmt-core==1.3.2
azure-mgmt-core==1.4.0
# via
# azure-mgmt-authorization
# azure-mgmt-containerregistry
# azure-mgmt-keyvault
# azure-mgmt-resource
# azure-mgmt-storage
azure-mgmt-keyvault==10.1.0
azure-mgmt-keyvault==10.2.1
# via azureml-core
azure-mgmt-resource==21.2.1
azure-mgmt-resource==22.0.0
# via azureml-core
azure-mgmt-storage==20.1.0
azure-mgmt-storage==21.0.0
# via azureml-core
azureml-core==1.49.0
azureml-core==1.50.0
# via -r mlflow_requirements.in
backports-tempfile==1.0
# via azureml-core
Expand Down Expand Up @@ -128,17 +128,17 @@ gitdb==4.0.10
# via gitpython
gitpython==3.1.31
# via mlflow
google-auth==2.17.1
google-auth==2.17.3
# via
# google-auth-oauthlib
# tensorboard
google-auth-oauthlib==1.0.0
# via tensorboard
google-pasta==0.2.0
# via tensorflow
gordo-client==6.2.0rc0
gordo-client==6.2.0
# via -r requirements.in
gordo-core==0.3.0rc0
gordo-core==0.3.0
# via
# -r requirements.in
# gordo-client
Expand All @@ -162,7 +162,7 @@ humanfriendly==10.0
# via azureml-core
idna==3.4
# via requests
importlib-metadata==6.1.0
importlib-metadata==6.3.0
# via
# flask
# markdown
Expand All @@ -172,7 +172,9 @@ importlib-resources==5.12.0
influxdb==5.3.1
# via gordo-core
isodate==0.6.1
# via msrest
# via
# azure-mgmt-keyvault
# msrest
itsdangerous==2.1.2
# via flask
jax==0.4.8
Expand All @@ -190,7 +192,7 @@ jmespath==1.0.1
# knack
joblib==1.2.0
# via scikit-learn
jsonpickle==2.2.0
jsonpickle==3.0.1
# via azureml-core
keras==2.12.0
# via tensorflow
Expand All @@ -210,7 +212,6 @@ markdown==3.4.3
# tensorboard
markupsafe==2.1.2
# via
# -r requirements.in
# jinja2
# mako
# werkzeug
Expand All @@ -224,7 +225,7 @@ matplotlib==3.7.1
# via
# catboost
# mlflow
ml-dtypes==0.0.4
ml-dtypes==0.1.0
# via jax
mlflow==2.2.2
# via -r mlflow_requirements.in
Expand All @@ -241,7 +242,6 @@ msrest==0.7.1
# azure-graphrbac
# azure-mgmt-authorization
# azure-mgmt-containerregistry
# azure-mgmt-keyvault
# azure-mgmt-resource
# azure-mgmt-storage
# azureml-core
Expand Down Expand Up @@ -306,7 +306,7 @@ pandas==1.5.3
# mlflow
# shap
# xarray
paramiko==2.12.0
paramiko==3.1.0
# via azureml-core
pathspec==0.11.1
# via azureml-core
Expand All @@ -316,18 +316,18 @@ pillow==9.5.0
# via matplotlib
pkginfo==1.9.6
# via azureml-core
plotly==5.14.0
plotly==5.14.1
# via catboost
portalocker==2.7.0
# via msal-extensions
prometheus-client==0.16.0
# via -r requirements.in
protobuf==4.22.1
protobuf==4.22.3
# via
# mlflow
# tensorboard
# tensorflow
psycopg2-binary==2.9.5
psycopg2-binary==2.9.6
# via -r postgres_requirements.in
pyarrow==10.0.1
# via
Expand All @@ -344,7 +344,7 @@ pycparser==2.21
# via cffi
pydantic==1.10.7
# via gordo-client
pygments==2.14.0
pygments==2.15.0
# via knack
pyjwt[crypto]==2.6.0
# via
Expand Down Expand Up @@ -421,7 +421,7 @@ secretstorage==3.3.3
# via azureml-core
shap==0.41.0
# via mlflow
simplejson==3.18.4
simplejson==3.19.1
# via
# -r requirements.in
# gordo-client
Expand All @@ -436,15 +436,14 @@ six==1.16.0
# influxdb
# isodate
# msrestazure
# paramiko
# python-dateutil
# querystring-parser
# tensorflow
slicer==0.0.7
# via shap
smmap==5.0.0
# via gitdb
sqlalchemy==2.0.8
sqlalchemy==2.0.9
# via
# alembic
# mlflow
Expand Down
2 changes: 1 addition & 1 deletion requirements/mlflow_requirements.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
mlflow~=2.2.2
mlflow~=2.2
azureml-core~=1.49
5 changes: 2 additions & 3 deletions requirements/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@ catboost~=1.1.1
prometheus_client~=0.7
# Due to azureml-core 1.49.0 depends on packaging<22.0
packaging>=21.0,<22.0
gordo-client==6.2.0rc0
gordo-core==0.3.0rc0
MarkupSafe>=2.1.2,<3.0.0
gordo-client==6.2.0
gordo-core==0.3.0
11 changes: 5 additions & 6 deletions requirements/test_requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@ docker>=4.0,<7.0
pytest~=7.2
pytest-xdist~=3.2
pytest-mock~=3.6
pytest-mypy~=0.9
pytest-mypy~=0.10
pytest-timeout~=2.1
pytest-cov~=4.0
pytest-benchmark~=4.0
mock~=4.0
responses~=0.13
pytest-flakes~=4.0
mock~=5.0
responses~=0.23
# Due to packaging>22.0 in black 23.0, azureml-core~=1.49 requires packaging<22.0
black>=22.0,<23.0
pytest-flakes~=4.0
notebook~=6.4
# Due to jinja2>=3.0 from nbconvert==6.5.3
nbconvert>=6.0,<6.5.0
nbconvert~=6.5
types-simplejson
types-python-dateutil
types-PyYAML
Expand Down
29 changes: 18 additions & 11 deletions requirements/test_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ jupyter-server==1.21.0
# notebook-shim
jupyterlab-pygments==0.2.2
# via nbconvert
lxml==4.9.2
# via nbconvert
markupsafe==2.1.2
# via
# -c full_requirements.txt
Expand All @@ -131,7 +133,7 @@ matplotlib-inline==0.1.6
# ipython
mistune==0.8.4
# via nbconvert
mock==4.0.3
mock==5.0.1
# via -r test_requirements.in
mypy==0.982
# via pytest-mypy
Expand All @@ -144,7 +146,7 @@ nbclassic==0.4.8
# via notebook
nbclient==0.5.13
# via nbconvert
nbconvert==6.4.5
nbconvert==6.5.4
# via
# -r test_requirements.in
# jupyter-server
Expand Down Expand Up @@ -174,6 +176,7 @@ packaging==21.3
# docker
# ipykernel
# jupyter-server
# nbconvert
# pytest
pandocfilters==1.5.0
# via nbconvert
Expand Down Expand Up @@ -215,7 +218,7 @@ pycparser==2.21
# cffi
pyflakes==2.5.0
# via pytest-flakes
pygments==2.14.0
pygments==2.15.0
# via
# -c full_requirements.txt
# ipython
Expand Down Expand Up @@ -258,6 +261,10 @@ python-dateutil==2.8.2
# via
# -c full_requirements.txt
# jupyter-client
pyyaml==5.4.1
# via
# -c full_requirements.txt
# responses
pyzmq==24.0.1
# via
# ipykernel
Expand All @@ -270,7 +277,7 @@ requests[socks]==2.28.2
# -c full_requirements.txt
# docker
# responses
responses==0.22.0
responses==0.23.1
# via -r test_requirements.in
send2trash==1.8.0
# via
Expand All @@ -293,10 +300,8 @@ terminado==0.17.0
# jupyter-server
# nbclassic
# notebook
testpath==0.6.0
tinycss2==1.2.1
# via nbconvert
toml==0.10.2
# via responses
tomli==1.2.3
# via
# black
Expand Down Expand Up @@ -331,15 +336,15 @@ types-python-dateutil==2.8.19.2
types-pytz==2022.6.0.1
# via -r test_requirements.in
types-pyyaml==6.0.12.1
# via -r test_requirements.in
# via
# -r test_requirements.in
# responses
types-requests==2.28.11.2
# via -r test_requirements.in
types-setuptools==65.5.0.2
# via -r test_requirements.in
types-simplejson==3.17.7.1
# via -r test_requirements.in
types-toml==0.10.8
# via responses
types-urllib3==1.26.25.1
# via types-requests
typing-extensions==4.5.0
Expand All @@ -356,7 +361,9 @@ urllib3==1.26.15
wcwidth==0.2.5
# via prompt-toolkit
webencodings==0.5.1
# via bleach
# via
# bleach
# tinycss2
websocket-client==1.5.1
# via
# -c full_requirements.txt
Expand Down
4 changes: 2 additions & 2 deletions scripts/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function show_help() {
echo "Runs CI pytest action."
echo
echo "-n uses xdist to speedup slow-running tests"
echo "-p export PYTHONPATH=. environment variable. Helpful when gordo is not being installed in the system"
echo "-p export PYTHONPATH=. environment variable. Helpful when gordo is not installed in the system"
echo "-h display this help and exit"
exit $1
}
Expand Down Expand Up @@ -98,7 +98,7 @@ case "$action" in
pytest --benchmark-only benchmarks/
;;
*)
echo "Wrong action '$action'." 1>&2
echo "Wrong action \"$action\"." 1>&2
show_help 2
;;
esac
11 changes: 0 additions & 11 deletions tests/gordo/builder/test_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -746,14 +746,3 @@ def test_n_splits_from_config(mocked_pipeline_from_definition, cv):
mocked_pipeline_from_definition.assert_called_with(
{"sklearn.model_selection.TimeSeriesSplit": {"n_splits": 3}}
)


@patch("gordo.machine.Machine.report")
def test_builder_calls_machine_report(mocked_report_method, metadata):
"""
When building a machine, the Modelbuilder.build should call Machine.report()
so that it can run any reporters in the Machine's runtime.
"""
machine = Machine.from_dict(metadata)
ModelBuilder(machine).build()
assert mocked_report_method.called_once()
Loading

0 comments on commit 2b81986

Please sign in to comment.