feat(AWML): introduce new deployment and onnx/tensorRT evaluation pipeline#115
feat(AWML): introduce new deployment and onnx/tensorRT evaluation pipeline#115
Conversation
68d1700 to
7ac5b8b
Compare
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
5256306 to
2b28f60
Compare
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
8756669 to
1d4c27f
Compare
KSeangTan
left a comment
There was a problem hiding this comment.
Only review the first part, please address the comments accordingly first.
| Args: | ||
| log_file_path: Absolute or resolved path to the log file. | ||
| """ | ||
| path = os.path.abspath(os.path.expanduser(log_file_path)) |
| ArgumentParser with deployment arguments | ||
| """ | ||
| if parser is None: | ||
| parser = argparse.ArgumentParser( |
There was a problem hiding this comment.
Why parser can be None?
| from deployment.projects.registry import project_registry | ||
|
|
||
|
|
||
| def _discover_project_packages() -> List[str]: |
There was a problem hiding this comment.
Sequence instead of List
| raise ValueError("Missing 'export' section in deploy config.") | ||
| export_raw = self.deploy_cfg.get("export") | ||
| if export_raw is not None and not isinstance(export_raw, Mapping): | ||
| raise TypeError("deploy config 'export' must be a mapping.") |
There was a problem hiding this comment.
mapping might not be an appropriate type in the error message here, it should be Dict instead?
| raise TypeError("deploy config 'components' must be a mapping.") | ||
|
|
||
| @staticmethod | ||
| def _parse_deploy_log_path(raw: Optional[Any]) -> Optional[str]: |
There was a problem hiding this comment.
I dont think we should accept Any here, please make it str only. These type checking should actually be done by IDE in static checking instead of runtime.
| """Require a non-empty checkpoint path that exists as a regular file.""" | ||
| if not isinstance(checkpoint_path, str): | ||
| raise TypeError(f"checkpoint_path must be a string, got {type(checkpoint_path).__name__}.") | ||
| path = os.path.expanduser(checkpoint_path.strip()) |
|
|
||
| def _needs_cuda_device(self) -> bool: | ||
| """Determine if current deployment config requires a CUDA device.""" | ||
| if self.export_config.should_export_tensorrt: |
There was a problem hiding this comment.
I believe this function is unnecessary complicated, for example, we only need to check if tensorrt is enabled since we will use only tensorrt with cuda right?
| return self._verification_config | ||
|
|
||
| @property | ||
| def devices(self) -> DeviceConfig: |
| if not output_names: | ||
| output_names = ("output",) | ||
| settings_dict = { | ||
| "opset_version": onnx_config.opset_version, |
There was a problem hiding this comment.
self._onnx_export_config.opset_config
|
|
||
|
|
||
| def _normalize_dynamic_axes(raw: Mapping[str, Any]) -> Dict[str, Dict[int, str]]: | ||
| """Normalize dynamic_axes inner dict keys to int.""" |
There was a problem hiding this comment.
What does it mean by normalizing?
AWML Unified Deployment Framework
Introduced a unified deployment and evaluation framework for AWML, significantly improving consistency, scalability, and maintainability across projects
Key Contributions
1. Unified Deployment Pipeline
2. Cross-Backend Verification
3. Integrated Evaluation Framework
How to run