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

[OTE-TEST] Disable obsolete test cases #1220

Merged
merged 35 commits into from
Sep 16, 2022
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
ab556f5
Disable some models
harimkang Aug 24, 2022
9d7bd3f
Update test init
harimkang Aug 26, 2022
bb1063a
Disable mmdet Sample
harimkang Aug 26, 2022
038bd45
Remove mmdet e2e test
harimkang Aug 29, 2022
2e1aa1c
Remove training test
harimkang Aug 29, 2022
2536816
Change to Skip state for cli test
harimkang Aug 29, 2022
858ce86
Reflect some fix
harimkang Aug 29, 2022
c3a73e4
Split test cases to tasks
harimkang Aug 30, 2022
4ba9f2e
Set black & conftest flake
harimkang Aug 30, 2022
7e12c22
ote_cli file naming change
harimkang Aug 30, 2022
0dfcc9b
import issue fix
harimkang Aug 30, 2022
3c4d080
Fix some import
harimkang Aug 30, 2022
59154e9
Fix filename for test cache
harimkang Aug 31, 2022
d29fce0
Check for MPA tests
harimkang Aug 31, 2022
bb49046
Collection issue
harimkang Sep 5, 2022
223faa6
cls req fix
harimkang Sep 5, 2022
6a4f6c7
Update mmdet const
harimkang Sep 5, 2022
4766bd7
Disable params tests
harimkang Sep 5, 2022
410355c
Remedy fix
harimkang Sep 5, 2022
e2a58ff
remove constraints typing-extensions
harimkang Sep 6, 2022
6288ff1
Add init
harimkang Sep 6, 2022
ddc744b
Some fix in init_venv
harimkang Sep 6, 2022
8e2e062
optuna version change
harimkang Sep 6, 2022
38dadba
Disable ote_cli tests (mmdet, dor, mmseg)
harimkang Sep 7, 2022
76e0ba5
Rebase tests/ote_cli
harimkang Sep 7, 2022
f87a96a
Fix prettier issue
JihwanEom Sep 7, 2022
b09f8da
Apply black format in MPA test codes
harimkang Sep 7, 2022
2f9bd88
pytest initial setting fix
harimkang Sep 7, 2022
01f9de7
Add MPA pre-commit tests
harimkang Sep 7, 2022
7947032
Add pre-commit to MPA
harimkang Sep 7, 2022
422c786
test_template_file to MPA & anomaly
harimkang Sep 15, 2022
acb60fe
Enable black format to test_template file
harimkang Sep 15, 2022
61d8f53
Rebase develop branch
harimkang Sep 16, 2022
860e86e
Temporal disable pydocstyle test of MPA
harimkang Sep 16, 2022
078f9a2
Change ote_cli tests train_params
harimkang Sep 16, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply black format in MPA test codes
harimkang committed Sep 7, 2022
commit b09f8da13da00324a7d9121b1f34ce08994b84e3
2 changes: 1 addition & 1 deletion external/model-preparation-algorithm/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Copyright (C) 2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
#
5 changes: 4 additions & 1 deletion external/model-preparation-algorithm/tests/config.py
Original file line number Diff line number Diff line change
@@ -6,6 +6,9 @@
import os
from e2e import config as config_e2e

config_e2e.repository_name = os.environ.get('TT_REPOSITORY_NAME', 'ote/training_extensions/external/model-preparation-algorithm')
config_e2e.repository_name = os.environ.get(
"TT_REPOSITORY_NAME",
"ote/training_extensions/external/model-preparation-algorithm",
)
except ImportError:
pass
Original file line number Diff line number Diff line change
@@ -73,26 +73,18 @@ def get_dummy_compressed_model(task):
from mmdet.apis.fake_input import get_fake_input

# Disable quantaizers initialization
for compression in task._config.nncf_config['compression']:
for compression in task._config.nncf_config["compression"]:
if compression["algorithm"] == "quantization":
compression["initializer"] = {
"batchnorm_adaptation": {
"num_bn_adaptation_samples": 0
}
"batchnorm_adaptation": {"num_bn_adaptation_samples": 0}
}

_, compressed_model = wrap_nncf_model(task._model,
task._config,
get_fake_input_func=get_fake_input)
_, compressed_model = wrap_nncf_model(
task._model, task._config, get_fake_input_func=get_fake_input
)
return compressed_model








class TestOTEReallifeObjectDetectionClsIncr(OTETrainingTestInterface):
"""
The main class of running test in this file.
@@ -108,7 +100,7 @@ def get_list_of_tests(cls, usecase: Optional[str] = None):
tests discovering.
"""
return cls.helper.get_list_of_tests(usecase)

@pytest.fixture
def params_factories_for_test_actions_fx(
self,
@@ -169,38 +161,49 @@ def _training_params_factory() -> Dict:
"batch_size": batch_size,
"checkpoint": ckpt_path,
}

def _nncf_graph_params_factory() -> Dict:
if dataset_definitions is None:
pytest.skip('The parameter "--dataset-definitions" is not set')

model_name = test_parameters['model_name']
model_name = test_parameters["model_name"]
if "Custom_Object_Detection" in model_name:
domain = Domain.DETECTION
elif "Custom_Counting_Instance_Segmentation" in model_name:
domain = Domain.INSTANCE_SEGMENTATION
else:
domain = None
dataset_name = test_parameters['dataset_name']
dataset_name = test_parameters["dataset_name"]

dataset_params = _get_dataset_params_from_dataset_definitions(dataset_definitions, dataset_name)
dataset_params = _get_dataset_params_from_dataset_definitions(
dataset_definitions, dataset_name
)

if model_name not in template_paths:
raise ValueError(f'Model {model_name} is absent in template_paths, '
f'template_paths.keys={list(template_paths.keys())}')
template_path = make_path_be_abs(template_paths[model_name], template_paths[ROOT_PATH_KEY])
raise ValueError(
f"Model {model_name} is absent in template_paths, "
f"template_paths.keys={list(template_paths.keys())}"
)
template_path = make_path_be_abs(
template_paths[model_name], template_paths[ROOT_PATH_KEY]
)

logger.debug('training params factory: Before creating dataset and labels_schema')
logger.debug(
"training params factory: Before creating dataset and labels_schema"
)
dataset, labels_schema = _create_object_detection_dataset_and_labels_schema(
dataset_params, domain)
logger.debug('training params factory: After creating dataset and labels_schema')
dataset_params, domain
)
logger.debug(
"training params factory: After creating dataset and labels_schema"
)

return {
'dataset': dataset,
'labels_schema': labels_schema,
'template_path': template_path,
'reference_dir': ote_current_reference_dir_fx,
'fn_get_compressed_model': get_dummy_compressed_model,
"dataset": dataset,
"labels_schema": labels_schema,
"template_path": template_path,
"reference_dir": ote_current_reference_dir_fx,
"fn_get_compressed_model": get_dummy_compressed_model,
}

params_factories_for_test_actions = {