@@ -160,33 +160,36 @@ def test_predict_with_image_path(self, project_path: Path) -> None:
160
160
[
161
161
(ExportType .TORCH , None ),
162
162
(ExportType .ONNX , None ),
163
- (ExportType .OPENVIVO , None ),
164
- (ExportType .OPENVIVO , CompressionType .POT ),
165
- (ExportType .OPENVIVO , CompressionType .NNCF ),
163
+ (ExportType .OPENVINO , None ),
164
+ (ExportType .OPENVINO , CompressionType .POT ),
165
+ (ExportType .OPENVINO , CompressionType .NNCF ),
166
166
],
167
167
)
168
168
def test_export (
169
169
self ,
170
170
project_path : Path ,
171
171
export_type : ExportType ,
172
+ compression_type : CompressionType | None ,
172
173
) -> None :
173
174
"""Test the export method of the CLI.
174
175
175
176
Args:
176
177
dataset_path (Path): Root of the synthetic/original dataset.
177
178
project_path (Path): Path to temporary project folder.
178
179
export_type (ExportType): Export type.
180
+ compression_type (CompressionType): Compression type (if any).
179
181
"""
180
- AnomalibCLI (
181
- args = [
182
- "export" ,
183
- "--export_type" ,
184
- export_type ,
185
- * self ._get_common_cli_args (None , project_path ),
186
- "--ckpt_path" ,
187
- f"{ project_path } /Padim/MVTec/dummy/v0/weights/lightning/model.ckpt" ,
188
- ],
189
- )
182
+ args = [
183
+ "export" ,
184
+ "--export_type" ,
185
+ export_type ,
186
+ * self ._get_common_cli_args (None , project_path ),
187
+ "--ckpt_path" ,
188
+ f"{ project_path } /Padim/MVTec/dummy/v0/weights/lightning/model.ckpt" ,
189
+ ]
190
+ if compression_type :
191
+ args += ["--compression_type" , str (compression_type )]
192
+ AnomalibCLI (args = args )
190
193
191
194
@staticmethod
192
195
def _get_common_cli_args (dataset_path : Path | None , project_path : Path ) -> list [str ]:
0 commit comments