Files
openvino/tests/conditional_compilation/README.md
Valentin Dymchishin 07a3dc6b36 [47750] Validate conditional compilation with models from OMZ (#7207)
* [47750] Validate conditional compilation with models from OMZ

* [47750] Remove model

* [47750] Use generator expression

* [47750] Use f-strings

* [47750] Use resolve() instead of abs_path()

* [47750] Use cmd_exec() instead of subprocess.check_output()

* [47750] Use download_models fixture in test_cc_collect, test_verify

* [47750] Update prepare_models

* [47750] Update test_infer

* [47750] Add models

* [47750] Use custom logger

* [47750] Refactor prepare_models usage

* [47750] Rename model_struct to model

* [47750] Update help description

* [47750] Add function description for prepare_models, prepare_omz_model

* [47750] Move OMZ_NUM_ATTEMPTS to global scope

* [47750] Rename models to model

* [47750] Add "type" property in model

* [47750] Add default path for cache

* [47750] Remove conversion to str

* [47750] Rename prepare_models to prepared_models

* [47750] Remove redundant expand_env_vars call

* [47750] Use lower case "omz" in test_config; do not use default value

* [47750] Use only prepared_models in tests, without models in arguments

* [47750] Remove "framework" property in test_config

* [47750] Use omz_path and omz_cache_dir fixtures

* [47750] Make omz_cache_dir optional

* [47750] Remove validate_path_arg for omz_cache_dir

* [47750] Add validate_path_arg and log.warning for omz_cache_dir

* [47750] Add default value for omz_repo

* [47750] Use OMZ_MODELS_PATH environment variable

* [47750] Use tmpdir instead of OMZ_MODELS_PATH; use precision in test_id_list

* [47750] Update README.md

* [47750] Remove model_path variable

* [47750] Remove try/except for omz_path

* [47750] Rename omz_path to omz_repo
2021-09-13 11:47:04 +03:00

36 lines
1.4 KiB
Markdown

# Conditional compilation tests
This folder contains conditional compilation (CC) test framework code and CC tests file.
## Environment preparation:
Install Python modules required for tests:
```bash
pip3 install -r requirements.txt
```
Clone Open Model Zoo from https://github.com/openvinotoolkit/open_model_zoo
## Run tests
```bash
pytest test_cc.py
```
**Test parameters:**
- `sea_runtool` - path to `sea_runtool.py` file.
- `collector_dir` - path to collector file parent folder.
- `artifacts` - Path to directory where test write output or read input.
- `openvino_root_dir` - Path to OpenVINO repo root directory.
- `omz_repo` - Path to Open Model Zoo repository root directory.
**Optional:**
- `test_conf` - path to test cases .yml config.
- `openvino_ref` - Path to root directory with installed OpenVINO. If the option is not specified, CC test firstly build and install
instrumented package at `<artifacts>/ref_pkg` folder with OpenVINO repository specified in `--openvino_root_dir` option.
> If OpenVINO instrumented package has been successfuly installed, in the future you can set `--openvino_ref` parameter as `<artifacts>/ref_pkg` for better performance.
- `omz_cache_dir` - Path to Open Model Zoo cache directory.
**Sample usage:**
```bash
pytest test_cc.py --sea_runtool=./thirdparty/itt_collector/runtool/sea_runtool.py --collector_dir=./bin/intel64/Release --artifacts=../artifacts --openvino_root_dir=. --omz_repo=../_open_model_zoo
```