diff options
author | Benjamin Klimczak <benjamin.klimczak@arm.com> | 2023-08-24 16:38:47 +0100 |
---|---|---|
committer | Benjamin Klimczak <benjamin.klimczak@arm.com> | 2023-09-05 14:20:08 +0100 |
commit | e5a0bc3ecd4d9c46ead3b8217584eaa916a3afa4 (patch) | |
tree | 94c348fcef50326a755a049a2a4027f588211f8b /src/mlia/backend/vela/compiler.py | |
parent | 900c3c52b681e0b8a4454e2e2cf29265d53a2c98 (diff) | |
download | mlia-e5a0bc3ecd4d9c46ead3b8217584eaa916a3afa4.tar.gz |
MLIA-961 Update tox dependencies
- Update version dependencies in the tox.ini
- Fix linter issues
Change-Id: I04c3a841ee2646a865dab037701d66c28792f2a4
Signed-off-by: Benjamin Klimczak <benjamin.klimczak@arm.com>
Diffstat (limited to 'src/mlia/backend/vela/compiler.py')
-rw-r--r-- | src/mlia/backend/vela/compiler.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mlia/backend/vela/compiler.py b/src/mlia/backend/vela/compiler.py index afad05b..78f97b2 100644 --- a/src/mlia/backend/vela/compiler.py +++ b/src/mlia/backend/vela/compiler.py @@ -129,7 +129,7 @@ class VelaCompiler: # pylint: disable=too-many-instance-attributes nng, network_type = model.nng, NetworkType.TFLite if not nng: - raise Exception("Unable to read model") + raise ValueError("Unable to read model: model.nng is not available") output_basename = f"{self.output_dir}/{nng.name}" @@ -152,7 +152,9 @@ class VelaCompiler: # pylint: disable=too-many-instance-attributes return OptimizedModel(nng, arch, compiler_options, scheduler_options) except (SystemExit, Exception) as err: - raise Exception("Model could not be optimized with Vela compiler") from err + raise RuntimeError( + "Model could not be optimized with Vela compiler." + ) from err def get_config(self) -> dict[str, Any]: """Get compiler configuration.""" @@ -200,7 +202,7 @@ class VelaCompiler: # pylint: disable=too-many-instance-attributes ): return read_model(model_path, ModelReaderOptions()) # type: ignore except (SystemExit, Exception) as err: - raise Exception(f"Unable to read model {model_path}") from err + raise RuntimeError(f"Unable to read model {model_path}.") from err def _architecture_features(self) -> ArchitectureFeatures: """Return ArchitectureFeatures instance.""" |