-
Notifications
You must be signed in to change notification settings - Fork 22
feat(deployment): centerpoint deployment integration #181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
vividf
wants to merge
49
commits into
tier4:feat/new_deployment_and_evaluation_pipeline
Choose a base branch
from
vividf:feat/centerpoint_deployment_integration
base: feat/new_deployment_and_evaluation_pipeline
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
028fbbc
feat: refactor config
vividf e6956b3
chore: fix property
vividf 2b5e99a
chore: clean code
vividf e389cea
chore: temp remove centerpoint files
vividf 2afb7cb
chore: clean code
vividf eb3ffc8
feat: integrate centerpoint to deployment framework
vividf b895000
chore: centerpoint - clean or {}
vividf 433979a
chore: centerpoint-clean code
vividf 02aad01
chore: temp remove centerpoint files
vividf 15f88f6
chore: add files back
vividf 44e80ac
ci(pre-commit): autofix
pre-commit-ci[bot] f321332
chore: clean code
vividf b360e3e
chore: update threshold for centerpoint
vividf 427cb16
chore: clean up code
vividf 03c8291
chore: refactor base config - centerpoint
vividf 49ff62c
chore: clean up code: device spec, remove unused fucntion .etc - cent…
vividf a752c2e
chore: fix Any
vividf 73ca847
chore: add docstring
vividf d004bbb
chore: refactor export compenent - centerpoint
vividf 5aeb986
chore: fix more Device spec - centerpoint
vividf 9873050
chore: fix
vividf cc67613
chore: add more docstring
vividf a0bd1e9
chore: change file name
vividf 7967aed
chore: remove redundant check
vividf 4e3ef9e
chore: orangize directory
vividf 0849300
chore: rename sample file
vividf 6b2bb05
chore: remove init
vividf 727b1eb
chore: add init back
vividf 327ce53
chore: fix trt verification
vividf 52b8bd2
chore: update deploy config
vividf a83e4ee
chore: fix more deploy config
vividf b74aeef
chore: update deploy config
vividf 120e257
chore: for loop for clean code
vividf 12c05e9
chore: remove duplicate code
vividf a577c7c
chore: clean up sample adapter
vividf 7ebb162
clean code
vividf 6292028
chore: clean up centerpoint
vividf 0fddabf
chore: replace pring to logging
vividf 4b78ff7
chore: remove conplex discover files logic, and directly use components
vividf ab4fbab
chore: centerpoint add -> None for __init__
vividf 20f84fc
chore: remove task profile centerpoint
vividf 982ce83
chore: fix output format
vividf be8b1b2
chore: clean gt loop
vividf eb2b6ef
chore: fix matrix report centerpoint
vividf 5b303a8
chore: refactor metric utils
vividf 90432cb
chore: clean metrics centerpoint
vividf 32a854a
chore: fix sample adapter
vividf d23c92b
chore: clean up centerpoint pipeline
vividf 75422a4
chore: update project registry centerpoint
vividf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| """CenterPoint deployment bundle. | ||
|
|
||
| This package owns all CenterPoint deployment-specific code (runner/evaluator/loader/pipelines/export). | ||
| It registers a ProjectAdapter into the global `project_registry` so the unified CLI can invoke it. | ||
| """ | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| from deployment.projects.centerpoint.cli import add_args | ||
| from deployment.projects.centerpoint.entrypoint import run | ||
|
|
||
| # Trigger pipeline factory registration for this project. | ||
| from deployment.projects.centerpoint.pipelines.factory import CenterPointPipelineFactory # noqa: F401 | ||
| from deployment.projects.registry import ProjectAdapter, project_registry | ||
|
|
||
| project_registry.register( | ||
| ProjectAdapter( | ||
| name="centerpoint", | ||
| add_args=add_args, | ||
| run=run, | ||
| required_components=("pts_voxel_encoder", "pts_backbone_neck_head"), | ||
| ) | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| """CenterPoint CLI extensions.""" | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| import argparse | ||
|
|
||
|
|
||
| def add_args(parser: argparse.ArgumentParser) -> None: | ||
| """Register CenterPoint-specific CLI flags onto a project subparser.""" | ||
| parser.add_argument( | ||
| "--rot-y-axis-reference", | ||
| action="store_true", | ||
| help="Convert rotation to y-axis clockwise reference (CenterPoint ONNX-compatible format)", | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| """CenterPoint deployment entrypoint invoked by the unified CLI.""" | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| import argparse | ||
| import logging | ||
|
|
||
| from mmengine.config import Config | ||
|
|
||
| from deployment.cli.args import add_deployment_file_logging, setup_logging | ||
| from deployment.configs.base import BaseDeploymentConfig | ||
| from deployment.core.contexts import CenterPointExportContext | ||
| from deployment.projects.centerpoint.eval.evaluator import CenterPointEvaluator | ||
| from deployment.projects.centerpoint.eval.metrics_utils import extract_t4metric_v2_config | ||
| from deployment.projects.centerpoint.io.data_loader import CenterPointDataLoader | ||
| from deployment.projects.centerpoint.runner import CenterPointDeploymentRunner | ||
| from deployment.projects.registry import project_registry | ||
|
|
||
|
|
||
| def run(args: argparse.Namespace) -> int: | ||
| """Run the CenterPoint deployment workflow for the unified CLI. | ||
|
|
||
| Args: | ||
| args: Parsed command-line arguments containing deploy_cfg and model_cfg paths. | ||
|
|
||
| Returns: | ||
| Exit code (0 for success). | ||
| """ | ||
| logger = setup_logging(args.log_level) | ||
|
|
||
| deploy_cfg = Config.fromfile(args.deploy_cfg) | ||
| model_cfg = Config.fromfile(args.model_cfg) | ||
| config = BaseDeploymentConfig(deploy_cfg) | ||
|
|
||
| log_file = config.resolved_deploy_log_file | ||
| if log_file: | ||
| add_deployment_file_logging(log_file) | ||
| logger.info("Deployment log file: %s", log_file) | ||
|
|
||
| project_registry.validate_required_components("centerpoint", config.components_cfg) | ||
|
|
||
| logger.info("=" * 80) | ||
| logger.info("CenterPoint Deployment Pipeline") | ||
| logger.info("=" * 80) | ||
|
|
||
| data_loader = CenterPointDataLoader( | ||
| info_file=config.runtime_config.info_file, | ||
| model_cfg=model_cfg, | ||
| ) | ||
| logger.info(f"Loaded {data_loader.num_samples} samples") | ||
|
|
||
| metrics_config = extract_t4metric_v2_config(model_cfg, logger=logger) | ||
|
|
||
| evaluator = CenterPointEvaluator( | ||
| model_cfg=model_cfg, | ||
| metrics_config=metrics_config, | ||
| components_cfg=config.components_cfg, | ||
| ) | ||
|
|
||
| runner = CenterPointDeploymentRunner( | ||
| data_loader=data_loader, | ||
| evaluator=evaluator, | ||
| config=config, | ||
| model_cfg=model_cfg, | ||
| logger=logger, | ||
| ) | ||
|
|
||
| context = CenterPointExportContext(rot_y_axis_reference=bool(getattr(args, "rot_y_axis_reference", False))) | ||
| runner.run(context=context) | ||
| return 0 |
Empty file.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.