Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sb/time series checker #2362

Merged
merged 35 commits into from
May 19, 2021
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
f22ebf1
add time series accurcy checker
Apr 25, 2021
d29d324
update time_series metric output format
Apr 26, 2021
496ad00
update accuracy_checker for time_series
Apr 29, 2021
3cef72a
update anontation converter for electricity
Apr 29, 2021
d6d9be6
add URL for electricity
Apr 29, 2021
30349b7
remove debug code
Apr 29, 2021
673b4d9
Merge branch 'develop' into sb/time_series_checker
bes-dev Apr 29, 2021
63e4d6c
update
Apr 29, 2021
d09ef5d
bugfix
Apr 29, 2021
72badd8
update
Apr 29, 2021
152af74
update
May 4, 2021
589d7e6
update time seires inverse normalize
May 4, 2021
72cbd0e
update requirements.in
May 4, 2021
3185dfa
add pandas to requirements of CI
May 7, 2021
cb719db
rename quantiles predictor adapter
May 10, 2021
3d71016
update accuracy checker
May 11, 2021
8c24e73
add readme to time series classes
May 11, 2021
33eebe1
move url for electricity dataset to annotation converter documentation.
May 11, 2021
d9fbe68
update
May 11, 2021
c2105d7
fix CI issues
May 11, 2021
008cab0
Update ci/requirements-ac-test.txt
bes-dev May 11, 2021
816d1b5
Update ci/requirements-ac.txt
bes-dev May 11, 2021
442a1b1
add unsupportedpackage for pandas
May 18, 2021
2896f4e
Merge branch 'develop' into sb/time_series_checker
eaidova May 18, 2021
7a4d2a8
Update tools/accuracy_checker/accuracy_checker/annotation_converters/…
bes-dev May 18, 2021
1c6f6c3
Update tools/accuracy_checker/accuracy_checker/annotation_converters/…
bes-dev May 18, 2021
c67ddc1
fix indention
eaidova May 18, 2021
e9b14eb
fix electricity annotation converter issues
May 19, 2021
968d00d
update
May 19, 2021
40ae037
update
May 19, 2021
e360e0b
resolve merge conflicts
May 19, 2021
ab85917
fix time series ac issues
May 19, 2021
aaf3135
update
May 19, 2021
2d46565
update
May 19, 2021
ff05698
fix isseues
May 19, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions tools/accuracy_checker/accuracy_checker/adapters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -412,3 +412,6 @@ AccuracyChecker supports following set of adapters:
* `max_active` - max active paths for decoding (Optional, default `7000`).
* `inverse_acoustic_scale` - inverse acoustic scale for lattice scaling (Optional, default `0`).
* `word_insertion_penalty` - add word insertion penalty to the lattice. Penalties are negative log-probs, base e, and are added to the language model' part of the cost (Optional, `0`).
* `quantiles_predictor` - converts output of Time Series Forecasting models to `TimeSeriesForecastingQuantilesPrediction`.
* `quantiles` - preds[i]->quantile[i] mapping.
* `output_name` - name of output node to convert.
3 changes: 3 additions & 0 deletions tools/accuracy_checker/accuracy_checker/adapters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@
from .noise_suppression import NoiseSuppressionAdapter
from .dummy_adapters import GVADetectionAdapter, XML2DetectionAdapter, GVAClassificationAdapter

from .time_series import QuantilesPredictorAdapter

__all__ = [
'Adapter',
'AdapterField',
Expand Down Expand Up @@ -241,4 +243,5 @@
'GVADetectionAdapter',
'GVAClassificationAdapter',

'QuantilesPredictorAdapter'
]
47 changes: 47 additions & 0 deletions tools/accuracy_checker/accuracy_checker/adapters/time_series.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
"""
Copyright (c) 2018-2021 Intel Corporation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""

from .adapter import Adapter
from ..representation import TimeSeriesForecastingQuantilesPrediction
from ..config import StringField, DictField


class QuantilesPredictorAdapter(Adapter):
__provider__ = 'quantiles_predictor'

@classmethod
def parameters(cls):
parameters = super().parameters()
parameters.update({
'quantiles': DictField(
allow_empty=False,
description="preds[i]->quantile[i] mapping."
),
"output_name": StringField()
})
return parameters

def configure(self):
self.quantiles = self.get_value_from_config('quantiles')
self.output_name = str(self.get_value_from_config('output_name'))

def process(self, raw, identifiers, frame_meta):
raw_outputs = self._extract_predictions(raw, frame_meta)
output = raw_outputs[self.output_name]
preds = TimeSeriesForecastingQuantilesPrediction(identifiers[0])
for k, v in self.quantiles.items():
preds[k] = output[:, :, v]
return [preds]
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,9 @@ The main difference between this converter and `super_resolution` in data organi
* `ref_data_dir` - directory with reference ark files (Optional, if not provided `data_dir` will be used instead).
* `vectors_mode` - allow usage each vector in utterance as independent data.
* `ref_file_suffix` - suffix for search reference files (Optional, default `_kaldi_score`).
* `electricity` - converts Electricity dataset to `TimeSeriesForecastingAnnotation`.
* `data_path_file` - Path to dataset file in .csv format.
* `num_encoder_steps` - The maximum number of historical timestamps that model use.
* `yolo_labeling` - converts object detection dataset with annotation in YOLO labeling format to `DetectionAnnotation`.
* `data_dir` - path to directory with annotation files in txt format and images.
* `labels_file` - path to file with labels in txt format (optional).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
from .noise_suppression_dataset import NoiseSuppressionDatasetConverter
from .vimeo90k_sr import Vimeo90KSuperResolutionDatasetConverter
from .lmdb import LMDBConverter
from .electricity_time_series_forecasting import ElectricityTimeSeriesForecastingConverter
from .kaldi_speech_recognition_pipeline import KaldiSpeechRecognitionDataConverter, KaldiFeatureRegressionConverter
from .yolo_labeling_converter import YOLOLabelingConverter

Expand Down Expand Up @@ -201,6 +202,7 @@
'NoiseSuppressionDatasetConverter',
'Vimeo90KSuperResolutionDatasetConverter',
'LMDBConverter',
'ElectricityTimeSeriesForecastingConverter',
'KaldiSpeechRecognitionDataConverter',
'KaldiFeatureRegressionConverter',
'ParametricImageProcessing',
Expand Down