Gordo

Latest version: v6.0.3

Safety actively analyzes 687918 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 39 of 56

0.32.0rc1

- Change sleep time from xor to exponentiation (https://github.com/equinor/gordo-components/pull/465)
- Builder: always save model to output_dir (https://github.com/equinor/gordo-components/pull/461)
- Change retries in client to have exponential sleep time (https://github.com/equinor/gordo-components/pull/464)
- Expose evaluation from config in model builder (https://github.com/equinor/gordo-components/pull/458)
- Make ML Server serve multiple models (https://github.com/equinor/gordo-components/pull/460)

0.31.0

- Update requirements (https://github.com/equinor/gordo-components/pull/440)
- Make autoencoder API parameters match and add some input validation (https://github.com/equinor/gordo-components/pull/431)
- Expose `optimizer` and `optimizer_kwargs` in feedforward_model factory (https://github.com/equinor/gordo-components/pull/429)
- Change interactive logic (https://github.com/equinor/gordo-components/pull/428)
- Cli dockstring fix (https://github.com/equinor/gordo-components/pull/439)
- Add model offset to metadata (https://github.com/equinor/gordo-components/pull/444)
- Model builder - Support a pure CV/HP mode (https://github.com/equinor/gordo-components/pull/395)
- Switch to CircleCI and push to Dockerhub (https://github.com/equinor/gordo-components/pull/442, https://github.com/equinor/gordo-components/pull/451, https://github.com/equinor/gordo-components/pull/450, https://github.com/equinor/gordo-components/pull/454)
- Add EV, R2, MSE and MAE to metadata (https://github.com/equinor/gordo-components/pull/377)
- Client adjust for offset (https://github.com/equinor/gordo-components/pull/445)
- Add more explicit docs about resolution strings (https://github.com/equinor/gordo-components/pull/457)

0.30.0

- Add simple dataframe serialization ability to server serializer utils (https://github.com/equinor/gordo-components/commit/0b2b84dbf93a3e442d78359c3477e4c51974d025)
- Remove logic that y must be a subset of X for anomaly detection. (https://github.com/equinor/gordo-components/commit/6d75c37dc913e89d2bd299d61246be28de684346)

0.29.0

- Make client auto choose prediction endpoint (https://github.com/equinor/gordo-components/commit/66901600183c50a60ae22d65f56189291255384d)
- Add **kwargs to sub_providers (iroc and ncs_reader) (https://github.com/equinor/gordo-components/commit/63c53ef9eade25732f683f757adb9a3ee5ce193b)
- Remove explicit threads=None argument from DataLakeProvider __init__ (https://github.com/equinor/gordo-components/commit/697a5b2d84f6d981eca8d993481f6de113576efe)
- Fix overwrite of y in KerasLSTMAutoEncoder.fit (https://github.com/equinor/gordo-components/commit/dd390e16332d0c84ce0218e9c178aa9e649b50eb)

0.28.0

New release of gordo-components!

Small changes:
- All dependencies are updated, including pandas (0.24.2->0.25.0)
- Fix issue where IROC reader used 1 thread by default. (409)
- Add exponential retries to influx forwarder (413)
- Filter bad data (code 0) from the datalake (423)
- Wrapper enabling use of standard scikit-learn scorers (427)

Major change:
Change all our keras neural networks to take an explicit `y` instead of using the passed (and possibly scaled) `X` as the target.
This gives more freedom in several ways:
- It allows training towards a un-scaled `y` with a scaled `X`, or having them xscaled in different ways.
- It allows the `y` and `X` to be different sets of tags. The target `y` can be a subset of `X` or even a completely different set of tags.
- It follows the standard scikit-learn pattern, making it easier to use e.g. standard scikit-learn scorers. (more about this below)

But it also involves some changes in the model definitions to get the same behavior as before.

Change in model format:

Previous model definition:
yaml
model:
sklearn.pipeline.Pipeline:
steps:
- sklearn.preprocessing.data.MinMaxScaler
- gordo_components.model.models.KerasLSTMAutoEncoder:
kind: lstm_hourglass
lookback_window: 10


New model definition:
yaml
model:
gordo_components.model.anomaly.diff.DiffBasedAnomalyDetector:
base_estimator:
sklearn.compose.TransformedTargetRegressor:
transformer: sklearn.preprocessing.data.MinMaxScaler
regressor:
sklearn.pipeline.Pipeline:
steps:
- sklearn.preprocessing.data.MinMaxScaler
- gordo_components.model.models.KerasLSTMAutoEncoder:
kind: lstm_hourglass
lookback_window: 10

Explanation:
The first class, `gordo_components.model.anomaly.diff.DiffBasedAnomalyDetector` is a class which takes a base estimator as a parameter, and provides a new method `anomaly` in addition to any methods the `base_estimator` already has (like `fit` and `predict`). In the case of `DiffBasedAnomalyDetector` the call to `anomaly(X,y)` is implemented by calling `predict` on the `base_estimator`, scaling the output, scaling the passed `y`, calculating the absolute value of the differences, and then calculating the norm. The output of `anomaly(X,y)` is a multi-level dataframe with the original input and output to the base-estimator, in addition to per-sensor calculated errors (abs of differences) and the complete error score. The major difference from before is that the error-calculations are now an explicit class which can be used in e.g. notebooks, instead of existing as a function in the server-class.

The second new class in the config above is `sklearn.compose.TransformedTargetRegressor`. This is a standard scikit-learn class which allows one to scale the target `y` before the model is fitted, and then inverse scales the output of the `base_estimator` when `predict` is called. This class is needed if you want the Keras network to train towards scaled `y` as it was before, if you do not want this then you can omit the `sklearn.compose.TransformedTargetRegressor`.



Using scikit learn scores
It is now possible to use standard scikit-learn scorers with a simple wrapper.
Example:

python

from gordo_components import serializer
import yaml
import numpy
from sklearn.metrics import r2_score

config = yaml.load(
"""
sklearn.pipeline.Pipeline:
steps:
- sklearn.preprocessing.data.MinMaxScaler
- gordo_components.model.models.KerasLSTMAutoEncoder:
kind: lstm_hourglass
lookback_window: 10
epochs: 20
"""
)
model = serializer.pipeline_from_definition(config)

X = numpy.random.rand(100,10)
y = numpy.random.rand(100,10)

model.fit(X,y)
This will fail since the output and the target is of different length

r2_score(X,model.predict(X))

The fix:
from gordo_components.model.utils import metric_wrapper
metric_wrapper(r2_score)(X, model.predict(X))

0.27.0

- Watchman: Handle empty events gracefully (381)
- Support custom aggregation methods in TimeSeriesDataset (369)

Page 39 of 56

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.