This repository was archived by the owner on Aug 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathcell_template_contexts.py
119 lines (81 loc) · 3.1 KB
/
cell_template_contexts.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
"""
OpenVINO DL Workbench
Classes for Jupyter notebook cell template contexts
Copyright (c) 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 typing import Optional
try:
from typing import TypedDict
except ImportError:
from typing_extensions import TypedDict
class IntroCellTemplateContext(TypedDict):
is_optimized_project: bool
project_model_name: str
project_model_domain: str
project_device_name: str
project_model_task_type: str
project_model_framework: str
project_model_precisions: str
project_model_source: str
has_tokenizer_section: bool
has_accuracy_checker_section: bool
has_int8_calibration_section: bool
class PythonToolCodeCellTemplateContext(TypedDict):
python_executor: str
class ObtainModelDocsCellTemplateContext(TypedDict):
project_model_name: str
project_model_source: str
project_model_framework: str
class ModelDownloaderCodeCellTemplateContext(TypedDict):
omz_model_name: str
output_directory_path: str
class ModelConverterCodeCellTemplateContext(ModelDownloaderCodeCellTemplateContext):
download_directory_path: str
class ModelOptimizerCodeCellTemplateContext(PythonToolCodeCellTemplateContext):
mo_arguments: str
output_directory_path: str
class CheckModelFormatDocsCellTemplateContext(TypedDict):
is_optimized_project: bool
class SetIRModelPathsCodeCellTemplateContext(TypedDict):
model_xml_file_path: str
model_bin_file_path: str
class ProfilingCodeCellTemplateContext(PythonToolCodeCellTemplateContext):
model_xml_path: str
image_path: str
device: str
batch: int
streams: int
inference_time: int
has_tokenizer_section: bool
class ProfilingDocsCellTemplateContext(PythonToolCodeCellTemplateContext):
is_nlp: bool
class TokenizerParametersTemplateContext(TypedDict):
tokenizer_path: Optional[str]
dataset_path: str
batch: Optional[int]
streams: Optional[int]
class AccuracyDocsCellTemplateContext(TypedDict):
yaml_config_path: str
class AccuracyCodeCellTemplateContext(AccuracyDocsCellTemplateContext):
json_config: str
model_directory_path: str
images_directory_path: str
class Int8OptimizationDocsCellTemplateContext(TypedDict):
is_optimized_project: bool
int8_optimization_config_path: str
class Int8OptimizationCodeCellTemplateContext(Int8OptimizationDocsCellTemplateContext):
int8_optimization_config: str
output_directory_path: str
class InstallRequirementsCodeCellTemplateContext(TypedDict):
requirements_file: str
class TransformersONNXCodeCellTemplateContext(TypedDict):
model_checkpoint: str