-
Notifications
You must be signed in to change notification settings - Fork 15
Refactor: benchmark #233
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
Refactor: benchmark #233
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -20,7 +20,7 @@ | |||||
|
|
||||||
| python -m scripts.benchmark rl --tasks push_cube --algorithms ppo --suite default | ||||||
| python -m scripts.benchmark rl --rebuild-report-only | ||||||
| python -m scripts.benchmark robotics-kinematic-solver | ||||||
| python -m scripts.benchmark robotics-kinematic-solver -s pytorch | ||||||
| """ | ||||||
|
|
||||||
| from __future__ import annotations | ||||||
|
|
@@ -29,6 +29,22 @@ | |||||
| import sys | ||||||
|
|
||||||
|
|
||||||
| def _run_robotics_kinematic_solver_cli(args: argparse.Namespace) -> None: | ||||||
| """Run robotics kinematic solver benchmark with forwarded CLI args.""" | ||||||
| from scripts.benchmark.robotics.kinematic_solver.run_benchmark import ( | ||||||
| run_all_benchmarks, | ||||||
| ) | ||||||
|
|
||||||
| run_all_benchmarks(selected_solvers=args.solvers) | ||||||
|
|
||||||
|
|
||||||
| def _run_rl_cli(_: argparse.Namespace) -> None: | ||||||
| """Run RL benchmark CLI entrypoint.""" | ||||||
| from scripts.benchmark.rl.run_benchmark import main as rl_main | ||||||
|
|
||||||
| rl_main() | ||||||
|
|
||||||
|
|
||||||
| def main() -> None: | ||||||
| """Dispatch to the appropriate benchmark sub-command CLI.""" | ||||||
| parser = argparse.ArgumentParser( | ||||||
|
|
@@ -42,20 +58,22 @@ def main() -> None: | |||||
| "rl", | ||||||
| help="Run RL benchmark: train, evaluate, aggregate, and report results.", | ||||||
| ) | ||||||
| from scripts.benchmark.rl.run_benchmark import main as rl_main | ||||||
|
|
||||||
| rl_parser.set_defaults(func=rl_main) | ||||||
| rl_parser.set_defaults(func=_run_rl_cli) | ||||||
|
|
||||||
| # -- robotics-kinematic-solver ------------------------------------------- | ||||||
| robotics_ks_parser = subparsers.add_parser( | ||||||
| "robotics-kinematic-solver", | ||||||
| help="Benchmark the OPW kinematic solver (FK/IK accuracy and speed).", | ||||||
|
||||||
| help="Benchmark the OPW kinematic solver (FK/IK accuracy and speed).", | |
| help="Benchmark kinematic solvers (OPW/PyTorch) for FK/IK accuracy and speed.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set_qpos_limits()logs an error for invalidlower_qpos_limits/upper_qpos_limitstypes but still returnsTrue, and it may leave one/both of the*_qpos_limitsattributes unchanged/None. This can lead to downstream IK sampling using stale or missing limits. Consider returningFalse(or raising) as soon as an invalid type is detected, and only returningTrueonce both tensors have been successfully set (optionally validating shape matches DOF).