From 439c54966fbf1ab51aaf0654dbd122169c5e13ca Mon Sep 17 00:00:00 2001 From: DVIDIA Date: Wed, 11 Nov 2026 04:15:03 -0500 Subject: [PATCH] Cache immutable camera geometry and measure recorder parity and timing --- .github/workflows/ci.yml | 2 +- README.md | 3 + .../godot-capture-performance-v01/README.md | 126 +++++ .../baseline-profiled.json | 1 + .../baseline-unprofiled.json | 1 + .../candidate.json | 23 + .../fresh-install.json | 19 + .../pair-01-baseline.json | 1 + .../pair-02-candidate.json | 1 + .../pair-03-candidate.json | 1 + .../pair-04-baseline.json | 1 + .../pair-05-baseline.json | 1 + .../pair-06-candidate.json | 1 + .../godot-capture-performance-v01/plan.json | 57 +++ .../results.json | 474 ++++++++++++++++++ .../godot-capture-performance-v01/tests.json | 25 + .../godot-capture-performance-v01/warmup.json | 1 + scripts/compare-operator-captures.py | 105 ++++ scripts/profile-operator-capture.py | 153 ++++++ src/dvidia_training/piper_rgbd_tracker.py | 37 +- tests/test_tracker_ray_cache.py | 149 ++++++ 21 files changed, 1177 insertions(+), 5 deletions(-) create mode 100644 benchmarks/godot-capture-performance-v01/README.md create mode 100644 benchmarks/godot-capture-performance-v01/baseline-profiled.json create mode 100644 benchmarks/godot-capture-performance-v01/baseline-unprofiled.json create mode 100644 benchmarks/godot-capture-performance-v01/candidate.json create mode 100644 benchmarks/godot-capture-performance-v01/fresh-install.json create mode 100644 benchmarks/godot-capture-performance-v01/pair-01-baseline.json create mode 100644 benchmarks/godot-capture-performance-v01/pair-02-candidate.json create mode 100644 benchmarks/godot-capture-performance-v01/pair-03-candidate.json create mode 100644 benchmarks/godot-capture-performance-v01/pair-04-baseline.json create mode 100644 benchmarks/godot-capture-performance-v01/pair-05-baseline.json create mode 100644 benchmarks/godot-capture-performance-v01/pair-06-candidate.json create mode 100644 benchmarks/godot-capture-performance-v01/plan.json create mode 100644 benchmarks/godot-capture-performance-v01/results.json create mode 100644 benchmarks/godot-capture-performance-v01/tests.json create mode 100644 benchmarks/godot-capture-performance-v01/warmup.json create mode 100644 scripts/compare-operator-captures.py create mode 100644 scripts/profile-operator-capture.py create mode 100644 tests/test_tracker_ray_cache.py diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3bf5dbf..af46bfd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -83,7 +83,7 @@ jobs: - name: Verify pinned learning caches run: python -m unittest tests.test_camera_action_cache tests.test_camera_cache_cli tests.test_camera_action_export tests.test_camera_action_model -v - name: Verify operator capture, recovery and reviewed exports without physics - run: python -m unittest tests.test_operator_capture tests.test_operator_export tests.test_godot_demonstration_bridge -v + run: python -m unittest tests.test_operator_capture tests.test_operator_export tests.test_godot_demonstration_bridge tests.test_tracker_ray_cache tests.test_piper_rgbd_tracker -v - name: Verify exact-reference and initial-head contracts without physics run: | python -B -m unittest tests.test_camera_action_reference_export -v diff --git a/README.md b/README.md index 1a322d6..3c3b7bc 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,9 @@ check reproduced all **10,200 native scalar values exactly** in independent repl This is a capture/export prototype; human demonstrations, new policy training and real-time teleoperation qualification remain ahead. [Evidence and timing limits](benchmarks/godot-demonstration-v02/README.md). +[Capture performance study](benchmarks/godot-capture-performance-v01/README.md): +bounded camera-geometry reuse preserves exact observations/actions; its measured +speed benefit is preliminary, with mixed paired results. **[Verified local learning cache](docs/camera-action-export-cache-v01.md).** The **0.1.3.dev5 preview** adds `dvidia-train cache` to reuse verified camera/action diff --git a/benchmarks/godot-capture-performance-v01/README.md b/benchmarks/godot-capture-performance-v01/README.md new file mode 100644 index 0000000..a85cb14 --- /dev/null +++ b/benchmarks/godot-capture-performance-v01/README.md @@ -0,0 +1,126 @@ +# Capture performance: fixed camera geometry + +We added a small, bounded cache for the RGB-D tracker's fixed camera geometry. +Across three paired runs, average control-loop time fell **4.2%**, with one pair +slightly slower. This is a preliminary optimization result, not a reliable +speedup or real-time qualification. All compared observations, commands, +physics traces and learning arrays were preserved exactly. + +The task is a small scripted movement of the simulated PiPER above a rigid +block. It does not demonstrate grasping, human teleoperation or a learned skill. +Every attempt is retained; all task scorers correctly report no placement. + +## What changed + +The tracker used to rebuild every pixel's optical ray and transform it into the +robot base frame on every image. Those directions depend only on image size, +camera intrinsics and camera rotation. We now reuse them with exact calibration +keys. The cache contains no images, depth, object position, task state or previous +estimates. Current observations still determine visibility, occlusion, missingness +and the estimated object pose. + +Two immutable arrays are retained at most: **3.516 MiB** at 320×240 if both entries +are occupied, or **14.063 MiB** at the supported 640×480 maximum. Temporary +allocations and total process memory are separate and were not measured here. +No camera cadence, native tick, command rate limit, durable write or journal +commit barrier was removed. + +## Measurements + +Each confirmation run contains 100 control intervals, 51 RGB-D pairs and 2,000 +native ticks: two simulated seconds at 50 Hz control, 25 Hz 320×240 cameras and +1 ms physics. The order was frozen as baseline, candidate, candidate, baseline, +baseline, candidate. Each run starts a fresh process and cache. + +| Pair | Baseline control time | Cached control time | Time reduction | +|---|---:|---:|---:| +| 1 | 6.287 s | 5.920 s | 5.83% | +| 2 | 6.012 s | 6.093 s | −1.34% | +| 3 | 6.159 s | 5.668 s | 7.96% | +| Mean | 6.152 s | 5.894 s | 4.20% | + +Control time includes context retrieval, encoder-only IK, native advancement, +camera/perception and durable recording. It excludes startup, finalization, +inspection, sockets, Godot and deliberate real-time pacing. Full per-run +percentiles, startup and finalization times are retained in the JSON sidecars. +`total_seconds` includes kinematics construction through capture finalization; +it excludes subsequent inspection and writing the profiling receipt. + +A single actual windowed check per variant completed without client errors. +Two simulated seconds took **10.700 s baseline / 10.469 s cached** after handshake; +RPC p95 was **111.520 / 113.571 ms**. Tail latency did not improve in that check. +These runs demonstrate integration, not sustained throughput or a physical robot +reaction bound. The software does not yet meet a 20 ms wall-clock control deadline. + +The paired and windowed runs use one worker process with +`OPENBLAS_NUM_THREADS=1` and `OMP_NUM_THREADS=1`. Earlier exploratory profiles +inherited the host thread settings, so their absolute timings are not directly +comparable. In that diagnostic profile, rendering/encoding consumed about +0.700 s and tracking 0.534 s of a 2.177 s profiled control loop; ray checks +accounted for 0.262 s within tracking. These cumulative scopes overlap. +The unprofiled diagnostic took 1.839 s; one comparison cannot isolate profiler +overhead from host variation. A separate-process warmup warms host/driver caches, +not the next process's Python or renderer instance. + +Host: Apple M5, 10 logical processors, macOS 26.5.2 arm64, Python 3.12.9, +NumPy 2.5.3, MuJoCo 3.15.0 and Godot 4.7.2 compatibility OpenGL. This shared +host was not isolated from other work. Three pairs support a directional +observation, not statistical confidence or a hardware minimum recommendation. + +## Correctness and installation + +- **114 local test executions passed**, including randomized exact ray-depth + parity, cache eviction and immutability, calibration changes, missing/occluded + frames, causal export and interrupted-journal recovery. +- The three confirmation pairs matched **306,000 native scalar values**, + **306 RGB/depth files**, and **303 perception records** exactly, excluding only + explicitly identified source/run identities and wall-time diagnostics. + Calibration, timestamps, masks, issued/applied actions, lifecycle, source groups, + data types, 100×269 feature arrays and 100×7 target arrays also matched per pair. +- The windowed pair independently matched another **102,000 native values**, + 102 frame files and 101 perception records, with the same full export checks. +- A separate native replay of one candidate recording matched all **102,000 + values** and independently reconstructed the task score. +- A fresh base-package installation outside the checkout inspected the recording + and exported/reloaded 100 rows. This tests CLI/export installation; native + graphics used the existing simulation environment and remain tested only on Mac. + +All eleven planned captures completed. The raw local evidence, including scene, +receipts and windowed screenshot, occupies about 201 MiB. No raw capture is bundled +in this small source publication. Integrity hashes bind the retained recordings. +There were no fits, human demonstrations, hardware commands or new skill claims. +The previous learned placement result remains 5/64 and unqualified. + +## Reproduce + +Start with the [local capture guide](../../docs/godot-demonstration-v02.md). +Use baseline commit `4ca9804c79e330221106217eac4faca582b4efa2` in a separate checkout. +The candidate source and script hashes are fixed in `candidate.json`; the +registered attempt budget and order are in `plan.json`. + +From the candidate checkout, supply the baseline or candidate source directory: + +```sh +PYTHONPATH=/absolute/baseline/src OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 \ +python scripts/profile-operator-capture.py --assets /absolute/robot-assets \ + --output /absolute/fresh/baseline-run --duration 2 + +PYTHONPATH=/absolute/candidate/src OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 \ +python scripts/profile-operator-capture.py --assets /absolute/robot-assets \ + --output /absolute/fresh/candidate-run --duration 2 + +python scripts/compare-operator-captures.py \ + --baseline /absolute/fresh/baseline-run/capture \ + --candidate /absolute/fresh/candidate-run/capture --output /absolute/fresh/parity.json +``` + +Use `--profile` only for diagnostic attribution; never combine profiled and +unprofiled samples into a speed claim. Keep all six confirmation attempts in +the declared order. The capture guard reserves 10 GiB plus each episode budget; +the original full-learning study's larger guard remains separate. + +Next: isolate rendering, thread settings and file-finalization costs under a +longer, separately registered workload before claiming useful live teleoperation +latency. Human demonstration collection and held-out skill evaluation follow. + +Added DVIDIA source is MIT; existing upstream robot notices remain unchanged. diff --git a/benchmarks/godot-capture-performance-v01/baseline-profiled.json b/benchmarks/godot-capture-performance-v01/baseline-profiled.json new file mode 100644 index 0000000..fead1df --- /dev/null +++ b/benchmarks/godot-capture-performance-v01/baseline-profiled.json @@ -0,0 +1 @@ +{"camera_control":{"count":50,"max_ms":43.32229099236429,"p50_ms":33.95083351642825,"p95_ms":38.98000176995993,"total_seconds":1.729296254052315},"camera_dt_seconds":0.04,"camera_pairs":51,"capture_bytes":19971491,"capture_integrity_sha256":"0fb0ccd029658048e81fe27561ab863c0edbffa241d9934edc176c95a9ebffcd","case":{"goal_position_m":[0.35,0.08,0.08],"group_id":"operator-start-001","id":"operator-block-001","object_position_m":[0.3,-0.03,0.082],"seed":0},"complete":true,"control":{"count":100,"max_ms":43.32229099236429,"p50_ms":24.959646485513076,"p95_ms":37.74547353677917,"total_seconds":2.1767491697100922},"control_dt_seconds":0.02,"duration_s":2.0,"encoder_control":{"count":50,"max_ms":19.56470898585394,"p50_ms":8.612020988948643,"p95_ms":10.232212336268274,"total_seconds":0.44745291565777734},"finish_seconds":0.6102953340159729,"ik":{"count":100,"max_ms":0.36341603845357895,"p50_ms":0.19135448383167386,"p95_ms":0.2427666855510324,"total_seconds":0.019217788998503238},"interval_seconds":[0.00803641596576199,0.03971824998734519,0.00797849998343736,0.034352665999904275,0.008643124951049685,0.031894665968138725,0.007690791971981525,0.030354583985172212,0.008630249998532236,0.03461912501370534,0.007537916011642665,0.03177441697334871,0.00859379197936505,0.039059708011336625,0.009533083997666836,0.037272916990332305,0.01956470898585394,0.03311545797623694,0.008551833976525813,0.03592737502185628,0.01055720797739923,0.03582779201678932,0.00909304094966501,0.03392945899395272,0.008407415996771306,0.03475687501486391,0.008267791999969631,0.0326535000349395,0.008142083010170609,0.03339474997483194,0.008743291022256017,0.033038249996025115,0.00826558395056054,0.03374054201412946,0.008374334021937102,0.032793166988994926,0.008232540974859148,0.03434720798395574,0.00852108298568055,0.03242895897710696,0.008255042019300163,0.03477879200363532,0.008658250037115067,0.03368254197994247,0.008882750000339001,0.036034207965712994,0.008442541002295911,0.03300154203316197,0.008918999985326082,0.03480941703310236,0.008251417020801455,0.03414095798507333,0.009034209011588246,0.03256320900982246,0.008297167019918561,0.03454116598004475,0.008592500002123415,0.0332651250064373,0.008306292002089322,0.037114207982085645,0.008361249987501651,0.03309699997771531,0.00912091601639986,0.03447258297819644,0.008314541017170995,0.03346750000491738,0.008700832957401872,0.033086500014178455,0.00821025000186637,0.03397437499370426,0.008834458014462143,0.03333204198861495,0.008512959000654519,0.033366667048539966,0.010124458000063896,0.03349975001765415,0.009094458946492523,0.03615804197033867,0.00851362501271069,0.03295883402461186,0.009248999995179474,0.03270575002534315,0.008258333953563124,0.03308991697849706,0.008816667017526925,0.0345901669934392,0.008987874956801534,0.03397220803890377,0.009171457961201668,0.033848959021270275,0.01032037497498095,0.03888258303049952,0.009224458015523851,0.04332229099236429,0.009914708032738417,0.036999542033299804,0.00928708299761638,0.03774270898429677,0.009431249985937029,0.037798000033944845],"numpy":"2.5.3","open_seconds":0.42054691701196134,"physical_robot_ready":false,"physics_dt_seconds":0.001,"profile_enabled":true,"profiles":{"control":[{"calls":100,"cumulative_seconds":2.114992123,"file":"operator_capture.py","function":"step","line":298,"own_seconds":0.003124743,"primitive_calls":100},{"calls":50,"cumulative_seconds":0.699605001,"file":"piper_action_capture.py","function":"sample","line":211,"own_seconds":0.004527014,"primitive_calls":50},{"calls":50,"cumulative_seconds":0.534287625,"file":"camera_action_capture.py","function":"_fresh_estimate","line":194,"own_seconds":0.00041496,"primitive_calls":50},{"calls":50,"cumulative_seconds":0.529797706,"file":"piper_rgbd_tracker.py","function":"estimate_pose","line":227,"own_seconds":0.022283341,"primitive_calls":50},{"calls":100,"cumulative_seconds":0.5078280780000001,"file":"renderer.py","function":"render","line":132,"own_seconds":0.006733748,"primitive_calls":100},{"calls":100,"cumulative_seconds":0.294476171,"file":"piper_action_capture.py","function":"advance","line":258,"own_seconds":0.000640824,"primitive_calls":100},{"calls":100,"cumulative_seconds":0.29357304100000003,"file":"piper_feedback_env.py","function":"step","line":137,"own_seconds":0.000295034,"primitive_calls":100},{"calls":100,"cumulative_seconds":0.29325554600000003,"file":"piper_task.py","function":"step","line":291,"own_seconds":0.029674683,"primitive_calls":100},{"calls":500,"cumulative_seconds":0.290978835,"file":"piper_action_capture.py","function":"_record","line":64,"own_seconds":0.004814706,"primitive_calls":500},{"calls":257600,"cumulative_seconds":0.268618401,"file":"copy.py","function":"deepcopy","line":118,"own_seconds":0.131628001,"primitive_calls":4500},{"calls":100,"cumulative_seconds":0.263150172,"file":"~","function":"","line":0,"own_seconds":0.263150172,"primitive_calls":100},{"calls":50,"cumulative_seconds":0.261884915,"file":"piper_rgbd_tracker.py","function":"_cube_rays","line":205,"own_seconds":0.158983844,"primitive_calls":50},{"calls":18900,"cumulative_seconds":0.26049574200000003,"file":"copy.py","function":"_deepcopy_dict","line":217,"own_seconds":0.03601099,"primitive_calls":4200},{"calls":400,"cumulative_seconds":0.23998612700000002,"file":"operator_capture.py","function":"_reference","line":43,"own_seconds":0.00046694000000000005,"primitive_calls":400},{"calls":400,"cumulative_seconds":0.237377673,"file":"piper_action_capture.py","function":"_json","line":77,"own_seconds":0.0012356440000000002,"primitive_calls":400},{"calls":100,"cumulative_seconds":0.23567304700000002,"file":"~","function":"","line":0,"own_seconds":0.23567304700000002,"primitive_calls":100},{"calls":50,"cumulative_seconds":0.18478316900000002,"file":"piper_rgbd_tracker.py","function":"_top_plane","line":148,"own_seconds":0.043608397,"primitive_calls":50},{"calls":50,"cumulative_seconds":0.156746841,"file":"piper_action_capture.py","function":"_png","line":87,"own_seconds":0.000255551,"primitive_calls":50},{"calls":50,"cumulative_seconds":0.14971704200000002,"file":"~","function":"","line":0,"own_seconds":0.14971704200000002,"primitive_calls":50},{"calls":500,"cumulative_seconds":0.13332586700000001,"file":"~","function":"","line":0,"own_seconds":0.125667991,"primitive_calls":500},{"calls":23050,"cumulative_seconds":0.11791367400000001,"file":"~","function":"","line":0,"own_seconds":0.11791367400000001,"primitive_calls":23050},{"calls":4800,"cumulative_seconds":0.11581382900000001,"file":"numeric.py","function":"cross","line":1563,"own_seconds":0.034813986000000005,"primitive_calls":4800},{"calls":300,"cumulative_seconds":0.11381531700000001,"file":"operator_capture.py","function":"context","line":290,"own_seconds":0.000575188,"primitive_calls":300},{"calls":100,"cumulative_seconds":0.080044296,"file":"operator_capture.py","function":"_save_frames","line":219,"own_seconds":0.00075111,"primitive_calls":100},{"calls":100,"cumulative_seconds":0.077817045,"file":"operator_capture.py","function":"_save_perception","line":231,"own_seconds":0.000370959,"primitive_calls":100},{"calls":14450,"cumulative_seconds":0.073438364,"file":"numeric.py","function":"moveaxis","line":1489,"own_seconds":0.019564125,"primitive_calls":14450},{"calls":400,"cumulative_seconds":0.07123108900000001,"file":"camera_action_capture.py","function":"_estimate_at","line":99,"own_seconds":0.001175716,"primitive_calls":400},{"calls":2100,"cumulative_seconds":0.069920704,"file":"piper_feedback_env.py","function":"_contacts","line":132,"own_seconds":0.0014475360000000001,"primitive_calls":2100},{"calls":2100,"cumulative_seconds":0.068473168,"file":"piper_task.py","function":"_contacts","line":219,"own_seconds":0.051107428,"primitive_calls":2100},{"calls":13150,"cumulative_seconds":0.060726776,"file":"copy.py","function":"_deepcopy_list","line":191,"own_seconds":0.014627924,"primitive_calls":12350},{"calls":500,"cumulative_seconds":0.051298635,"file":"tempfile.py","function":"NamedTemporaryFile","line":537,"own_seconds":0.001184818,"primitive_calls":500},{"calls":250,"cumulative_seconds":0.048764124000000006,"file":"~","function":"","line":0,"own_seconds":0.00015598400000000002,"primitive_calls":250},{"calls":250,"cumulative_seconds":0.04860814,"file":"_methods.py","function":"_amin","line":43,"own_seconds":7.359200000000001e-05,"primitive_calls":250},{"calls":250,"cumulative_seconds":0.04834076,"file":"~","function":"","line":0,"own_seconds":0.000151415,"primitive_calls":250},{"calls":250,"cumulative_seconds":0.048189345,"file":"_methods.py","function":"_amax","line":39,"own_seconds":7.922900000000001e-05,"primitive_calls":250},{"calls":500,"cumulative_seconds":0.047161871,"file":"~","function":"","line":0,"own_seconds":0.002941211,"primitive_calls":500},{"calls":28900,"cumulative_seconds":0.045278936000000006,"file":"numeric.py","function":"normalize_axis_tuple","line":1427,"own_seconds":0.028417774000000003,"primitive_calls":28900},{"calls":500,"cumulative_seconds":0.044058332000000006,"file":"tempfile.py","function":"opener","line":577,"own_seconds":0.000285315,"primitive_calls":500},{"calls":500,"cumulative_seconds":0.043773017000000004,"file":"tempfile.py","function":"_mkstemp_inner","line":243,"own_seconds":0.0011203510000000001,"primitive_calls":500},{"calls":519050,"cumulative_seconds":0.040442011,"file":"~","function":"","line":0,"own_seconds":0.040442011,"primitive_calls":519050},{"calls":2500,"cumulative_seconds":0.036785861,"file":"piper_task.py","function":"_finite","line":148,"own_seconds":0.004336381,"primitive_calls":2500},{"calls":500,"cumulative_seconds":0.035913576,"file":"~","function":"","line":0,"own_seconds":0.035913576,"primitive_calls":500},{"calls":5850,"cumulative_seconds":0.034710373,"file":"~","function":"","line":0,"own_seconds":0.004260835,"primitive_calls":5850},{"calls":950,"cumulative_seconds":0.032917202,"file":"episode_tape.py","function":"canonical","line":62,"own_seconds":0.000840239,"primitive_calls":950},{"calls":2000,"cumulative_seconds":0.032584336000000005,"file":"piper_feedback_env.py","function":"_outcome_tick","line":173,"own_seconds":0.023027541000000002,"primitive_calls":2000},{"calls":950,"cumulative_seconds":0.031669485000000004,"file":"__init__.py","function":"dumps","line":183,"own_seconds":0.001407578,"primitive_calls":950},{"calls":950,"cumulative_seconds":0.029902214000000003,"file":"encoder.py","function":"encode","line":183,"own_seconds":0.00104773,"primitive_calls":950},{"calls":950,"cumulative_seconds":0.028414848000000003,"file":"encoder.py","function":"iterencode","line":205,"own_seconds":0.028414848000000003,"primitive_calls":950},{"calls":50,"cumulative_seconds":0.02812633,"file":"piper_rgbd_tracker.py","function":"_components","line":129,"own_seconds":0.013035300000000001,"primitive_calls":50},{"calls":700,"cumulative_seconds":0.027410125,"file":"~","function":"","line":0,"own_seconds":0.027410125,"primitive_calls":700},{"calls":2000,"cumulative_seconds":0.026538170000000003,"file":"~","function":"","line":0,"own_seconds":0.026538170000000003,"primitive_calls":2000},{"calls":16000,"cumulative_seconds":0.025928689,"file":"piper_task.py","function":"","line":317,"own_seconds":0.025928689,"primitive_calls":16000},{"calls":11100,"cumulative_seconds":0.025850377,"file":"_linalg.py","function":"norm","line":2598,"own_seconds":0.012504916000000001,"primitive_calls":11100},{"calls":1650,"cumulative_seconds":0.025595933,"file":"camera_action_capture.py","function":"_sample_at","line":92,"own_seconds":0.0009407360000000001,"primitive_calls":1650},{"calls":4400,"cumulative_seconds":0.023219367,"file":"fromnumeric.py","function":"_wrapfunc","line":48,"own_seconds":0.002549192,"primitive_calls":4400},{"calls":2000,"cumulative_seconds":0.021371479000000002,"file":"~","function":"","line":0,"own_seconds":0.021371479000000002,"primitive_calls":2000},{"calls":2500,"cumulative_seconds":0.019477343,"file":"reference_task.py","function":"_finite","line":219,"own_seconds":0.0025117860000000002,"primitive_calls":2500},{"calls":100,"cumulative_seconds":0.019010245000000002,"file":"piper_encoder_kinematics.py","function":"pose_action","line":141,"own_seconds":0.00425896,"primitive_calls":100},{"calls":326200,"cumulative_seconds":0.01866555,"file":"~","function":"","line":0,"own_seconds":0.01866555,"primitive_calls":326200},{"calls":4650,"cumulative_seconds":0.018037618000000002,"file":"~","function":"","line":0,"own_seconds":0.0024643860000000003,"primitive_calls":4650},{"calls":500,"cumulative_seconds":0.017955472,"file":"pathlib.py","function":"unlink","line":1336,"own_seconds":0.000171096,"primitive_calls":500},{"calls":1500,"cumulative_seconds":0.017950281000000002,"file":"tempfile.py","function":"func_wrapper","line":497,"own_seconds":0.00047249000000000005,"primitive_calls":1500},{"calls":500,"cumulative_seconds":0.017784376,"file":"~","function":"","line":0,"own_seconds":0.017553681,"primitive_calls":500},{"calls":1050,"cumulative_seconds":0.017516214000000002,"file":"~","function":"","line":0,"own_seconds":0.017516214000000002,"primitive_calls":1050},{"calls":100,"cumulative_seconds":0.016046166,"file":"operator_capture.py","function":"_snapshot","line":96,"own_seconds":0.00023738400000000002,"primitive_calls":100},{"calls":100,"cumulative_seconds":0.015627583,"file":"action_demonstration.py","function":"_snapshot","line":168,"own_seconds":0.0021446580000000002,"primitive_calls":100},{"calls":4250,"cumulative_seconds":0.015234657,"file":"fromnumeric.py","function":"clip","line":2245,"own_seconds":0.0028549530000000004,"primitive_calls":4250},{"calls":50,"cumulative_seconds":0.015069628000000002,"file":"camera_action_capture.py","function":"measured","line":144,"own_seconds":0.0008704170000000001,"primitive_calls":50},{"calls":12500,"cumulative_seconds":0.014708765,"file":"reference_task.py","function":"","line":221,"own_seconds":0.006206877,"primitive_calls":12500},{"calls":32050,"cumulative_seconds":0.014490291,"file":"copy.py","function":"_keep_alive","line":231,"own_seconds":0.00972713,"primitive_calls":32050},{"calls":6100,"cumulative_seconds":0.014289995000000002,"file":"fromnumeric.py","function":"any","line":2474,"own_seconds":0.0027087440000000003,"primitive_calls":6100},{"calls":2600,"cumulative_seconds":0.013916911,"file":"pathlib.py","function":"drive","line":551,"own_seconds":0.001465521,"primitive_calls":2600},{"calls":6600,"cumulative_seconds":0.012880958000000001,"file":"fromnumeric.py","function":"_wrapreduction_any_all","line":86,"own_seconds":0.004870092,"primitive_calls":6600},{"calls":1300,"cumulative_seconds":0.012451390000000001,"file":"pathlib.py","function":"_load_parts","line":407,"own_seconds":0.001531114,"primitive_calls":1300},{"calls":200,"cumulative_seconds":0.012185964,"file":"operator_capture.py","function":"_append","line":197,"own_seconds":0.0013016050000000002,"primitive_calls":200},{"calls":4650,"cumulative_seconds":0.0117666,"file":"~","function":"","line":0,"own_seconds":0.0014180710000000001,"primitive_calls":4650},{"calls":1000,"cumulative_seconds":0.011673378,"file":"pathlib.py","function":"parent","line":731,"own_seconds":0.0008911430000000001,"primitive_calls":1000},{"calls":50,"cumulative_seconds":0.010961752,"file":"numeric.py","function":"argwhere","line":620,"own_seconds":0.000168955,"primitive_calls":50},{"calls":4298,"cumulative_seconds":0.010779347,"file":"pathlib.py","function":"__str__","line":437,"own_seconds":0.002338026,"primitive_calls":4298},{"calls":1500,"cumulative_seconds":0.010558670000000001,"file":"tempfile.py","function":"__getattr__","line":489,"own_seconds":0.002689111,"primitive_calls":1500},{"calls":224750,"cumulative_seconds":0.010479531,"file":"copy.py","function":"_deepcopy_atomic","line":172,"own_seconds":0.010479531,"primitive_calls":224750},{"calls":50,"cumulative_seconds":0.010449165,"file":"fromnumeric.py","function":"nonzero","line":2031,"own_seconds":2.7459000000000003e-05,"primitive_calls":50},{"calls":50,"cumulative_seconds":0.010369207,"file":"~","function":"","line":0,"own_seconds":0.010369207,"primitive_calls":50},{"calls":4650,"cumulative_seconds":0.010348529,"file":"_methods.py","function":"_sum","line":47,"own_seconds":0.0009206790000000001,"primitive_calls":4650},{"calls":10650,"cumulative_seconds":0.009687587000000001,"file":"~","function":"","line":0,"own_seconds":0.002870295,"primitive_calls":10650},{"calls":250,"cumulative_seconds":0.009427642,"file":"episode_tape.py","function":"digest","line":66,"own_seconds":0.00023672500000000002,"primitive_calls":250},{"calls":114450,"cumulative_seconds":0.009354201000000001,"file":"~","function":"","line":0,"own_seconds":0.009354201000000001,"primitive_calls":114450},{"calls":500,"cumulative_seconds":0.008988952,"file":"~","function":"","line":0,"own_seconds":0.008988952,"primitive_calls":500},{"calls":200,"cumulative_seconds":0.008908834000000001,"file":"_function_base_impl.py","function":"_ureduce","line":3827,"own_seconds":0.00045760900000000004,"primitive_calls":200},{"calls":3998,"cumulative_seconds":0.00879796,"file":"pathlib.py","function":"__fspath__","line":447,"own_seconds":0.001258624,"primitive_calls":3998},{"calls":1300,"cumulative_seconds":0.008654018000000001,"file":"pathlib.py","function":"_parse_path","line":387,"own_seconds":0.004074602,"primitive_calls":1300},{"calls":10200,"cumulative_seconds":0.008518424,"file":"~","function":"","line":0,"own_seconds":0.008518424,"primitive_calls":10200},{"calls":57800,"cumulative_seconds":0.008492551000000001,"file":"numeric.py","function":"","line":1476,"own_seconds":0.005873476000000001,"primitive_calls":57800},{"calls":500,"cumulative_seconds":0.008379474000000001,"file":"~","function":"","line":0,"own_seconds":0.008379474000000001,"primitive_calls":500},{"calls":300,"cumulative_seconds":0.007907999,"file":"action_demonstration.py","function":"_relative","line":67,"own_seconds":0.0009682320000000001,"primitive_calls":300},{"calls":11050,"cumulative_seconds":0.007121140000000001,"file":"_methods.py","function":"_all","line":64,"own_seconds":0.002164135,"primitive_calls":11050},{"calls":8400,"cumulative_seconds":0.006981317000000001,"file":"~","function":"","line":0,"own_seconds":0.006981317000000001,"primitive_calls":8400},{"calls":50,"cumulative_seconds":0.006606333000000001,"file":"piper_rgbd_tracker.py","function":"_calibration","line":94,"own_seconds":0.001072774,"primitive_calls":50},{"calls":1500,"cumulative_seconds":0.006573069000000001,"file":"functools.py","function":"update_wrapper","line":35,"own_seconds":0.002939641,"primitive_calls":1500},{"calls":50600,"cumulative_seconds":0.006356408,"file":"~","function":"","line":0,"own_seconds":0.005785773,"primitive_calls":50600}],"finish":[{"calls":1,"cumulative_seconds":0.43519333400000004,"file":"piper_action_capture.py","function":"close","line":275,"own_seconds":0.000407791,"primitive_calls":1},{"calls":1,"cumulative_seconds":0.40444225,"file":"operator_capture.py","function":"_reconcile","line":353,"own_seconds":0.001237237,"primitive_calls":1},{"calls":1,"cumulative_seconds":0.291665334,"file":"operator_capture.py","function":"_prefix","line":541,"own_seconds":0.001988861,"primitive_calls":1},{"calls":1924,"cumulative_seconds":0.267072046,"file":"action_demonstration.py","function":"_ordinary_bytes","line":366,"own_seconds":0.011776730000000001,"primitive_calls":1924},{"calls":1315,"cumulative_seconds":0.24390175500000003,"file":"operator_capture.py","function":"_identity","line":49,"own_seconds":0.003249245,"primitive_calls":1315},{"calls":400,"cumulative_seconds":0.153785702,"file":"operator_capture.py","function":"_bound_document","line":535,"own_seconds":0.00043983700000000005,"primitive_calls":400},{"calls":606,"cumulative_seconds":0.12329308200000001,"file":"operator_capture.py","function":"_read","line":39,"own_seconds":0.001289929,"primitive_calls":606},{"calls":27287,"cumulative_seconds":0.109434293,"file":"","function":"__iter__","line":1022,"own_seconds":0.006151692,"primitive_calls":27287},{"calls":26775,"cumulative_seconds":0.103282601,"file":"pathlib.py","function":"__getitem__","line":277,"own_seconds":0.015693402000000002,"primitive_calls":26775},{"calls":9715,"cumulative_seconds":0.09970986700000001,"file":"~","function":"","line":0,"own_seconds":0.009973023000000001,"primitive_calls":9715},{"calls":201,"cumulative_seconds":0.0918862,"file":"operator_capture.py","function":"_perception","line":122,"own_seconds":0.0022781660000000003,"primitive_calls":201},{"calls":23075,"cumulative_seconds":0.07546206400000001,"file":"action_demonstration.py","function":"","line":368,"own_seconds":0.005451712,"primitive_calls":23075},{"calls":21151,"cumulative_seconds":0.070010352,"file":"pathlib.py","function":"is_symlink","line":909,"own_seconds":0.008346505,"primitive_calls":21151},{"calls":23075,"cumulative_seconds":0.068221234,"file":"pathlib.py","function":"lstat","line":842,"own_seconds":0.004226234000000001,"primitive_calls":23075},{"calls":23808,"cumulative_seconds":0.06806298100000001,"file":"pathlib.py","function":"stat","line":835,"own_seconds":0.0037535320000000004,"primitive_calls":23808},{"calls":65512,"cumulative_seconds":0.067801263,"file":"copy.py","function":"deepcopy","line":118,"own_seconds":0.032972531,"primitive_calls":234},{"calls":24351,"cumulative_seconds":0.067387392,"file":"pathlib.py","function":"_from_parsed_parts","line":420,"own_seconds":0.009553425,"primitive_calls":24351},{"calls":4914,"cumulative_seconds":0.067184327,"file":"copy.py","function":"_deepcopy_dict","line":217,"own_seconds":0.008459971,"primitive_calls":324},{"calls":23817,"cumulative_seconds":0.064339283,"file":"~","function":"","line":0,"own_seconds":0.053514593000000006,"primitive_calls":23817},{"calls":28454,"cumulative_seconds":0.058822284,"file":"pathlib.py","function":"with_segments","line":380,"own_seconds":0.012824095,"primitive_calls":28454},{"calls":3813,"cumulative_seconds":0.058562015,"file":"copy.py","function":"_deepcopy_list","line":191,"own_seconds":0.0045967840000000005,"primitive_calls":1670},{"calls":512,"cumulative_seconds":0.052067674,"file":"operator_capture.py","function":"_artifact_name","line":54,"own_seconds":0.00047428300000000004,"primitive_calls":512},{"calls":2635,"cumulative_seconds":0.048767106000000005,"file":"action_demonstration.py","function":"_relative","line":67,"own_seconds":0.0055181380000000006,"primitive_calls":2635},{"calls":11827,"cumulative_seconds":0.040340758000000004,"file":"pathlib.py","function":"drive","line":551,"own_seconds":0.004511607,"primitive_calls":11827},{"calls":30390,"cumulative_seconds":0.039832459,"file":"pathlib.py","function":"__init__","line":1157,"own_seconds":0.010269179,"primitive_calls":30390},{"calls":512,"cumulative_seconds":0.039310373,"file":"pathlib.py","function":"relative_to","line":663,"own_seconds":0.001791534,"primitive_calls":512},{"calls":6115,"cumulative_seconds":0.035829151000000004,"file":"pathlib.py","function":"_load_parts","line":407,"own_seconds":0.004694345,"primitive_calls":6115},{"calls":1930,"cumulative_seconds":0.034683688000000004,"file":"~","function":"","line":0,"own_seconds":0.034115809000000004,"primitive_calls":1930},{"calls":33025,"cumulative_seconds":0.032514537,"file":"pathlib.py","function":"__init__","line":358,"own_seconds":0.020681616,"primitive_calls":33025},{"calls":1113,"cumulative_seconds":0.031728860000000005,"file":"__init__.py","function":"loads","line":299,"own_seconds":0.001917091,"primitive_calls":1113},{"calls":33534,"cumulative_seconds":0.031307344,"file":"pathlib.py","function":"__str__","line":437,"own_seconds":0.008729801,"primitive_calls":33534},{"calls":1109,"cumulative_seconds":0.030294321000000003,"file":"episode_tape.py","function":"_decode","line":123,"own_seconds":0.0011144660000000002,"primitive_calls":1109},{"calls":2134,"cumulative_seconds":0.028157014,"file":"~","function":"","line":0,"own_seconds":0.028157014,"primitive_calls":2134},{"calls":526,"cumulative_seconds":0.027917119,"file":"episode_tape.py","function":"canonical","line":62,"own_seconds":0.00035018800000000003,"primitive_calls":526},{"calls":526,"cumulative_seconds":0.027400212,"file":"__init__.py","function":"dumps","line":183,"own_seconds":0.0006352710000000001,"primitive_calls":526},{"calls":526,"cumulative_seconds":0.026606831,"file":"encoder.py","function":"encode","line":183,"own_seconds":0.000503852,"primitive_calls":526},{"calls":1113,"cumulative_seconds":0.026493211000000003,"file":"decoder.py","function":"decode","line":333,"own_seconds":0.001334097,"primitive_calls":1113},{"calls":526,"cumulative_seconds":0.02588725,"file":"encoder.py","function":"iterencode","line":205,"own_seconds":0.02588725,"primitive_calls":526},{"calls":2948,"cumulative_seconds":0.025449211000000003,"file":"pathlib.py","function":"parents","line":741,"own_seconds":0.000981028,"primitive_calls":2948},{"calls":2948,"cumulative_seconds":0.024468183,"file":"pathlib.py","function":"__init__","line":268,"own_seconds":0.001479271,"primitive_calls":2948},{"calls":1113,"cumulative_seconds":0.024191599,"file":"decoder.py","function":"raw_decode","line":344,"own_seconds":0.020510127000000003,"primitive_calls":1113},{"calls":6117,"cumulative_seconds":0.02146852,"file":"pathlib.py","function":"_parse_path","line":387,"own_seconds":0.011099414,"primitive_calls":6117},{"calls":131958,"cumulative_seconds":0.020558998000000002,"file":"~","function":"","line":0,"own_seconds":0.013812106000000001,"primitive_calls":80841},{"calls":1,"cumulative_seconds":0.016977250000000003,"file":"_npyio_impl.py","function":"savez_compressed","line":681,"own_seconds":9.625e-06,"primitive_calls":1},{"calls":1,"cumulative_seconds":0.016967125,"file":"_npyio_impl.py","function":"_savez","line":756,"own_seconds":5.6123000000000005e-05,"primitive_calls":1},{"calls":5,"cumulative_seconds":0.016926334,"file":"piper_action_capture.py","function":"_json","line":77,"own_seconds":5.2879000000000007e-05,"primitive_calls":5},{"calls":22,"cumulative_seconds":0.015333333000000001,"file":"_format_impl.py","function":"write_array","line":702,"own_seconds":9.2297e-05,"primitive_calls":22},{"calls":44,"cumulative_seconds":0.014964871000000001,"file":"__init__.py","function":"write","line":1205,"own_seconds":7.7697e-05,"primitive_calls":44},{"calls":407,"cumulative_seconds":0.014882064,"file":"episode_tape.py","function":"digest","line":66,"own_seconds":0.00029267000000000003,"primitive_calls":407},{"calls":44,"cumulative_seconds":0.014769457000000001,"file":"~","function":"","line":0,"own_seconds":0.014769457000000001,"primitive_calls":44},{"calls":1,"cumulative_seconds":0.01444925,"file":"camera_action_capture.py","function":"_score","line":215,"own_seconds":4.7251000000000006e-05,"primitive_calls":1},{"calls":29954,"cumulative_seconds":0.013424394000000001,"file":"pathlib.py","function":"_format_parsed_parts","line":429,"own_seconds":0.007662732,"primitive_calls":29954},{"calls":512,"cumulative_seconds":0.013200937000000001,"file":"pathlib.py","function":"is_relative_to","line":690,"own_seconds":0.00046163000000000004,"primitive_calls":512},{"calls":101,"cumulative_seconds":0.012911745,"file":"operator_capture.py","function":"_snapshot","line":96,"own_seconds":0.000169636,"primitive_calls":101},{"calls":101,"cumulative_seconds":0.012531625000000001,"file":"action_demonstration.py","function":"_snapshot","line":168,"own_seconds":0.0016954070000000001,"primitive_calls":101},{"calls":25792,"cumulative_seconds":0.011534156,"file":"pathlib.py","function":"__fspath__","line":447,"own_seconds":0.005909158,"primitive_calls":25792},{"calls":138492,"cumulative_seconds":0.011082158,"file":"~","function":"","line":0,"own_seconds":0.011082158,"primitive_calls":138492},{"calls":2010,"cumulative_seconds":0.010954329,"file":"~","function":"","line":0,"own_seconds":0.010954329,"primitive_calls":2010},{"calls":53550,"cumulative_seconds":0.010190901,"file":"pathlib.py","function":"__len__","line":274,"own_seconds":0.007136865,"primitive_calls":53550},{"calls":52813,"cumulative_seconds":0.01009674,"file":"action_demonstration.py","function":"","line":72,"own_seconds":0.00703915,"primitive_calls":52813},{"calls":115626,"cumulative_seconds":0.009422839,"file":"~","function":"","line":0,"own_seconds":0.009394715000000001,"primitive_calls":115626},{"calls":30390,"cumulative_seconds":0.008831656,"file":"pathlib.py","function":"__new__","line":1164,"own_seconds":0.0054423810000000005,"primitive_calls":30390},{"calls":3472,"cumulative_seconds":0.008784236,"file":"","function":"join","line":71,"own_seconds":0.005155529000000001,"primitive_calls":3472},{"calls":1929,"cumulative_seconds":0.008412904,"file":"action_demonstration.py","function":"_vec","line":55,"own_seconds":0.0014976050000000002,"primitive_calls":1929},{"calls":1938,"cumulative_seconds":0.007011578,"file":"pathlib.py","function":"__truediv__","line":719,"own_seconds":0.0004963060000000001,"primitive_calls":1938},{"calls":2,"cumulative_seconds":0.006670875000000001,"file":"operator_capture.py","function":"_journal","line":514,"own_seconds":0.000916563,"primitive_calls":2},{"calls":1,"cumulative_seconds":0.006532292,"file":"piper_feedback_score.py","function":"score_feedback_episode","line":278,"own_seconds":7.6625e-05,"primitive_calls":1},{"calls":1938,"cumulative_seconds":0.006515272000000001,"file":"pathlib.py","function":"joinpath","line":711,"own_seconds":0.00082176,"primitive_calls":1938},{"calls":1528,"cumulative_seconds":0.006461978,"file":"pathlib.py","function":"__eq__","line":519,"own_seconds":0.000602064,"primitive_calls":1528},{"calls":13361,"cumulative_seconds":0.006236485000000001,"file":"action_demonstration.py","function":"_bounded","line":49,"own_seconds":0.0027983350000000003,"primitive_calls":13361},{"calls":512,"cumulative_seconds":0.006214659,"file":"","function":"__contains__","line":1032,"own_seconds":0.000496783,"primitive_calls":512},{"calls":1924,"cumulative_seconds":0.006141542000000001,"file":"","function":"fdopen","line":1060,"own_seconds":0.0013234050000000002,"primitive_calls":1924},{"calls":24,"cumulative_seconds":0.006092833000000001,"file":"~","function":"","line":0,"own_seconds":0.000312525,"primitive_calls":24},{"calls":3573,"cumulative_seconds":0.006035609000000001,"file":"pathlib.py","function":"_str_normcase","line":484,"own_seconds":0.001397239,"primitive_calls":3573},{"calls":62371,"cumulative_seconds":0.0057751700000000005,"file":"~","function":"","line":0,"own_seconds":0.0057751700000000005,"primitive_calls":62371},{"calls":1915,"cumulative_seconds":0.005591953,"file":"action_demonstration.py","function":"_availability","line":151,"own_seconds":0.001744164,"primitive_calls":1915},{"calls":1935,"cumulative_seconds":0.00538936,"file":"~","function":"","line":0,"own_seconds":0.0048364,"primitive_calls":1935},{"calls":20665,"cumulative_seconds":0.005311479,"file":"episode_tape.py","function":"_number","line":75,"own_seconds":0.004182101000000001,"primitive_calls":20665},{"calls":30534,"cumulative_seconds":0.004834973,"file":"~","function":"","line":0,"own_seconds":0.004834973,"primitive_calls":30534},{"calls":83194,"cumulative_seconds":0.004588597000000001,"file":"~","function":"","line":0,"own_seconds":0.004588597000000001,"primitive_calls":83194},{"calls":33870,"cumulative_seconds":0.004536826,"file":"~","function":"","line":0,"own_seconds":0.004536826,"primitive_calls":33870},{"calls":6,"cumulative_seconds":0.004454124,"file":"piper_action_capture.py","function":"_record","line":64,"own_seconds":8.1582e-05,"primitive_calls":6},{"calls":401,"cumulative_seconds":0.004443336,"file":"action_demonstration.py","function":"_action","line":247,"own_seconds":0.0005752880000000001,"primitive_calls":401},{"calls":512,"cumulative_seconds":0.003935167,"file":"pathlib.py","function":"as_posix","line":450,"own_seconds":0.00023672300000000002,"primitive_calls":512},{"calls":619,"cumulative_seconds":0.0039292780000000005,"file":"pathlib.py","function":"is_file","line":886,"own_seconds":0.000306228,"primitive_calls":619},{"calls":33029,"cumulative_seconds":0.003757863,"file":"~","function":"","line":0,"own_seconds":0.003757863,"primitive_calls":33029},{"calls":1,"cumulative_seconds":0.003690875,"file":"renderer.py","function":"close","line":316,"own_seconds":0.003690875,"primitive_calls":1},{"calls":5238,"cumulative_seconds":0.003683871,"file":"action_demonstration.py","function":"_time","line":61,"own_seconds":0.001218878,"primitive_calls":5238},{"calls":9797,"cumulative_seconds":0.0036814720000000003,"file":"episode_tape.py","function":"pairs","line":135,"own_seconds":0.0036814720000000003,"primitive_calls":9797},{"calls":2,"cumulative_seconds":0.0036694170000000003,"file":"__init__.py","function":"free","line":58,"own_seconds":0.0036645000000000002,"primitive_calls":2},{"calls":1981,"cumulative_seconds":0.0036276240000000003,"file":"~","function":"","line":0,"own_seconds":0.0024300420000000003,"primitive_calls":1981},{"calls":1929,"cumulative_seconds":0.0035973560000000003,"file":"episode_tape.py","function":"_vector","line":116,"own_seconds":0.0015668350000000001,"primitive_calls":1929},{"calls":6117,"cumulative_seconds":0.003591435,"file":"","function":"splitroot","line":138,"own_seconds":0.002609615,"primitive_calls":6117},{"calls":8727,"cumulative_seconds":0.0035584740000000003,"file":"copy.py","function":"_keep_alive","line":231,"own_seconds":0.002318611,"primitive_calls":8727},{"calls":518,"cumulative_seconds":0.003492428,"file":"pathlib.py","function":"rglob","line":1097,"own_seconds":7.823900000000001e-05,"primitive_calls":518},{"calls":21552,"cumulative_seconds":0.003456363,"file":"~","function":"","line":0,"own_seconds":0.003456363,"primitive_calls":21552},{"calls":43339,"cumulative_seconds":0.003412009,"file":"~","function":"","line":0,"own_seconds":0.003395631,"primitive_calls":43337},{"calls":518,"cumulative_seconds":0.00340048,"file":"pathlib.py","function":"_select_from","line":234,"own_seconds":8.9628e-05,"primitive_calls":518},{"calls":22,"cumulative_seconds":0.003359873,"file":"_npyio_impl.py","function":"__getitem__","line":239,"own_seconds":5.4078000000000006e-05,"primitive_calls":22},{"calls":626,"cumulative_seconds":0.0032480540000000002,"file":"pathlib.py","function":"_select_from","line":200,"own_seconds":0.000736291,"primitive_calls":626}],"open":[{"calls":1,"cumulative_seconds":0.09994225000000001,"file":"renderer.py","function":"__init__","line":29,"own_seconds":0.054509,"primitive_calls":1},{"calls":2,"cumulative_seconds":0.083712084,"file":"robot_profiles.py","function":"_payload","line":46,"own_seconds":0.000460592,"primitive_calls":2},{"calls":225,"cumulative_seconds":0.06610049700000001,"file":"~","function":"","line":0,"own_seconds":0.06610049700000001,"primitive_calls":225},{"calls":1,"cumulative_seconds":0.051790042,"file":"reference_sim.py","function":"model_digest","line":184,"own_seconds":1.096e-05,"primitive_calls":1},{"calls":1,"cumulative_seconds":0.045406166000000005,"file":"__init__.py","function":"__init__","line":30,"own_seconds":4.9625e-05,"primitive_calls":1},{"calls":8,"cumulative_seconds":0.045364915000000006,"file":"cgl.py","function":"checked_func","line":129,"own_seconds":0.045364915000000006,"primitive_calls":8},{"calls":708,"cumulative_seconds":0.043507185000000004,"file":"~","function":"","line":0,"own_seconds":0.000453139,"primitive_calls":708},{"calls":1,"cumulative_seconds":0.042949791,"file":"robot_profiles.py","function":"verify_assets","line":62,"own_seconds":2.5540000000000003e-05,"primitive_calls":1},{"calls":528,"cumulative_seconds":0.037356946,"file":"robot_profiles.py","function":"","line":53,"own_seconds":0.0012884670000000002,"primitive_calls":528},{"calls":1,"cumulative_seconds":0.036725708,"file":"piper_action_capture.py","function":"sample","line":211,"own_seconds":0.000129624,"primitive_calls":1},{"calls":1,"cumulative_seconds":0.033246500000000005,"file":"camera_action_capture.py","function":"_fresh_estimate","line":194,"own_seconds":2.0834e-05,"primitive_calls":1},{"calls":1,"cumulative_seconds":0.033139875,"file":"piper_rgbd_tracker.py","function":"estimate_pose","line":227,"own_seconds":0.000471499,"primitive_calls":1},{"calls":2,"cumulative_seconds":0.032989709,"file":"renderer.py","function":"render","line":132,"own_seconds":0.000181291,"primitive_calls":2},{"calls":1,"cumulative_seconds":0.02611575,"file":"piper_rgbd_tracker.py","function":"_top_plane","line":148,"own_seconds":0.0008479900000000001,"primitive_calls":1},{"calls":7894,"cumulative_seconds":0.025520582,"file":"","function":"__iter__","line":1022,"own_seconds":0.001559749,"primitive_calls":7894},{"calls":18,"cumulative_seconds":0.025145,"file":"","function":"_find_and_load","line":1349,"own_seconds":5.8957000000000005e-05,"primitive_calls":4},{"calls":18,"cumulative_seconds":0.025034791,"file":"","function":"_find_and_load_unlocked","line":1304,"own_seconds":4.6163000000000005e-05,"primitive_calls":4},{"calls":18,"cumulative_seconds":0.024810126000000002,"file":"","function":"_load_unlocked","line":911,"own_seconds":3.4290000000000005e-05,"primitive_calls":4},{"calls":9,"cumulative_seconds":0.024727917000000002,"file":"","function":"exec_module","line":993,"own_seconds":1.7623e-05,"primitive_calls":4},{"calls":1608,"cumulative_seconds":0.024143053,"file":"","function":"__contains__","line":1032,"own_seconds":0.001496481,"primitive_calls":1608},{"calls":7546,"cumulative_seconds":0.023960833,"file":"pathlib.py","function":"__getitem__","line":277,"own_seconds":0.003812269,"primitive_calls":7546},{"calls":49,"cumulative_seconds":0.02283121,"file":"","function":"_call_with_frames_removed","line":480,"own_seconds":1.8167e-05,"primitive_calls":8},{"calls":21,"cumulative_seconds":0.022825,"file":"~","function":"","line":0,"own_seconds":0.0011286660000000002,"primitive_calls":4},{"calls":2,"cumulative_seconds":0.022555666000000002,"file":"__init__.py","function":"__getattr__","line":700,"own_seconds":7.416000000000001e-06,"primitive_calls":2},{"calls":9,"cumulative_seconds":0.020690167000000002,"file":"","function":"_handle_fromlist","line":1390,"own_seconds":1.4288000000000001e-05,"primitive_calls":4},{"calls":4,"cumulative_seconds":0.020676292000000002,"file":"~","function":"","line":0,"own_seconds":5.876e-06,"primitive_calls":4},{"calls":2,"cumulative_seconds":0.0164505,"file":"~","function":"","line":0,"own_seconds":0.0164505,"primitive_calls":2},{"calls":2,"cumulative_seconds":0.016301292000000002,"file":"~","function":"","line":0,"own_seconds":0.016296750000000002,"primitive_calls":2},{"calls":6127,"cumulative_seconds":0.01534913,"file":"pathlib.py","function":"_from_parsed_parts","line":420,"own_seconds":0.0022754140000000003,"primitive_calls":6127},{"calls":1,"cumulative_seconds":0.013875333,"file":"__init__.py","function":"","line":1,"own_seconds":1.5542e-05,"primitive_calls":1},{"calls":6333,"cumulative_seconds":0.011570698,"file":"pathlib.py","function":"with_segments","line":380,"own_seconds":0.0026146800000000003,"primitive_calls":6333},{"calls":180,"cumulative_seconds":0.010993122000000001,"file":"reference_sim.py","function":"_regular_bytes","line":42,"own_seconds":0.000548263,"primitive_calls":180},{"calls":242,"cumulative_seconds":0.010400260000000001,"file":"~","function":"","line":0,"own_seconds":0.010400260000000001,"primitive_calls":242},{"calls":18,"cumulative_seconds":0.009531458000000001,"file":"","function":"module_from_spec","line":806,"own_seconds":2.0869000000000003e-05,"primitive_calls":18},{"calls":212,"cumulative_seconds":0.009512794,"file":"~","function":"","line":0,"own_seconds":0.009512794,"primitive_calls":212},{"calls":9,"cumulative_seconds":0.009350083,"file":"","function":"create_module","line":1291,"own_seconds":5.748000000000001e-06,"primitive_calls":9},{"calls":9,"cumulative_seconds":0.009339167,"file":"~","function":"","line":0,"own_seconds":0.009333126,"primitive_calls":9},{"calls":1,"cumulative_seconds":0.007946833,"file":"~","function":"","line":0,"own_seconds":0.007946833,"primitive_calls":1},{"calls":1,"cumulative_seconds":0.0076697910000000005,"file":"_pickle.py","function":"","line":1,"own_seconds":1.1375e-05,"primitive_calls":1},{"calls":4,"cumulative_seconds":0.007556791,"file":"_function_base_impl.py","function":"_ureduce","line":3827,"own_seconds":1.4167e-05,"primitive_calls":4},{"calls":3,"cumulative_seconds":0.007447583000000001,"file":"_function_base_impl.py","function":"median","line":3914,"own_seconds":1.0125e-05,"primitive_calls":3},{"calls":3,"cumulative_seconds":0.007426083000000001,"file":"_function_base_impl.py","function":"_median","line":4003,"own_seconds":5.0334e-05,"primitive_calls":3},{"calls":6364,"cumulative_seconds":0.007361251,"file":"pathlib.py","function":"__init__","line":1157,"own_seconds":0.001950289,"primitive_calls":6364},{"calls":3,"cumulative_seconds":0.0072975,"file":"_utils_impl.py","function":"_median_nancheck","line":407,"own_seconds":2.2041e-05,"primitive_calls":3},{"calls":1,"cumulative_seconds":0.006890584000000001,"file":"__init__.py","function":"","line":1,"own_seconds":3.6625e-05,"primitive_calls":1},{"calls":6084,"cumulative_seconds":0.006504092,"file":"pathlib.py","function":"__eq__","line":519,"own_seconds":0.001906066,"primitive_calls":6084},{"calls":9,"cumulative_seconds":0.0064683760000000005,"file":"","function":"exec_module","line":1299,"own_seconds":5.6270000000000005e-06,"primitive_calls":6},{"calls":9,"cumulative_seconds":0.0064621240000000005,"file":"~","function":"","line":0,"own_seconds":0.0013241230000000002,"primitive_calls":6},{"calls":9,"cumulative_seconds":0.005666292000000001,"file":"","function":"get_code","line":1066,"own_seconds":4.9621000000000005e-05,"primitive_calls":9},{"calls":503,"cumulative_seconds":0.005577445,"file":"piper_task.py","function":"_finite","line":148,"own_seconds":0.0006617810000000001,"primitive_calls":503},{"calls":4000,"cumulative_seconds":0.005547395,"file":"piper_task.py","function":"","line":193,"own_seconds":0.005547395,"primitive_calls":4000},{"calls":6370,"cumulative_seconds":0.005423295000000001,"file":"pathlib.py","function":"__init__","line":358,"own_seconds":0.003397279,"primitive_calls":6370},{"calls":1,"cumulative_seconds":0.005202125,"file":"piper_rgbd_tracker.py","function":"_cube_rays","line":205,"own_seconds":0.0033160810000000002,"primitive_calls":1},{"calls":500,"cumulative_seconds":0.004941446,"file":"~","function":"","line":0,"own_seconds":0.004941446,"primitive_calls":500},{"calls":33614,"cumulative_seconds":0.004706702,"file":"~","function":"","line":0,"own_seconds":0.003083268,"primitive_calls":19954},{"calls":501,"cumulative_seconds":0.004376184,"file":"~","function":"","line":0,"own_seconds":0.004376184,"primitive_calls":501},{"calls":12168,"cumulative_seconds":0.004166119,"file":"pathlib.py","function":"_str_normcase","line":484,"own_seconds":0.0038028880000000004,"primitive_calls":12168},{"calls":1,"cumulative_seconds":0.0039232500000000005,"file":"core.py","function":"","line":1,"own_seconds":0.00020054100000000002,"primitive_calls":1},{"calls":9,"cumulative_seconds":0.003680127,"file":"","function":"get_data","line":1187,"own_seconds":1.7963e-05,"primitive_calls":9},{"calls":6,"cumulative_seconds":0.003492834,"file":"piper_action_capture.py","function":"_record","line":64,"own_seconds":7.249700000000001e-05,"primitive_calls":6},{"calls":3155,"cumulative_seconds":0.0034556540000000003,"file":"~","function":"","line":0,"own_seconds":0.0034556540000000003,"primitive_calls":3155},{"calls":1790,"cumulative_seconds":0.0031409410000000004,"file":"pathlib.py","function":"parents","line":741,"own_seconds":0.000450305,"primitive_calls":1790},{"calls":1,"cumulative_seconds":0.0029697910000000003,"file":"piper_action_capture.py","function":"_png","line":87,"own_seconds":7.209000000000001e-06,"primitive_calls":1},{"calls":503,"cumulative_seconds":0.002954159,"file":"reference_task.py","function":"_finite","line":219,"own_seconds":0.000372242,"primitive_calls":503},{"calls":2940,"cumulative_seconds":0.002905209,"file":"copy.py","function":"deepcopy","line":118,"own_seconds":0.0014190420000000001,"primitive_calls":32},{"calls":1,"cumulative_seconds":0.002817125,"file":"~","function":"","line":0,"own_seconds":0.002817125,"primitive_calls":1},{"calls":187,"cumulative_seconds":0.002801586,"file":"copy.py","function":"_deepcopy_dict","line":217,"own_seconds":0.000382406,"primitive_calls":28},{"calls":188,"cumulative_seconds":0.0027104150000000003,"file":"~","function":"","line":0,"own_seconds":0.0026564180000000002,"primitive_calls":188},{"calls":1790,"cumulative_seconds":0.002690636,"file":"pathlib.py","function":"__init__","line":268,"own_seconds":0.000727093,"primitive_calls":1790},{"calls":506,"cumulative_seconds":0.002503707,"file":"~","function":"","line":0,"own_seconds":0.000225197,"primitive_calls":506},{"calls":4,"cumulative_seconds":0.002492209,"file":"piper_action_capture.py","function":"_json","line":77,"own_seconds":1.7749000000000002e-05,"primitive_calls":4},{"calls":13652,"cumulative_seconds":0.002334871,"file":"pathlib.py","function":"__len__","line":274,"own_seconds":0.001622015,"primitive_calls":13652},{"calls":2515,"cumulative_seconds":0.0022669260000000003,"file":"reference_task.py","function":"","line":221,"own_seconds":0.000978401,"primitive_calls":2515},{"calls":6348,"cumulative_seconds":0.002192114,"file":"pathlib.py","function":"_format_parsed_parts","line":429,"own_seconds":0.001355807,"primitive_calls":6348},{"calls":96,"cumulative_seconds":0.002153705,"file":"numeric.py","function":"cross","line":1563,"own_seconds":0.0006375030000000001,"primitive_calls":96},{"calls":2040,"cumulative_seconds":0.0021098830000000003,"file":"pathlib.py","function":"drive","line":551,"own_seconds":0.00030651100000000003,"primitive_calls":2040},{"calls":29300,"cumulative_seconds":0.002101692,"file":"~","function":"","line":0,"own_seconds":0.002082609,"primitive_calls":29300},{"calls":618,"cumulative_seconds":0.002094505,"file":"~","function":"","line":0,"own_seconds":0.001626354,"primitive_calls":618},{"calls":554,"cumulative_seconds":0.0020557590000000003,"file":"pathlib.py","function":"lstat","line":842,"own_seconds":0.000123347,"primitive_calls":554},{"calls":2,"cumulative_seconds":0.001961959,"file":"dataclasses.py","function":"wrap","line":1264,"own_seconds":1.1126e-05,"primitive_calls":2},{"calls":559,"cumulative_seconds":0.001951079,"file":"pathlib.py","function":"stat","line":835,"own_seconds":0.00010440900000000001,"primitive_calls":559},{"calls":2,"cumulative_seconds":0.0019508330000000001,"file":"dataclasses.py","function":"_process_class","line":921,"own_seconds":9.7788e-05,"primitive_calls":2},{"calls":23,"cumulative_seconds":0.001918041,"file":"~","function":"","line":0,"own_seconds":1.7625e-05,"primitive_calls":23},{"calls":13,"cumulative_seconds":0.001895916,"file":"core.py","function":"_convert2ma","line":8820,"own_seconds":8.887600000000001e-05,"primitive_calls":13},{"calls":235,"cumulative_seconds":0.0018237050000000001,"file":"pathlib.py","function":"_load_parts","line":407,"own_seconds":0.000212467,"primitive_calls":235},{"calls":9,"cumulative_seconds":0.0018216240000000002,"file":"","function":"_compile_bytecode","line":755,"own_seconds":0.000883333,"primitive_calls":9},{"calls":10,"cumulative_seconds":0.0018008310000000001,"file":"reference_sim.py","function":"native_warnings","line":135,"own_seconds":2.6957000000000003e-05,"primitive_calls":10},{"calls":5,"cumulative_seconds":0.0017924190000000002,"file":"contextlib.py","function":"__enter__","line":132,"own_seconds":3.877e-06,"primitive_calls":5},{"calls":1014,"cumulative_seconds":0.001776369,"file":"fromnumeric.py","function":"any","line":2474,"own_seconds":0.000311959,"primitive_calls":1014},{"calls":40,"cumulative_seconds":0.0017580010000000001,"file":"inspect.py","function":"signature","line":3343,"own_seconds":1.4918e-05,"primitive_calls":40},{"calls":40,"cumulative_seconds":0.001743083,"file":"inspect.py","function":"from_callable","line":3081,"own_seconds":1.9961e-05,"primitive_calls":40},{"calls":42,"cumulative_seconds":0.0017231220000000001,"file":"inspect.py","function":"_signature_from_callable","line":2501,"own_seconds":0.00011603400000000001,"primitive_calls":40},{"calls":6364,"cumulative_seconds":0.0016601370000000001,"file":"pathlib.py","function":"__new__","line":1164,"own_seconds":0.001020359,"primitive_calls":6364},{"calls":214,"cumulative_seconds":0.001640507,"file":"~","function":"","line":0,"own_seconds":0.00108788,"primitive_calls":214},{"calls":6,"cumulative_seconds":0.001553501,"file":"~","function":"","line":0,"own_seconds":0.001479087,"primitive_calls":6},{"calls":1023,"cumulative_seconds":0.001489536,"file":"fromnumeric.py","function":"_wrapreduction_any_all","line":86,"own_seconds":0.000542969,"primitive_calls":1023},{"calls":1,"cumulative_seconds":0.0014842920000000001,"file":"env.py","function":"","line":1,"own_seconds":1.5624e-05,"primitive_calls":1},{"calls":289,"cumulative_seconds":0.001387674,"file":"numeric.py","function":"moveaxis","line":1489,"own_seconds":0.000367456,"primitive_calls":289},{"calls":372,"cumulative_seconds":0.001364131,"file":"pathlib.py","function":"is_symlink","line":909,"own_seconds":0.00017174400000000001,"primitive_calls":372},{"calls":1,"cumulative_seconds":0.0013483750000000002,"file":"operator_capture.py","function":"_save_frames","line":219,"own_seconds":1.6666000000000003e-05,"primitive_calls":1}]},"python":"3.12.9","recorded_intervals":100,"resolution":[320,240],"schema":"dvidia.operator-profile/v1","scope":"Single-process local scripted capture including encoder-only IK; excludes sockets, Godot, real-time pacing, model fitting and hardware. cProfile cumulative scopes overlap.","source_kind":"simulation_scripted_input","source_sha256":{"camera_action_capture.py":"399f512a08087c72bfa37e382157a2250f413e423974b77b1bd3c0a911ff0a1e","operator_capture.py":"f1b5b5c5abbdf090342bb18df76e95f1fd518bd05fc5705aedb956f0ce081715","piper_action_capture.py":"da037b2198cf7d2f3a9aa40fc19a4c0f5cc375a22c5dd75606e2c1856f6efc7f","piper_encoder_kinematics.py":"6606bb8aad04e5abb1e9b6d1a8ec628a4114acd167862167184fd4eef1d21c34","piper_rgbd_tracker.py":"43202cfcea404061a3a65124d6ad24aeeec5fae8ffaf863caa245f2f54c46c36","profile-operator-capture.py":"daf3aec5ad1ace998c0368df5658064b7300217657da81ff1fa4b318dab299f1"},"strict_success":false,"system":"macOS-26.5.2-arm64-arm-64bit","teacher_queries":0,"total_seconds":3.5429303330020048} diff --git a/benchmarks/godot-capture-performance-v01/baseline-unprofiled.json b/benchmarks/godot-capture-performance-v01/baseline-unprofiled.json new file mode 100644 index 0000000..c8720b8 --- /dev/null +++ b/benchmarks/godot-capture-performance-v01/baseline-unprofiled.json @@ -0,0 +1 @@ +{"camera_control":{"count":50,"max_ms":43.53804199490696,"p50_ms":30.42877052212134,"p95_ms":34.184999694116414,"total_seconds":1.5595909123076126},"camera_dt_seconds":0.04,"camera_pairs":51,"capture_bytes":19971489,"capture_integrity_sha256":"9eeb765704cb0665fee3cb469dd118e746d768e0a8355d7ac42412a38e6b08cb","case":{"goal_position_m":[0.35,0.08,0.08],"group_id":"operator-start-001","id":"operator-block-001","object_position_m":[0.3,-0.03,0.082],"seed":0},"complete":true,"control":{"count":100,"max_ms":43.53804199490696,"p50_ms":18.378999986452982,"p95_ms":33.44109557219781,"total_seconds":1.8394407449522987},"control_dt_seconds":0.02,"duration_s":2.0,"encoder_control":{"count":50,"max_ms":7.342415978200734,"p50_ms":5.4617709829472005,"p95_ms":6.623258112813345,"total_seconds":0.2798498326446861},"finish_seconds":0.33264308294747025,"ik":{"count":100,"max_ms":0.23612502263858914,"p50_ms":0.13704149750992656,"p95_ms":0.18392111815046516,"total_seconds":0.013867082772776484},"interval_seconds":[0.006021083972882479,0.04353804199490696,0.0056541249505244195,0.03531012503663078,0.005694540974218398,0.03177833301015198,0.0067646250245161355,0.032393583038356155,0.005654249980580062,0.030587624991312623,0.005554792005568743,0.0303683330421336,0.005400415975600481,0.031393583049066365,0.005733917001634836,0.0334840840077959,0.005887916020583361,0.03148225002223626,0.006534249987453222,0.03396454098401591,0.006382291961926967,0.03055520897032693,0.005305790982674807,0.029762874997686595,0.005266459018457681,0.03003495797747746,0.005211916984990239,0.029980125022120774,0.005443999951239675,0.030132291023619473,0.005422957998234779,0.029997041972819716,0.007342415978200734,0.033438833022955805,0.005256625008769333,0.03139275003923103,0.005215124983806163,0.030026708031073213,0.005289916996844113,0.03022508299909532,0.005468167015351355,0.029828791972249746,0.005895459034945816,0.03245987498667091,0.005328083003405482,0.030138041998725384,0.005228249996434897,0.029561957984697074,0.005348792008589953,0.02941558399470523,0.005403040966484696,0.030749833036679775,0.006171291985083371,0.030768041964620352,0.0055210410500876606,0.03436537500238046,0.005323499965015799,0.0324609589879401,0.005558834003750235,0.030730250000488013,0.005515499971807003,0.031263041018974036,0.005856207979377359,0.03168762504355982,0.005512707983143628,0.03141812502872199,0.005288499989546835,0.03027404099702835,0.005116415966767818,0.029874916013795882,0.005134709004778415,0.029905625036917627,0.005278750031720847,0.029934332997072488,0.005299625045154244,0.029545707977376878,0.005605582962743938,0.03048920800210908,0.006696082942653447,0.032743874995503575,0.005241583043243736,0.030028207984287292,0.005348750040866435,0.02992787503171712,0.005455374950543046,0.030114667024463415,0.0053635420044884086,0.030319540994241834,0.00557412498164922,0.031092084012925625,0.005568624997977167,0.030118249997030944,0.005263875005766749,0.02996841596905142,0.005214667005930096,0.029878125002142042,0.005653083964716643,0.030157333007082343,0.005578249983955175,0.030524833011440933],"numpy":"2.5.3","open_seconds":0.5098034159746021,"physical_robot_ready":false,"physics_dt_seconds":0.001,"profile_enabled":false,"profiles":{"control":[],"finish":[],"open":[]},"python":"3.12.9","recorded_intervals":100,"resolution":[320,240],"schema":"dvidia.operator-profile/v1","scope":"Single-process local scripted capture including encoder-only IK; excludes sockets, Godot, real-time pacing, model fitting and hardware. cProfile cumulative scopes overlap.","source_kind":"simulation_scripted_input","source_sha256":{"camera_action_capture.py":"399f512a08087c72bfa37e382157a2250f413e423974b77b1bd3c0a911ff0a1e","operator_capture.py":"f1b5b5c5abbdf090342bb18df76e95f1fd518bd05fc5705aedb956f0ce081715","piper_action_capture.py":"da037b2198cf7d2f3a9aa40fc19a4c0f5cc375a22c5dd75606e2c1856f6efc7f","piper_encoder_kinematics.py":"6606bb8aad04e5abb1e9b6d1a8ec628a4114acd167862167184fd4eef1d21c34","piper_rgbd_tracker.py":"43202cfcea404061a3a65124d6ad24aeeec5fae8ffaf863caa245f2f54c46c36","profile-operator-capture.py":"daf3aec5ad1ace998c0368df5658064b7300217657da81ff1fa4b318dab299f1"},"strict_success":false,"system":"macOS-26.5.2-arm64-arm-64bit","teacher_queries":0,"total_seconds":3.1507570419926196} diff --git a/benchmarks/godot-capture-performance-v01/candidate.json b/benchmarks/godot-capture-performance-v01/candidate.json new file mode 100644 index 0000000..9317735 --- /dev/null +++ b/benchmarks/godot-capture-performance-v01/candidate.json @@ -0,0 +1,23 @@ +{ + "schema": "dvidia.operator-performance-candidate/v1", + "frozen_at": "2026-11-11T09:02:48.786301+00:00", + "optimization": "Cache immutable camera-to-base ray geometry with exact calibration keys, max2 entries; preserve current object/depth processing.", + "source_sha256": { + "src/dvidia_training/piper_rgbd_tracker.py": "e89cba0414832fcfc09127eb05a326557d3aa32afd458a9a8f59d6c4f850f2d3", + "tests/test_tracker_ray_cache.py": "def2baa4b73a93095f5005574aed3f7f969184e3ca17e4b1c320bdc3084ca15f", + "scripts/profile-operator-capture.py": "daf3aec5ad1ace998c0368df5658064b7300217657da81ff1fa4b318dab299f1", + "scripts/compare-operator-captures.py": "c6a45b36a84d66d71a830d9c620ef814bd060f34a0a261d54167de5c417c24c0" + }, + "plan_sha256": "47e19a0d45a66bd7dcddbe2ab354776c676bae9708d3b6e2baaf7bb99d2a5fe4", + "retained_cache_max_bytes": 14745600, + "retained_cache_current_resolution_max_bytes": 3686400, + "transient_memory_measured": false, + "comparison_order": [ + "baseline", + "candidate", + "candidate", + "baseline", + "baseline", + "candidate" + ] +} diff --git a/benchmarks/godot-capture-performance-v01/fresh-install.json b/benchmarks/godot-capture-performance-v01/fresh-install.json new file mode 100644 index 0000000..87ff8bd --- /dev/null +++ b/benchmarks/godot-capture-performance-v01/fresh-install.json @@ -0,0 +1,19 @@ +{ + "schema": "dvidia.operator-performance-fresh-install/v1", + "source_sha256": "e89cba0414832fcfc09127eb05a326557d3aa32afd458a9a8f59d6c4f850f2d3", + "installed_source_matches": true, + "cwd_outside_checkout": true, + "features_shape": [ + 100, + 269 + ], + "targets_shape": [ + 100, + 7 + ], + "source_kind": "simulation_scripted_input", + "base_cli_export_only": true, + "native_graphics_qualified": false, + "physical_robot_ready": false, + "training_started": false +} diff --git a/benchmarks/godot-capture-performance-v01/pair-01-baseline.json b/benchmarks/godot-capture-performance-v01/pair-01-baseline.json new file mode 100644 index 0000000..092c0d7 --- /dev/null +++ b/benchmarks/godot-capture-performance-v01/pair-01-baseline.json @@ -0,0 +1 @@ +{"camera_control":{"count":50,"max_ms":202.28437497280538,"p50_ms":98.5261254827492,"p95_ms":124.12394999118985,"total_seconds":5.1247595408931375},"camera_dt_seconds":0.04,"camera_pairs":51,"capture_bytes":19971365,"capture_integrity_sha256":"8dc17e27637ca6eb0dea4810e341633380066d1c7e92bdd3baa140387dd6514f","case":{"goal_position_m":[0.35,0.08,0.08],"group_id":"operator-start-001","id":"operator-block-001","object_position_m":[0.3,-0.03,0.082],"seed":0},"complete":true,"control":{"count":100,"max_ms":202.28437497280538,"p50_ms":81.58202102640644,"p95_ms":111.04468926205298,"total_seconds":6.286720753996633},"control_dt_seconds":0.02,"duration_s":2.0,"encoder_control":{"count":50,"max_ms":78.26379203470424,"p50_ms":21.5492709830869,"p95_ms":29.8785145569127,"total_seconds":1.1619612131034955},"finish_seconds":1.184006416995544,"ik":{"count":100,"max_ms":1.74866704037413,"p50_ms":0.5229164962656796,"p95_ms":0.9545312525006009,"total_seconds":0.05820921575650573},"interval_seconds":[0.02358779194764793,0.16757237497949973,0.0252486250246875,0.10419220803305507,0.019289083022158593,0.095367832982447,0.018274333036970347,0.09857379196910188,0.0183087500045076,0.10568962496472523,0.019486667006276548,0.10061804199358448,0.019632457988336682,0.0893711670069024,0.025493375025689602,0.09613550000358373,0.023416875046677887,0.10071083303773776,0.023357084020972252,0.09524220897583291,0.020503124978858978,0.09577945899218321,0.021243499999400228,0.09879437502240762,0.029142041981685907,0.09132862504338846,0.021570916986092925,0.0944916249718517,0.02052266604732722,0.09895520802820101,0.030481083027552813,0.11820020800223574,0.027128459012601525,0.10954691597726196,0.022062291973270476,0.08752099995035678,0.02020299999276176,0.09391962498193607,0.019280874985270202,0.08664562494959682,0.01813979202415794,0.20228437497280538,0.07826379203470424,0.1106680830125697,0.02538241702131927,0.12767062499187887,0.0334250419982709,0.09847845899639651,0.024009000044316053,0.0857862500124611,0.025091584015171975,0.0927669579978101,0.01968974998453632,0.09608695801580325,0.020766332978382707,0.10098487499635667,0.01982699998188764,0.09576599998399615,0.01996233401587233,0.10765658301534131,0.0175874590058811,0.09694591700099409,0.02444329101126641,0.11978912499034777,0.024498209008015692,0.10868158302037045,0.02373262500623241,0.09831087494967505,0.024132042017299682,0.09944100002758205,0.01820541697088629,0.10604566702386364,0.022590375039726496,0.10654266702476889,0.018256540992297232,0.08886925003025681,0.021527624980080873,0.10009762499248609,0.02096049999818206,0.1016846249694936,0.018795792013406754,0.08490025001810864,0.017873667005915195,0.0970781670184806,0.019803207949735224,0.0958981669973582,0.021679249999579042,0.10187750001205131,0.02368304197443649,0.09816074999980628,0.02053104096557945,0.09019804198760539,0.02293487498536706,0.10006620798958465,0.018435459001921117,0.10077533300500363,0.02566704200580716,0.09232158301165327,0.02383370796451345,0.09026979096233845],"numpy":"2.5.3","open_seconds":1.4127261670073494,"physical_robot_ready":false,"physics_dt_seconds":0.001,"profile_enabled":false,"profiles":{"control":[],"finish":[],"open":[]},"python":"3.12.9","recorded_intervals":100,"resolution":[320,240],"schema":"dvidia.operator-profile/v1","scope":"Single-process local scripted capture including encoder-only IK; excludes sockets, Godot, real-time pacing, model fitting and hardware. cProfile cumulative scopes overlap.","source_kind":"simulation_scripted_input","source_sha256":{"camera_action_capture.py":"399f512a08087c72bfa37e382157a2250f413e423974b77b1bd3c0a911ff0a1e","operator_capture.py":"f1b5b5c5abbdf090342bb18df76e95f1fd518bd05fc5705aedb956f0ce081715","piper_action_capture.py":"da037b2198cf7d2f3a9aa40fc19a4c0f5cc375a22c5dd75606e2c1856f6efc7f","piper_encoder_kinematics.py":"6606bb8aad04e5abb1e9b6d1a8ec628a4114acd167862167184fd4eef1d21c34","piper_rgbd_tracker.py":"43202cfcea404061a3a65124d6ad24aeeec5fae8ffaf863caa245f2f54c46c36","profile-operator-capture.py":"daf3aec5ad1ace998c0368df5658064b7300217657da81ff1fa4b318dab299f1"},"strict_success":false,"system":"macOS-26.5.2-arm64-arm-64bit","teacher_queries":0,"total_seconds":10.213273708010092} diff --git a/benchmarks/godot-capture-performance-v01/pair-02-candidate.json b/benchmarks/godot-capture-performance-v01/pair-02-candidate.json new file mode 100644 index 0000000..88b1771 --- /dev/null +++ b/benchmarks/godot-capture-performance-v01/pair-02-candidate.json @@ -0,0 +1 @@ +{"camera_control":{"count":50,"max_ms":118.30500001087785,"p50_ms":95.24739600601606,"p95_ms":105.59295624552759,"total_seconds":4.781067333940882},"camera_dt_seconds":0.04,"camera_pairs":51,"capture_bytes":19971377,"capture_integrity_sha256":"d7917c8d222db9168dc0462e981296e394479fcb685e812aa743073dcdbc5bc7","case":{"goal_position_m":[0.35,0.08,0.08],"group_id":"operator-start-001","id":"operator-block-001","object_position_m":[0.3,-0.03,0.082],"seed":0},"complete":true,"control":{"count":100,"max_ms":118.30500001087785,"p50_ms":57.549666526028886,"p95_ms":102.69905838649719,"total_seconds":5.920493129058741},"control_dt_seconds":0.02,"duration_s":2.0,"encoder_control":{"count":50,"max_ms":30.587125045713037,"p50_ms":22.403770999517292,"p95_ms":29.26038112491369,"total_seconds":1.1394257951178588},"finish_seconds":1.182560959015973,"ik":{"count":100,"max_ms":1.8444170127622783,"p50_ms":0.5392704915720969,"p95_ms":0.9698121983092275,"total_seconds":0.06163679069140926},"interval_seconds":[0.017664625018369406,0.11830500001087785,0.022035125002730638,0.10369524999987334,0.022841582947876304,0.09160108299693093,0.028875083022285253,0.09848191699711606,0.029575625027064234,0.09996366698760539,0.023093166993930936,0.09802058298373595,0.030301499995402992,0.09353687503607944,0.022982082969974726,0.09815545799210668,0.024254666990600526,0.09573862497927621,0.025905542017426342,0.10350054199807346,0.021777541958726943,0.09739033301593736,0.022914749977644533,0.09761795803206041,0.021864833019208163,0.10025470796972513,0.02179583301767707,0.09763458301313221,0.021783709002193063,0.09856712503824383,0.02210175001528114,0.09092033299384639,0.025232042011339217,0.10087291698437184,0.02061616600258276,0.09512383298715577,0.027754542010370642,0.09401800000341609,0.020422208996023983,0.09515591699164361,0.019868208037223667,0.09916012501344085,0.019793374987784773,0.09748037502868101,0.018732415977865458,0.09189824998611584,0.017943540995474905,0.09214495797641575,0.022272499976679683,0.0912901249830611,0.020735999976750463,0.09568420803407207,0.023989542038179934,0.09055991697823629,0.018208916997537017,0.09087595797609538,0.020323125005234033,0.10998254199512303,0.019619458995293826,0.08783620898611844,0.027142749982886016,0.09195070900022984,0.0225350420223549,0.10031341697322205,0.025906542025040835,0.08717679197434336,0.017608167021535337,0.09656054200604558,0.023330666997935623,0.0891528750071302,0.030587125045713037,0.107145624991972,0.023677874996792525,0.09880362497642636,0.023149084008764476,0.1026568750385195,0.020298458985053003,0.09375329199247062,0.02294004097348079,0.0944251250475645,0.01842562499223277,0.09368333400925621,0.022044125013053417,0.08582199999364093,0.019704582984559238,0.08876524999504909,0.018093374965246767,0.09301024995511398,0.02288308402057737,0.09082458302145824,0.025033125013578683,0.09533887502038851,0.025584959017578512,0.08723574999021366,0.027719750010874122,0.08717166597489268,0.01957858301466331,0.09729716699803248,0.027903375041205436,0.08451220800634474],"numpy":"2.5.3","open_seconds":1.3401260829996318,"physical_robot_ready":false,"physics_dt_seconds":0.001,"profile_enabled":false,"profiles":{"control":[],"finish":[],"open":[]},"python":"3.12.9","recorded_intervals":100,"resolution":[320,240],"schema":"dvidia.operator-profile/v1","scope":"Single-process local scripted capture including encoder-only IK; excludes sockets, Godot, real-time pacing, model fitting and hardware. cProfile cumulative scopes overlap.","source_kind":"simulation_scripted_input","source_sha256":{"camera_action_capture.py":"399f512a08087c72bfa37e382157a2250f413e423974b77b1bd3c0a911ff0a1e","operator_capture.py":"f1b5b5c5abbdf090342bb18df76e95f1fd518bd05fc5705aedb956f0ce081715","piper_action_capture.py":"da037b2198cf7d2f3a9aa40fc19a4c0f5cc375a22c5dd75606e2c1856f6efc7f","piper_encoder_kinematics.py":"6606bb8aad04e5abb1e9b6d1a8ec628a4114acd167862167184fd4eef1d21c34","piper_rgbd_tracker.py":"e89cba0414832fcfc09127eb05a326557d3aa32afd458a9a8f59d6c4f850f2d3","profile-operator-capture.py":"daf3aec5ad1ace998c0368df5658064b7300217657da81ff1fa4b318dab299f1"},"strict_success":false,"system":"macOS-26.5.2-arm64-arm-64bit","teacher_queries":0,"total_seconds":9.50326316599967} diff --git a/benchmarks/godot-capture-performance-v01/pair-03-candidate.json b/benchmarks/godot-capture-performance-v01/pair-03-candidate.json new file mode 100644 index 0000000..289ea8c --- /dev/null +++ b/benchmarks/godot-capture-performance-v01/pair-03-candidate.json @@ -0,0 +1 @@ +{"camera_control":{"count":50,"max_ms":120.88062497787178,"p50_ms":95.54483401007019,"p95_ms":114.74889986275228,"total_seconds":4.876566292834468},"camera_dt_seconds":0.04,"camera_pairs":51,"capture_bytes":19971381,"capture_integrity_sha256":"3700f05e44f36d6b563f5ef863c27ddffc971245cebd2a36fa5a172cc6a814ec","case":{"goal_position_m":[0.35,0.08,0.08],"group_id":"operator-start-001","id":"operator-block-001","object_position_m":[0.3,-0.03,0.082],"seed":0},"complete":true,"control":{"count":100,"max_ms":120.88062497787178,"p50_ms":84.51491699088365,"p95_ms":109.34387528977823,"total_seconds":6.092544455896132},"control_dt_seconds":0.02,"duration_s":2.0,"encoder_control":{"count":50,"max_ms":109.57345803035423,"p50_ms":22.263478982495144,"p95_ms":29.303859014180485,"total_seconds":1.2159781630616635},"finish_seconds":1.1655037919990718,"ik":{"count":100,"max_ms":53.39833302423358,"p50_ms":0.5138954729773104,"p95_ms":1.1426687415223566,"total_seconds":0.11236749566160142},"interval_seconds":[0.01964958303142339,0.12088062497787178,0.018579250026959926,0.10464933299226686,0.0244490840123035,0.09583316696807742,0.02028374996734783,0.09646170801715925,0.018739250022917986,0.10021474998211488,0.026199541985988617,0.10387333302060142,0.025579624983947724,0.09927812503883615,0.10957345803035423,0.10231162497075275,0.019965042010881007,0.10309662495274097,0.01962845795787871,0.09381141699850559,0.021717875031754375,0.10398666601395234,0.023633457953110337,0.09295929101062939,0.022045625024475157,0.09261695801978931,0.021125792001839727,0.09658712497912347,0.02445504197385162,0.11741483298828825,0.019944457977544516,0.09860179200768471,0.022649833001196384,0.08437179197790101,0.0171632919809781,0.0929563749814406,0.01900137501070276,0.08649762498680502,0.02122233301633969,0.09451454196823761,0.023919083003420383,0.09025412501068786,0.02075745799811557,0.0917531669838354,0.023820625036023557,0.09955345798516646,0.022157999977935106,0.0914026249665767,0.020981417037546635,0.10136737499851733,0.023568957985844463,0.09030866698594764,0.018405959010124207,0.09552895900560543,0.022894958034157753,0.09347833396168426,0.021137500007171184,0.09092920797411352,0.01961483299965039,0.08694187505170703,0.022065083030611277,0.09342720900895074,0.018708290997892618,0.09252825001021847,0.028793459001462907,0.08465804200386629,0.02295675000641495,0.08957433298928663,0.019762499956414104,0.08980150002753362,0.023705040977802128,0.0950912080006674,0.019846417009830475,0.09556070901453495,0.03487454098649323,0.10236399999121204,0.0226331670419313,0.09526091598672792,0.02623191598104313,0.09529866703087464,0.02307520800968632,0.1126590829808265,0.024516999954357743,0.10546225000871345,0.022437999956309795,0.10161150002386421,0.02832637500250712,0.10234774998389184,0.024934165994636714,0.09250695898663253,0.02055608300724998,0.08818262501154095,0.022368957987055182,0.09950937499525025,0.02619825000874698,0.10249587497673929,0.02140058303484693,0.10933179198764265,0.029721459024585783,0.1164587500388734],"numpy":"2.5.3","open_seconds":1.5030157919973135,"physical_robot_ready":false,"physics_dt_seconds":0.001,"profile_enabled":false,"profiles":{"control":[],"finish":[],"open":[]},"python":"3.12.9","recorded_intervals":100,"resolution":[320,240],"schema":"dvidia.operator-profile/v1","scope":"Single-process local scripted capture including encoder-only IK; excludes sockets, Godot, real-time pacing, model fitting and hardware. cProfile cumulative scopes overlap.","source_kind":"simulation_scripted_input","source_sha256":{"camera_action_capture.py":"399f512a08087c72bfa37e382157a2250f413e423974b77b1bd3c0a911ff0a1e","operator_capture.py":"f1b5b5c5abbdf090342bb18df76e95f1fd518bd05fc5705aedb956f0ce081715","piper_action_capture.py":"da037b2198cf7d2f3a9aa40fc19a4c0f5cc375a22c5dd75606e2c1856f6efc7f","piper_encoder_kinematics.py":"6606bb8aad04e5abb1e9b6d1a8ec628a4114acd167862167184fd4eef1d21c34","piper_rgbd_tracker.py":"e89cba0414832fcfc09127eb05a326557d3aa32afd458a9a8f59d6c4f850f2d3","profile-operator-capture.py":"daf3aec5ad1ace998c0368df5658064b7300217657da81ff1fa4b318dab299f1"},"strict_success":false,"system":"macOS-26.5.2-arm64-arm-64bit","teacher_queries":0,"total_seconds":9.889464041974861} diff --git a/benchmarks/godot-capture-performance-v01/pair-04-baseline.json b/benchmarks/godot-capture-performance-v01/pair-04-baseline.json new file mode 100644 index 0000000..3574c0c --- /dev/null +++ b/benchmarks/godot-capture-performance-v01/pair-04-baseline.json @@ -0,0 +1 @@ +{"camera_control":{"count":50,"max_ms":116.97475000983104,"p50_ms":96.69656297774054,"p95_ms":112.94337224098852,"total_seconds":4.908727958041709},"camera_dt_seconds":0.04,"camera_pairs":51,"capture_bytes":19971368,"capture_integrity_sha256":"046fc37a629c39f8e75eab6b0a5b147945c54289638937211cae7089e12b538c","case":{"goal_position_m":[0.35,0.08,0.08],"group_id":"operator-start-001","id":"operator-block-001","object_position_m":[0.3,-0.03,0.082],"seed":0},"complete":true,"control":{"count":100,"max_ms":116.97475000983104,"p50_ms":59.420604491606355,"p95_ms":106.13811840012204,"total_seconds":6.011802374036051},"control_dt_seconds":0.02,"duration_s":2.0,"encoder_control":{"count":50,"max_ms":30.752499995287508,"p50_ms":22.004208498401567,"p95_ms":26.279687514761463,"total_seconds":1.1030744159943424},"finish_seconds":1.1694244589889422,"ik":{"count":100,"max_ms":2.520499983802438,"p50_ms":0.504187511978671,"p95_ms":0.9348621941171585,"total_seconds":0.05878341698553413},"interval_seconds":[0.019029000017326325,0.1167427499894984,0.019413875008467585,0.1044465420418419,0.021380165999289602,0.09155200002714992,0.018118666019290686,0.0993624169495888,0.020133708021603525,0.09266162500716746,0.01771591603755951,0.09357550001004711,0.024282875005155802,0.09082291700178757,0.023744207981508225,0.09236175002297387,0.019171625026501715,0.09477458300534636,0.02284200000576675,0.09048212500056252,0.023803541960660368,0.09013037499971688,0.025895375001709908,0.10549324995372444,0.017958917014766484,0.09624991699820384,0.022953624953515828,0.0905203340225853,0.018680832989048213,0.11697475000983104,0.02861308300634846,0.11547704099211842,0.030752499995287508,0.10666129097808152,0.02189712499966845,0.0880887089879252,0.01990845799446106,0.09217220899881795,0.01971391699044034,0.09743104199878871,0.021581666951533407,0.104068125016056,0.0183207499794662,0.10473091702442616,0.020757458987645805,0.104752000013832,0.02408945804927498,0.09376637497916818,0.024352792010176927,0.10362562496447936,0.022871749999467283,0.09863883402431384,0.026594125025440007,0.09752750000916421,0.02418241702252999,0.10575270897243172,0.022509208996780217,0.10984666598960757,0.02369470795383677,0.09787695802515373,0.022111291997134686,0.10290362499654293,0.019924999971408397,0.10396258300170302,0.0238195420242846,0.10506095801247284,0.02213670901255682,0.08978945796843618,0.025225499994121492,0.09227554203243926,0.02337458304828033,0.09263541601831093,0.02423050004290417,0.0896388340042904,0.019884750014171004,0.10123112495057285,0.019923583953641355,0.0957856250461191,0.020545208011753857,0.09327216603560373,0.019216916989535093,0.09714320895727724,0.02044120797654614,0.08976554096443579,0.021173875022213906,0.09118883300106972,0.02287749998504296,0.09591912501491606,0.02227162499912083,0.09131041599903256,0.024629458028357476,0.09289329103194177,0.020842999976594,0.10611058300128207,0.02164058299968019,0.09980095899663866,0.020894791989121586,0.09813800000119954,0.022945040953345597,0.09333583299303427],"numpy":"2.5.3","open_seconds":1.269197624991648,"physical_robot_ready":false,"physics_dt_seconds":0.001,"profile_enabled":false,"profiles":{"control":[],"finish":[],"open":[]},"python":"3.12.9","recorded_intervals":100,"resolution":[320,240],"schema":"dvidia.operator-profile/v1","scope":"Single-process local scripted capture including encoder-only IK; excludes sockets, Godot, real-time pacing, model fitting and hardware. cProfile cumulative scopes overlap.","source_kind":"simulation_scripted_input","source_sha256":{"camera_action_capture.py":"399f512a08087c72bfa37e382157a2250f413e423974b77b1bd3c0a911ff0a1e","operator_capture.py":"f1b5b5c5abbdf090342bb18df76e95f1fd518bd05fc5705aedb956f0ce081715","piper_action_capture.py":"da037b2198cf7d2f3a9aa40fc19a4c0f5cc375a22c5dd75606e2c1856f6efc7f","piper_encoder_kinematics.py":"6606bb8aad04e5abb1e9b6d1a8ec628a4114acd167862167184fd4eef1d21c34","piper_rgbd_tracker.py":"43202cfcea404061a3a65124d6ad24aeeec5fae8ffaf863caa245f2f54c46c36","profile-operator-capture.py":"daf3aec5ad1ace998c0368df5658064b7300217657da81ff1fa4b318dab299f1"},"strict_success":false,"system":"macOS-26.5.2-arm64-arm-64bit","teacher_queries":0,"total_seconds":9.56728691700846} diff --git a/benchmarks/godot-capture-performance-v01/pair-05-baseline.json b/benchmarks/godot-capture-performance-v01/pair-05-baseline.json new file mode 100644 index 0000000..446f7af --- /dev/null +++ b/benchmarks/godot-capture-performance-v01/pair-05-baseline.json @@ -0,0 +1 @@ +{"camera_control":{"count":50,"max_ms":173.3429579762742,"p50_ms":97.11220799363218,"p95_ms":108.55167904519476,"total_seconds":4.975161248003133},"camera_dt_seconds":0.04,"camera_pairs":51,"capture_bytes":19971337,"capture_integrity_sha256":"4f8bfcb8a23f9b5bf3d0072c54a33f376d153d08d09736fd81844e0693dcea6a","case":{"goal_position_m":[0.35,0.08,0.08],"group_id":"operator-start-001","id":"operator-block-001","object_position_m":[0.3,-0.03,0.082],"seed":0},"complete":true,"control":{"count":100,"max_ms":173.3429579762742,"p50_ms":66.27460400341079,"p95_ms":105.77913296001498,"total_seconds":6.158611374907196},"control_dt_seconds":0.02,"duration_s":2.0,"encoder_control":{"count":50,"max_ms":44.80199998943135,"p50_ms":22.901354503119364,"p95_ms":30.820649978704747,"total_seconds":1.183450126904063},"finish_seconds":1.2297385829733685,"ik":{"count":100,"max_ms":1.123833004385233,"p50_ms":0.5039164971094579,"p95_ms":0.8542166935512794,"total_seconds":0.054511415131855756},"interval_seconds":[0.022933292028028518,0.13853408297291026,0.023420499986968935,0.10557474999222904,0.017460792034398764,0.10885441699065268,0.02307075000135228,0.0943400000105612,0.024335165973752737,0.10223483300069347,0.027337250008713454,0.10300270898733288,0.021700291021261364,0.10389912500977516,0.02408704097615555,0.0953942920314148,0.023526707955170423,0.10028799995779991,0.02286941697821021,0.09704408299876377,0.03138224995927885,0.10818166600074619,0.022585041995625943,0.0986478750128299,0.02054845803650096,0.10308441601227969,0.02079537499230355,0.08802675001788884,0.02851487504085526,0.09918645903235301,0.019479290989693254,0.09420649998355657,0.02382816601311788,0.10258924996014684,0.019377124961465597,0.09423399996012449,0.02505408297292888,0.10577608295716345,0.023030999989714473,0.09190854197368026,0.026370667037554085,0.10075974999926984,0.023170124972239137,0.10223275003954768,0.028250083967577666,0.10034795803949237,0.02119833300821483,0.09399491699878126,0.023987332999240607,0.09430529194651172,0.02590000000782311,0.09151016600662842,0.022493000025860965,0.09647204104112461,0.023900208994746208,0.1733429579762742,0.04480199998943135,0.09810195799218491,0.02309783303644508,0.09139162499923259,0.026726916956249624,0.09472858399385586,0.01958654198097065,0.09449762501753867,0.04067591700004414,0.09326241700910032,0.022591458982788026,0.08774720801739022,0.01961949997348711,0.10391354199964553,0.01991633395664394,0.10583708301419392,0.01865304197417572,0.09596033301204443,0.021407874999567866,0.08968874998390675,0.030134250002447516,0.09246420802082866,0.02396970900008455,0.09177429199917242,0.02243437501601875,0.08906095800921321,0.019968500011600554,0.09060941700590774,0.020080000045709312,0.09866600000532344,0.02219858398893848,0.09520541701931506,0.018919166992418468,0.09867224999470636,0.018991207994986326,0.09908883302705362,0.02250716695562005,0.0934468749910593,0.025509958039037883,0.0879907920025289,0.02104004204738885,0.0971803329885006,0.020013125031255186,0.09789908298989758],"numpy":"2.5.3","open_seconds":1.3405161669943482,"physical_robot_ready":false,"physics_dt_seconds":0.001,"profile_enabled":false,"profiles":{"control":[],"finish":[],"open":[]},"python":"3.12.9","recorded_intervals":100,"resolution":[320,240],"schema":"dvidia.operator-profile/v1","scope":"Single-process local scripted capture including encoder-only IK; excludes sockets, Godot, real-time pacing, model fitting and hardware. cProfile cumulative scopes overlap.","source_kind":"simulation_scripted_input","source_sha256":{"camera_action_capture.py":"399f512a08087c72bfa37e382157a2250f413e423974b77b1bd3c0a911ff0a1e","operator_capture.py":"f1b5b5c5abbdf090342bb18df76e95f1fd518bd05fc5705aedb956f0ce081715","piper_action_capture.py":"da037b2198cf7d2f3a9aa40fc19a4c0f5cc375a22c5dd75606e2c1856f6efc7f","piper_encoder_kinematics.py":"6606bb8aad04e5abb1e9b6d1a8ec628a4114acd167862167184fd4eef1d21c34","piper_rgbd_tracker.py":"43202cfcea404061a3a65124d6ad24aeeec5fae8ffaf863caa245f2f54c46c36","profile-operator-capture.py":"daf3aec5ad1ace998c0368df5658064b7300217657da81ff1fa4b318dab299f1"},"strict_success":false,"system":"macOS-26.5.2-arm64-arm-64bit","teacher_queries":0,"total_seconds":9.82778920797864} diff --git a/benchmarks/godot-capture-performance-v01/pair-06-candidate.json b/benchmarks/godot-capture-performance-v01/pair-06-candidate.json new file mode 100644 index 0000000..9cf32d6 --- /dev/null +++ b/benchmarks/godot-capture-performance-v01/pair-06-candidate.json @@ -0,0 +1 @@ +{"camera_control":{"count":50,"max_ms":107.23795800004154,"p50_ms":91.77781248581596,"p95_ms":98.5173141118139,"total_seconds":4.6003972899052314},"camera_dt_seconds":0.04,"camera_pairs":51,"capture_bytes":19971373,"capture_integrity_sha256":"2c827c838af3ec8fff72e33e5b755a874b4a522aca600f473723f7f1bbc22d9c","case":{"goal_position_m":[0.35,0.08,0.08],"group_id":"operator-start-001","id":"operator-block-001","object_position_m":[0.3,-0.03,0.082],"seed":0},"complete":true,"control":{"count":100,"max_ms":107.23795800004154,"p50_ms":53.20818748441525,"p95_ms":96.77430801966693,"total_seconds":5.668329038715456},"control_dt_seconds":0.02,"duration_s":2.0,"encoder_control":{"count":50,"max_ms":28.462457994464785,"p50_ms":20.965625008102506,"p95_ms":26.14370394439902,"total_seconds":1.0679317488102242},"finish_seconds":1.1518158330000006,"ik":{"count":100,"max_ms":1.6840409953147173,"p50_ms":0.46858348650857806,"p95_ms":0.7378812675597145,"total_seconds":0.050393416138831526},"interval_seconds":[0.022962457966059446,0.10723795800004154,0.01881049998337403,0.09956808300921693,0.020465209032408893,0.09108120802557096,0.019615292025264353,0.09300466603599489,0.021931583003606647,0.08746454201173037,0.023875208047684282,0.09415324998553842,0.021099666017107666,0.09723304101498798,0.02308366697980091,0.09640366700477898,0.022843124985229224,0.09718470799271017,0.019454166991636157,0.08904204098507762,0.022495416982565075,0.09333737497217953,0.018708125047851354,0.09369583299849182,0.021809166006278247,0.08988945797318593,0.022545791987795383,0.0928668340202421,0.019729291961994022,0.10212979197967798,0.020093207946047187,0.09356341703096405,0.02751795802032575,0.0915494579821825,0.023386499960906804,0.09324937500059605,0.018688749987632036,0.09016608301317319,0.019967166997957975,0.09125079098157585,0.021957042044959962,0.0895227090222761,0.01883237494621426,0.09091062500374392,0.02277929097181186,0.09675270802108571,0.028462457994464785,0.09177749999798834,0.025876541971229017,0.09177812497364357,0.019651541952043772,0.09152674995129928,0.023697290976997465,0.09207850001985207,0.019389667024370283,0.09166387497680262,0.02056870801607147,0.08652979199541733,0.01778258295962587,0.09311595797771588,0.018695457954891026,0.07795391697436571,0.020831583999097347,0.09133062500040978,0.026362291013356298,0.08956054196460173,0.023281582980416715,0.08976895903469995,0.01899237500037998,0.09309212496737018,0.01807716698385775,0.09025112498784438,0.020013541041407734,0.0951618340332061,0.021558625041507185,0.0925546670332551,0.018707667011767626,0.09563841600902379,0.017703666992019862,0.09073108294978738,0.022871333989314735,0.09365958301350474,0.019219042034819722,0.0818800000124611,0.023367125017102808,0.08897933398839086,0.019635666976682842,0.09186337498249486,0.023524707998149097,0.08717904199147597,0.021150999993551522,0.08777112502139062,0.02433633297914639,0.08928474999265745,0.021504457981791347,0.08696658298140392,0.019730625033844262,0.09382100001676008,0.020287749997805804,0.09322108299238607],"numpy":"2.5.3","open_seconds":1.3418772500008345,"physical_robot_ready":false,"physics_dt_seconds":0.001,"profile_enabled":false,"profiles":{"control":[],"finish":[],"open":[]},"python":"3.12.9","recorded_intervals":100,"resolution":[320,240],"schema":"dvidia.operator-profile/v1","scope":"Single-process local scripted capture including encoder-only IK; excludes sockets, Godot, real-time pacing, model fitting and hardware. cProfile cumulative scopes overlap.","source_kind":"simulation_scripted_input","source_sha256":{"camera_action_capture.py":"399f512a08087c72bfa37e382157a2250f413e423974b77b1bd3c0a911ff0a1e","operator_capture.py":"f1b5b5c5abbdf090342bb18df76e95f1fd518bd05fc5705aedb956f0ce081715","piper_action_capture.py":"da037b2198cf7d2f3a9aa40fc19a4c0f5cc375a22c5dd75606e2c1856f6efc7f","piper_encoder_kinematics.py":"6606bb8aad04e5abb1e9b6d1a8ec628a4114acd167862167184fd4eef1d21c34","piper_rgbd_tracker.py":"e89cba0414832fcfc09127eb05a326557d3aa32afd458a9a8f59d6c4f850f2d3","profile-operator-capture.py":"daf3aec5ad1ace998c0368df5658064b7300217657da81ff1fa4b318dab299f1"},"strict_success":false,"system":"macOS-26.5.2-arm64-arm-64bit","teacher_queries":0,"total_seconds":9.261974499968346} diff --git a/benchmarks/godot-capture-performance-v01/plan.json b/benchmarks/godot-capture-performance-v01/plan.json new file mode 100644 index 0000000..b51cf5a --- /dev/null +++ b/benchmarks/godot-capture-performance-v01/plan.json @@ -0,0 +1,57 @@ +{ + "schema": "dvidia.operator-performance-plan/v1", + "registered_at": "2026-11-11T08:54:46.203405+00:00", + "baseline_commit": "4ca9804c79e330221106217eac4faca582b4efa2", + "script_sha256": "daf3aec5ad1ace998c0368df5658064b7300217657da81ff1fa4b318dab299f1", + "one_worker": true, + "warmup": { + "count": 1, + "duration_seconds": 0.2, + "retain": true + }, + "diagnostic": [ + { + "id": "baseline-unprofiled", + "duration_seconds": 2, + "profile": false + }, + { + "id": "baseline-profiled", + "duration_seconds": 2, + "profile": true + } + ], + "confirmation": { + "order": [ + "baseline", + "candidate", + "candidate", + "baseline", + "baseline", + "candidate" + ], + "duration_seconds": 2, + "profile": false, + "candidate_selection": "One semantically equivalent optimization chosen after diagnostic attribution; freeze candidate source before confirmation. No timing-based retuning or dropped attempts." + }, + "windowed_check": { + "count": 2, + "duration_seconds": 2, + "order": [ + "baseline", + "candidate" + ], + "purpose": "End-to-end Godot integration only; not a statistically controlled latency guarantee." + }, + "maximum_attempts": 11, + "maximum_raw_budget_bytes": 943718400, + "reserve_bytes": 10737418240, + "free_bytes": 13163302912, + "acceptance": [ + "Every recording sealed and inspectable; all attempts retained", + "Exact native arrays, commands, task scoring, decoded RGB/depth, perception and exported feature/target parity", + "Existing interruption and causal input regressions pass", + "Report all paired control totals, open/finish separately and disk bytes; no sustained teleop or learned skill claim" + ], + "scope": "Single PiPER rigid block and small scripted arm path; no human data, fits, hardware or success claims." +} diff --git a/benchmarks/godot-capture-performance-v01/results.json b/benchmarks/godot-capture-performance-v01/results.json new file mode 100644 index 0000000..8ea3253 --- /dev/null +++ b/benchmarks/godot-capture-performance-v01/results.json @@ -0,0 +1,474 @@ +{ + "schema": "dvidia.operator-performance-results/v1", + "baseline_mean_control_seconds": 6.152378167646627, + "candidate_mean_control_seconds": 5.893788874556776, + "relative_mean_reduction_percent": 4.203078647695756, + "paired_results": [ + { + "pair": 1, + "baseline": "pair-01-baseline", + "candidate": "pair-02-candidate", + "baseline_seconds": 6.286720753996633, + "candidate_seconds": 5.920493129058741, + "percent_control_time_reduction": 5.825415813245267, + "parity": { + "control_intervals": 100, + "exact": true, + "exclusions": [ + "source implementation hashes and unique recording/session provenance IDs", + "perception diagnostics.processing_seconds and capture wall-time metadata" + ], + "features_shape": [ + 100, + 269 + ], + "integrity_sha256": [ + "8dc17e27637ca6eb0dea4810e341633380066d1c7e92bdd3baa140387dd6514f", + "d7917c8d222db9168dc0462e981296e394479fcb685e812aa743073dcdbc5bc7" + ], + "native_values_compared": 102000, + "perception_rows_compared": 101, + "physical_robot_ready": false, + "rgbd_artifacts_compared": 102, + "schema": "dvidia.operator-performance-parity/v1", + "scope": "Semantic and exact numeric parity, not task qualification.", + "strict_success": [ + false, + false + ], + "targets_shape": [ + 100, + 7 + ] + } + }, + { + "pair": 2, + "baseline": "pair-04-baseline", + "candidate": "pair-03-candidate", + "baseline_seconds": 6.011802374036051, + "candidate_seconds": 6.092544455896132, + "percent_control_time_reduction": -1.3430594826069406, + "parity": { + "control_intervals": 100, + "exact": true, + "exclusions": [ + "source implementation hashes and unique recording/session provenance IDs", + "perception diagnostics.processing_seconds and capture wall-time metadata" + ], + "features_shape": [ + 100, + 269 + ], + "integrity_sha256": [ + "046fc37a629c39f8e75eab6b0a5b147945c54289638937211cae7089e12b538c", + "3700f05e44f36d6b563f5ef863c27ddffc971245cebd2a36fa5a172cc6a814ec" + ], + "native_values_compared": 102000, + "perception_rows_compared": 101, + "physical_robot_ready": false, + "rgbd_artifacts_compared": 102, + "schema": "dvidia.operator-performance-parity/v1", + "scope": "Semantic and exact numeric parity, not task qualification.", + "strict_success": [ + false, + false + ], + "targets_shape": [ + 100, + 7 + ] + } + }, + { + "pair": 3, + "baseline": "pair-05-baseline", + "candidate": "pair-06-candidate", + "baseline_seconds": 6.158611374907196, + "candidate_seconds": 5.668329038715456, + "percent_control_time_reduction": 7.960923434613179, + "parity": { + "control_intervals": 100, + "exact": true, + "exclusions": [ + "source implementation hashes and unique recording/session provenance IDs", + "perception diagnostics.processing_seconds and capture wall-time metadata" + ], + "features_shape": [ + 100, + 269 + ], + "integrity_sha256": [ + "4f8bfcb8a23f9b5bf3d0072c54a33f376d153d08d09736fd81844e0693dcea6a", + "2c827c838af3ec8fff72e33e5b755a874b4a522aca600f473723f7f1bbc22d9c" + ], + "native_values_compared": 102000, + "perception_rows_compared": 101, + "physical_robot_ready": false, + "rgbd_artifacts_compared": 102, + "schema": "dvidia.operator-performance-parity/v1", + "scope": "Semantic and exact numeric parity, not task qualification.", + "strict_success": [ + false, + false + ], + "targets_shape": [ + 100, + 7 + ] + } + } + ], + "all_confirmations_retained": true, + "qualified_real_time": false, + "conclusion": "Modest average time reduction, mixed individual pairs; no statistically reliable speedup or real-time claim.", + "controls": { + "worker_processes": 1, + "OPENBLAS_NUM_THREADS": "1", + "OMP_NUM_THREADS": "1", + "fixed_seed": 0, + "duration_s": 2, + "scripted": true + }, + "diagnostic_scope": "Earlier diagnostics inherit thread environment and use a shared host; do not compare their absolute timings directly against controlled confirmation. cProfile diagnostic overhead was not isolated by repeated randomized trials.", + "warmup_scope": "Separate process: host/driver cache warmup only; each run constructs a new Python process, renderer and geometry cache.", + "windowed": { + "baseline": { + "receipt_sha256": "3ed9ee57c6ef4f38d9fdf4d42be536a0f6f882b9da2e3ead13f0bf6bb41a8a19", + "ok": true, + "errors": [], + "simulated_seconds": 1.99999999999989, + "interactive_wall_seconds": 10.700172, + "rpc_roundtrip_ms": { + "p50": 36.99, + "p95": 111.52, + "samples": 102 + }, + "server_compute_total_ms": 7324.68737487216, + "capture_integrity_sha256": "5e936da94b2d8ef68a7eff8bb3a6392a6291ec0cc13140758635b8dd332c1e9c", + "recording_status": "finished", + "source_kind": "simulation_scripted_input" + }, + "candidate": { + "receipt_sha256": "d0e1c66f7dc4f7c3b97a7af075c7aec76a3ac426955153112426ba8a56b7f29f", + "ok": true, + "errors": [], + "simulated_seconds": 1.99999999999989, + "interactive_wall_seconds": 10.469417, + "rpc_roundtrip_ms": { + "p50": 42.074, + "p95": 113.571, + "samples": 102 + }, + "server_compute_total_ms": 7027.199504897, + "capture_integrity_sha256": "9c5d72f42d69f5fa8c0e18a4abf81730ec10d4710844cba1692f942cd4b0fa19", + "recording_status": "finished", + "source_kind": "simulation_scripted_input" + } + }, + "windowed_parity": { + "control_intervals": 100, + "exact": true, + "exclusions": [ + "source implementation hashes and unique recording/session provenance IDs", + "perception diagnostics.processing_seconds and capture wall-time metadata" + ], + "features_shape": [ + 100, + 269 + ], + "integrity_sha256": [ + "5e936da94b2d8ef68a7eff8bb3a6392a6291ec0cc13140758635b8dd332c1e9c", + "9c5d72f42d69f5fa8c0e18a4abf81730ec10d4710844cba1692f942cd4b0fa19" + ], + "native_values_compared": 102000, + "perception_rows_compared": 101, + "physical_robot_ready": false, + "rgbd_artifacts_compared": 102, + "schema": "dvidia.operator-performance-parity/v1", + "scope": "Semantic and exact numeric parity, not task qualification.", + "strict_success": [ + false, + false + ], + "targets_shape": [ + 100, + 7 + ] + }, + "native_replay": { + "capture_integrity_sha256": "d7917c8d222db9168dc0462e981296e394479fcb685e812aa743073dcdbc5bc7", + "control_intervals": 100, + "exact_native_arrays": true, + "fields": { + "applied_jaw_target_m": { + "exact": true, + "max_abs_error": 0.0, + "shape": [ + 2000 + ] + }, + "arm_actuator_controls_rad": { + "exact": true, + "max_abs_error": 0.0, + "shape": [ + 2000, + 6 + ] + }, + "grasp_contact_counts": { + "exact": true, + "max_abs_error": 0.0, + "shape": [ + 2000, + 2 + ] + }, + "gripper_joint_position_m": { + "exact": true, + "max_abs_error": 0.0, + "shape": [ + 2000, + 2 + ] + }, + "joint_position_rad": { + "exact": true, + "max_abs_error": 0.0, + "shape": [ + 2000, + 6 + ] + }, + "native_tick": { + "exact": true, + "max_abs_error": 0.0, + "shape": [ + 2000 + ] + }, + "normal_rate_limited_jaw_target_m": { + "exact": true, + "max_abs_error": 0.0, + "shape": [ + 2000 + ] + }, + "object_angular_velocity_rad_s": { + "exact": true, + "max_abs_error": 0.0, + "shape": [ + 2000, + 3 + ] + }, + "object_linear_velocity_m_s": { + "exact": true, + "max_abs_error": 0.0, + "shape": [ + 2000, + 3 + ] + }, + "object_minus_tcp_local_m": { + "exact": true, + "max_abs_error": 0.0, + "shape": [ + 2000, + 3 + ] + }, + "object_position_m": { + "exact": true, + "max_abs_error": 0.0, + "shape": [ + 2000, + 3 + ] + }, + "object_quaternion_wxyz": { + "exact": true, + "max_abs_error": 0.0, + "shape": [ + 2000, + 4 + ] + }, + "pad_normal_forces_n": { + "exact": true, + "max_abs_error": 0.0, + "shape": [ + 2000, + 2 + ] + }, + "pulse_active": { + "exact": true, + "max_abs_error": 0.0, + "shape": [ + 2000 + ] + }, + "pulse_closing_tail": { + "exact": true, + "max_abs_error": 0.0, + "shape": [ + 2000 + ] + }, + "pulse_minimum_opening_m": { + "exact": true, + "max_abs_error": 0.0, + "shape": [ + 2000 + ] + }, + "requested_jaw_target_m": { + "exact": true, + "max_abs_error": 0.0, + "shape": [ + 2000 + ] + }, + "t_seconds": { + "exact": true, + "max_abs_error": 0.0, + "shape": [ + 2000 + ] + }, + "table_object_contact_count": { + "exact": true, + "max_abs_error": 0.0, + "shape": [ + 2000 + ] + }, + "tcp_position_m": { + "exact": true, + "max_abs_error": 0.0, + "shape": [ + 2000, + 3 + ] + }, + "tcp_quaternion_wxyz": { + "exact": true, + "max_abs_error": 0.0, + "shape": [ + 2000, + 4 + ] + }, + "unexpected_contact_count": { + "exact": true, + "max_abs_error": 0.0, + "shape": [ + 2000 + ] + } + }, + "independent_score_matches": true, + "maximum_abs_error": 0.0, + "native_values_compared": 102000, + "original_strict_success": false, + "physical_robot_ready": false, + "recording_sha256": "874af378557d4b782d117dd8237cb3d2a05a07d8b93ab0e0b149133f2fc65558", + "schema": "dvidia.operator-native-replay/v1", + "scope": "CPU native command replay including reset; excludes camera, Godot, fitting and hardware. Native parity is separate from successful task completion.", + "score": { + "evidence_scope": "Recomputed simulator-authored numeric evidence; no physics rerun, source attestation or hardware sensing.", + "false_alarms": { + "reason": "Continuous residual policy has no declared discrete alarm events.", + "status": "not_applicable" + }, + "grip_events": [], + "grip_summary": { + "airborne_events": 0, + "loss_events": 0, + "qualification_latency_s": [], + "restored_events": 0, + "supported_events": 0, + "unresolved_events": 0 + }, + "native_diagnostics": { + "premature_open_jaw": { + "count": 0, + "intervals": [], + "maximum_s": 0.0, + "total_s": 0.0 + }, + "support_touchdown_before_destination": { + "count": 0, + "intervals": [], + "maximum_s": 0.0, + "total_s": 0.0 + } + }, + "native_metrics_mismatches": [], + "native_recomputed": { + "carry_complete": false, + "carry_contact_loss_events": 0, + "dwell_seconds": 0.0, + "first_success_time_seconds": null, + "grasp_seen": false, + "lift_dwell_seconds": 0.0, + "lift_seen": false, + "max_carry_contact_loss_seconds": 0.0, + "max_object_lift_m": 6.22998874710845e-11, + "max_pad_normal_force_n": 0.0, + "retention_lost": false, + "success": false, + "unexpected_contact_native_ticks": 0 + }, + "reason": "native_outcome_failed", + "restoration_scope": "Loaded contact restored for 100 ms after sustained loss; does not establish task recovery or airborne regrasp.", + "schema": "dvidia.piper-feedback-score/v1", + "strict_v01": { + "native_metrics_source": "simulator-authored episode record; not authenticated sensor input", + "native_outcome_success": false, + "native_outcome_valid": true, + "reason": "native_outcome_failed", + "reference_xy_m": [ + 0.35, + 0.08 + ], + "required_dwell_s": 0.25, + "required_lift_dwell_s": 0.1, + "sample_interval_s": 0.02, + "success": false, + "terminal_dwell_s": 0.0, + "terminal_reference_success": false, + "terminal_xy_error_m": 0.12083027976089415, + "trace_lift_dwell_s": 0.0, + "trajectory_complete": true + }, + "success": false, + "terminal_only": { + "dwell_s": 0.0, + "scope": "Terminal-only geometry/release/settling/dwell; excludes lift, carry and retention history.", + "success": false, + "terminal_xy_error_m": 0.12083027976089415 + }, + "valid": true + }, + "simulated_seconds": 1.9999999999998905, + "source_kind": "simulation_scripted_input", + "teacher_queries": 0, + "wall_seconds": 0.8614500829717144 + }, + "retained_raw_bytes": 210294152, + "capture_attempts": 11, + "remaining_free_bytes": 12329766912, + "host": { + "processor": "Apple M5", + "logical_processors": 10, + "platform": "macOS-26.5.2-arm64-arm-64bit-Mach-O", + "python": "3.12.9", + "numpy": "2.5.3", + "mujoco": "3.15.0", + "godot": "4.7.2" + }, + "physical_robot_ready": false, + "learned_policy_trained": false +} diff --git a/benchmarks/godot-capture-performance-v01/tests.json b/benchmarks/godot-capture-performance-v01/tests.json new file mode 100644 index 0000000..5b3bb03 --- /dev/null +++ b/benchmarks/godot-capture-performance-v01/tests.json @@ -0,0 +1,25 @@ +{ + "schema": "dvidia.capture-performance-tests/v1", + "test_modules": [ + "tests.test_tracker_ray_cache", + "tests.test_piper_rgbd_tracker", + "tests.test_operator_capture", + "tests.test_operator_export", + "tests.test_godot_demonstration_bridge", + "tests.test_camera_action_capture", + "tests.test_camera_action_export", + "tests.test_godot_bridge", + "tests.test_action_demonstration" + ], + "test_executions": 114, + "passed": true, + "failures": 0, + "errors": 0, + "output": "..................................................................................................................\n----------------------------------------------------------------------\nRan 114 tests in 6.957s\n\nOK\n", + "source_sha256": { + "src/dvidia_training/piper_rgbd_tracker.py": "e89cba0414832fcfc09127eb05a326557d3aa32afd458a9a8f59d6c4f850f2d3", + "tests/test_tracker_ray_cache.py": "def2baa4b73a93095f5005574aed3f7f969184e3ca17e4b1c320bdc3084ca15f", + "scripts/profile-operator-capture.py": "daf3aec5ad1ace998c0368df5658064b7300217657da81ff1fa4b318dab299f1", + "scripts/compare-operator-captures.py": "c6a45b36a84d66d71a830d9c620ef814bd060f34a0a261d54167de5c417c24c0" + } +} diff --git a/benchmarks/godot-capture-performance-v01/warmup.json b/benchmarks/godot-capture-performance-v01/warmup.json new file mode 100644 index 0000000..64ec617 --- /dev/null +++ b/benchmarks/godot-capture-performance-v01/warmup.json @@ -0,0 +1 @@ +{"camera_control":{"count":5,"max_ms":40.66412500105798,"p50_ms":27.871333004441112,"p95_ms":38.579908409155905,"total_seconds":0.14830370800336823},"camera_dt_seconds":0.04,"camera_pairs":6,"capture_bytes":2342173,"capture_integrity_sha256":"3ebae6a15ac3393d8f832c9dd583cef3df97f666b2b744a0d72d5f593847f30a","case":{"goal_position_m":[0.35,0.08,0.08],"group_id":"operator-start-001","id":"operator-block-001","object_position_m":[0.3,-0.03,0.082],"seed":0},"complete":true,"control":{"count":10,"max_ms":40.66412500105798,"p50_ms":13.85156248579733,"p95_ms":35.974637669278295,"total_seconds":0.17298270802712068},"control_dt_seconds":0.02,"duration_s":0.2,"encoder_control":{"count":5,"max_ms":5.610249994788319,"p50_ms":4.581542045343667,"p95_ms":5.604933388531208,"total_seconds":0.02467900002375245},"finish_seconds":0.0451148750144057,"ik":{"count":10,"max_ms":0.1420410117134452,"p50_ms":0.12643751688301563,"p95_ms":0.1406162977218628,"total_seconds":0.0011868751025758684},"interval_seconds":[0.005583666963502765,0.04066412500105798,0.005610249994788319,0.030243042041547596,0.004355583048891276,0.027432332979515195,0.004547957971226424,0.027871333004441112,0.004581542045343667,0.022092874976806343],"numpy":"2.5.3","open_seconds":0.5122409589821473,"physical_robot_ready":false,"physics_dt_seconds":0.001,"profile_enabled":false,"profiles":{"control":[],"finish":[],"open":[]},"python":"3.12.9","recorded_intervals":10,"resolution":[320,240],"schema":"dvidia.operator-profile/v1","scope":"Single-process local scripted capture including encoder-only IK; excludes sockets, Godot, real-time pacing, model fitting and hardware. cProfile cumulative scopes overlap.","source_kind":"simulation_scripted_input","source_sha256":{"camera_action_capture.py":"399f512a08087c72bfa37e382157a2250f413e423974b77b1bd3c0a911ff0a1e","operator_capture.py":"f1b5b5c5abbdf090342bb18df76e95f1fd518bd05fc5705aedb956f0ce081715","piper_action_capture.py":"da037b2198cf7d2f3a9aa40fc19a4c0f5cc375a22c5dd75606e2c1856f6efc7f","piper_encoder_kinematics.py":"6606bb8aad04e5abb1e9b6d1a8ec628a4114acd167862167184fd4eef1d21c34","piper_rgbd_tracker.py":"43202cfcea404061a3a65124d6ad24aeeec5fae8ffaf863caa245f2f54c46c36","profile-operator-capture.py":"daf3aec5ad1ace998c0368df5658064b7300217657da81ff1fa4b318dab299f1"},"strict_success":false,"system":"macOS-26.5.2-arm64-arm-64bit","teacher_queries":0,"total_seconds":1.2197456249850802} diff --git a/scripts/compare-operator-captures.py b/scripts/compare-operator-captures.py new file mode 100644 index 0000000..c75ca6e --- /dev/null +++ b/scripts/compare-operator-captures.py @@ -0,0 +1,105 @@ +#!/usr/bin/env python3 +"""Verify a recorder optimization preserved observations, actions and outcomes.""" +import argparse +from copy import deepcopy +from hashlib import sha256 +import json +from pathlib import Path + +import numpy as np + +from dvidia_training import operator_capture as capture, operator_export as export +from dvidia_training import piper_action_capture as files + + +def compare(left, right): + left, right = Path(left), Path(right) + reports = [capture.inspect_capture(p) for p in (left, right)] + capture_reports = [json.loads((p/'capture.json').read_text()) for p in (left,right)] + recordings = [capture.load_capture(p) for p in (left, right)] + a, b = recordings + for key in ('initial', 'initial_applied_targets', 'profile', 'calibration', 'limits', 'clock', 'goal_position_m'): + if a[key] != b[key]: + raise ValueError('Initial observation/calibration contract differs: '+key) + for key in ('profile_lock_sha256', 'profile_record_sha256', 'model_sha256', + 'scene_sha256', 'limits_sha256', 'calibration_sha256', 'reference_policy_sha256', + 'configuration_sha256'): + if a['binding'][key] != b['binding'][key]: + raise ValueError('Stable recording binding differs: '+key) + for key in ('kind', 'source_group', 'case_id'): + if a['provenance'][key] != b['provenance'][key]: + raise ValueError('Source provenance differs: '+key) + for key in ('status', 'reason', 'source_kind', 'case', 'requested_intervals', + 'started_intervals', 'recorded_complete_intervals', + 'uncommitted_native_intervals', 'strict_success', 'teacher_queries', + 'native_evidence_saved', 'error', 'sealed', 'camera_pairs', 'frame_bytes'): + if capture_reports[0][key] != capture_reports[1][key]: + raise ValueError('Capture lifecycle/outcome differs: '+key) + if len(a['steps']) != len(b['steps']): + raise ValueError('Control interval counts differ.') + for x, y in zip(a['steps'], b['steps']): + for key in ('index', 'before', 'command', 'applied', 'after', 'input_event', 'teacher_query'): + if x[key] != y[key]: + raise ValueError('Control observation/action differs: '+key) + rgbd_files = 0 + for path in sorted((left/'frames').iterdir()): + peer = right/'frames'/path.name + if path.read_bytes() != peer.read_bytes(): + raise ValueError('Lossless RGB/depth bytes differ: '+path.name) + rgbd_files += 1 + if rgbd_files != len(list((right/'frames').iterdir())): + raise ValueError('Frame inventory differs.') + perception_rows = 0 + for path in sorted((left/'perception').iterdir()): + x = json.loads(path.read_text()); y = json.loads((right/'perception'/path.name).read_text()) + for key in ('index', 'snapshot_sha256', 'frame', 'calibration_sha256', 'input_calibration_sha256'): + if x[key] != y[key]: + raise ValueError('Perception binding differs: '+key) + estimates = [deepcopy(z['estimate']) for z in (x,y)] + for estimate in estimates: + # The sole numeric exclusion is diagnostic wall-clock computation. + estimate['diagnostics'].pop('processing_seconds', None) + if estimates[0] != estimates[1]: + raise ValueError('Current-frame perception or missingness differs: '+path.name) + perception_rows += 1 + if perception_rows != len(list((right/'perception').iterdir())): + raise ValueError('Perception inventory differs.') + native_values = 0 + with np.load(left/'native.npz',allow_pickle=False) as x, np.load(right/'native.npz',allow_pickle=False) as y: + if set(x.files) != set(y.files): + raise ValueError('Native array inventory differs.') + for key in x.files: + if x[key].dtype != y[key].dtype or not np.array_equal(x[key], y[key]): + raise ValueError('Native values differ: '+key) + native_values += x[key].size + scores = [r['score'] for r in capture_reports] + if scores[0] != scores[1]: + raise ValueError('Independently reconstructed native task scores differ.') + datasets = [export.export_episode(p, reviewed_indices=list(range(len(a['steps']))), + review_reason='Scripted performance parity only; not reviewed useful training demonstrations.') for p in (left,right)] + for key in ('features','targets'): + if (datasets[0][key].dtype != datasets[1][key].dtype + or not np.array_equal(datasets[0][key],datasets[1][key])): + raise ValueError('Learning export differs: '+key) + if datasets[0]['groups'] != datasets[1]['groups']: + raise ValueError('Learning split groups differ.') + return dict(schema='dvidia.operator-performance-parity/v1',exact=True, + native_values_compared=int(native_values),rgbd_artifacts_compared=rgbd_files, + perception_rows_compared=perception_rows,control_intervals=len(a['steps']), + features_shape=list(datasets[0]['features'].shape),targets_shape=list(datasets[0]['targets'].shape), + strict_success=[r['strict_success'] for r in reports], + integrity_sha256=[sha256((p/'integrity.json').read_bytes()).hexdigest() for p in (left,right)], + exclusions=['source implementation hashes and unique recording/session provenance IDs', + 'perception diagnostics.processing_seconds and capture wall-time metadata'], + physical_robot_ready=False,scope='Semantic and exact numeric parity, not task qualification.') + + +if __name__=='__main__': + parser=argparse.ArgumentParser(description=__doc__) + parser.add_argument('--baseline',required=True,type=Path) + parser.add_argument('--candidate',required=True,type=Path) + parser.add_argument('--output',required=True,type=Path) + args=parser.parse_args() + result=compare(args.baseline,args.candidate) + files._json(args.output,result) + print(json.dumps(result,indent=2)) diff --git a/scripts/profile-operator-capture.py b/scripts/profile-operator-capture.py new file mode 100644 index 0000000..371874b --- /dev/null +++ b/scripts/profile-operator-capture.py @@ -0,0 +1,153 @@ +#!/usr/bin/env python3 +"""Bounded scripted capture timing; no human data, fitting or hardware control. + +Profiles are diagnostic sidecars outside the sealed capture. cProfile cumulative +times are nested and must not be added together. Run one worker per process. +""" +from __future__ import annotations + +import argparse +import cProfile +from hashlib import sha256 +import json +import math +from pathlib import Path +import platform +import pstats +import shutil +import time + +import numpy as np + +from dvidia_training import operator_capture as capture +from dvidia_training import godot_demonstration_bridge as bridge +from dvidia_training import piper_action_capture as files +from dvidia_training.piper_encoder_kinematics import PiperEncoderKinematics + + +def summary(values): + a = np.asarray(values, dtype=np.float64) + if not len(a): + return dict(count=0) + return dict(count=len(a), total_seconds=float(a.sum()), + p50_ms=float(np.percentile(a, 50)*1000), + p95_ms=float(np.percentile(a, 95)*1000), + max_ms=float(a.max()*1000)) + + +def profile_rows(profiler): + if profiler is None: + return [] + rows = [] + for (filename, line, function), (primitive, calls, own, cumulative, _) in pstats.Stats(profiler).stats.items(): + rows.append(dict(file=Path(filename).name, line=line, function=function, + calls=calls, primitive_calls=primitive, + own_seconds=own, cumulative_seconds=cumulative)) + return sorted(rows, key=lambda row: -row['cumulative_seconds'])[:100] + + +def run(assets, output, duration, profile): + config = capture.camera.RolloutConfig(duration_s=duration, seed=0) + output = Path(output).absolute() + if output.exists() or output.is_symlink() or any(p.is_symlink() for p in output.parents): + raise ValueError('Use a fresh ordinary output directory.') + parent = output.parent + while not parent.exists(): + parent = parent.parent + upper = (round(duration/.04)+1)*(320*240*7+4096)+32*1024**2 + if shutil.disk_usage(parent).free < bridge.RESERVE_BYTES+upper: + raise ValueError('Keep the 10 GiB reserve plus the full declared capture budget.') + output.mkdir(parents=True, exist_ok=False) + source = Path(capture.__file__).parent + manifest = dict(schema='dvidia.operator-profile/v1', duration_s=duration, + profile_enabled=profile, source_kind='simulation_scripted_input', + source_sha256={p.name: sha256(p.read_bytes()).hexdigest() for p in [ + Path(__file__), source/'operator_capture.py', source/'piper_action_capture.py', + source/'camera_action_capture.py', source/'piper_rgbd_tracker.py', + source/'piper_encoder_kinematics.py']}, + case=bridge.DEFAULT_CASE, python=platform.python_version(), system=platform.platform(), + numpy=np.__version__, physics_dt_seconds=.001, control_dt_seconds=.02, + camera_dt_seconds=.04, resolution=[320, 240], + scope='Single-process local scripted capture including encoder-only IK; excludes sockets, ' + 'Godot, real-time pacing, model fitting and hardware. cProfile cumulative scopes overlap.') + files._json(output/'started.json', manifest) + profiles = {name: cProfile.Profile() if profile else None for name in ('open', 'control', 'finish')} + times, camera_times, encoder_times, ik_times = [], [], [], [] + recorder = None + began = time.perf_counter() + try: + kinematics = PiperEncoderKinematics(assets) + recorder = capture.OperatorCapture(assets, output/'capture', case=bridge.DEFAULT_CASE, + duration_s=config.duration_s, source_kind='simulation_scripted_input') + opening = time.perf_counter() + if profile: profiles['open'].enable() + opened = recorder.open() + if profile: profiles['open'].disable() + open_seconds = time.perf_counter()-opening + joints = opened['context']['snapshot']['signals']['joint_position_rad']['value'] + home = kinematics.fk(joints)['tcp_position_world_m'] + orientation = recorder.session.task_config.tool_orientation_wxyz + # Same explicit path for every revision/run; camera and object truth + # never choose the action. No teacher calls or task-completion retries. + for index in range(round(duration/.02)): + tick = time.perf_counter() + if profile: profiles['control'].enable() + context = recorder.context() + angle = 2*math.pi*(index+1)/100 + target = [home[0]-.01*(1-math.cos(angle)), home[1]+.01*math.sin(angle), home[2]] + ik_start = time.perf_counter() + action = kinematics.pose_action(context['snapshot']['signals']['joint_position_rad']['value'], + target, orientation, .035) + ik_times.append(time.perf_counter()-ik_start) + recorder.step(action, input_event=dict(kind='registered_scripted_sine', index=index, + target_world_m=target)) + if profile: profiles['control'].disable() + elapsed = time.perf_counter()-tick + times.append(elapsed) + (camera_times if (index+1)%2 == 0 else encoder_times).append(elapsed) + finishing = time.perf_counter() + if profile: profiles['finish'].enable() + result = recorder.finish('capture_budget_complete') + if profile: profiles['finish'].disable() + finish_seconds = time.perf_counter()-finishing + total_seconds = time.perf_counter()-began + if not result['sealed'] or result['error'] or not result['native_evidence_saved']: + raise RuntimeError('Recorder did not seal complete native evidence.') + inspection = capture.inspect_capture(output/'capture') + receipt = dict(**manifest, complete=True, open_seconds=open_seconds, + finish_seconds=finish_seconds, total_seconds=total_seconds, + control=summary(times), camera_control=summary(camera_times), + encoder_control=summary(encoder_times), ik=summary(ik_times), + interval_seconds=times, profiles={name:profile_rows(p) for name,p in profiles.items()}, + capture_integrity_sha256=sha256((output/'capture/integrity.json').read_bytes()).hexdigest(), + capture_bytes=sum(p.stat().st_size for p in (output/'capture').rglob('*') if p.is_file()), + strict_success=inspection['strict_success'], camera_pairs=result['camera_pairs'], + recorded_intervals=result['recorded_complete_intervals'], teacher_queries=result['teacher_queries'], + physical_robot_ready=False) + files._json(output/'profile.json', receipt) + print(json.dumps({k:receipt[k] for k in ('complete','profile_enabled','control', + 'camera_control','encoder_control','open_seconds','finish_seconds','total_seconds','capture_bytes')}),flush=True) + return 0 + except BaseException as exc: + for p in profiles.values(): + if p is not None: p.disable() + if recorder is not None: + try: recorder.finish('profile_interrupted') + except BaseException: pass + files._json(output/'failure.json', dict(schema=manifest['schema'], + type=type(exc).__name__, message=str(exc), complete=False)) + raise + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--assets', required=True, type=Path) + parser.add_argument('--output', required=True, type=Path) + parser.add_argument('--duration', default=2., type=float) + parser.add_argument('--profile', action='store_true') + args = parser.parse_args() + return run(args.assets, args.output, args.duration, args.profile) + + +if __name__ == '__main__': + raise SystemExit(main()) diff --git a/src/dvidia_training/piper_rgbd_tracker.py b/src/dvidia_training/piper_rgbd_tracker.py index 5cc1692..9c5a3d8 100644 --- a/src/dvidia_training/piper_rgbd_tracker.py +++ b/src/dvidia_training/piper_rgbd_tracker.py @@ -8,6 +8,7 @@ from __future__ import annotations from dataclasses import asdict, dataclass +from functools import lru_cache import math import time @@ -202,15 +203,43 @@ def _rectangle(face, steps): return centre, float(angles[index]), float(widths[index]), float(heights[index]) -def _cube_rays(shape, intrinsics, transform, centre, yaw, side): - """Expected pixel-centre ray hits on the declared opaque geometric cube.""" - height, width = shape; fx, fy, cx, cy = intrinsics +@lru_cache(maxsize=2) +def _camera_ray_geometry(shape, intrinsics_bytes, rotation_bytes): + """Immutable calibration geometry, never an observation or object estimate. + + Only validated image dimensions, intrinsics and camera-to-base rotation + determine these directions. Translation, cube pose and current depth remain + per-frame inputs. Exact float64 bytes distinguish calibration revisions. + Two entries retain at most 14.0625 MiB at the public 640x480 image bound + (one HxWx3 float64 array per entry), excluding temporary computations. + The optical grid is constructed only on a miss and is not retained. + """ + height, width = shape + if (type(height) is not int or type(width) is not int + or not 16 <= height <= 480 or not 16 <= width <= 640): + raise ValueError('Camera geometry exceeds the bounded image dimensions.') + fx, fy, cx, cy = np.frombuffer(intrinsics_bytes, dtype=np.float64) rows, columns = np.indices(shape) optical = np.stack(((columns+.5-cx)/fx, (rows+.5-cy)/fy, np.ones(shape)), axis=-1) + # Preserve the original 4x4-transform slice layout and multiplication + # order; caching must not substitute a differently ordered rotation. + transform = np.eye(4) + transform[:3, :3] = np.frombuffer(rotation_bytes, dtype=np.float64).reshape(3, 3) + base_rays = optical @ transform[:3, :3].T + # An immutable bytes owner prevents callers from re-enabling WRITEABLE; + # merely clearing ndarray.flags.writeable would still allow cache mutation. + return np.frombuffer(base_rays.tobytes(), dtype=np.float64).reshape(base_rays.shape) + + +def _cube_rays(shape, intrinsics, transform, centre, yaw, side): + """Expected pixel-centre ray hits on the declared opaque geometric cube.""" + base_rays = _camera_ray_geometry(tuple(shape), + np.asarray(intrinsics, dtype=np.float64).tobytes(), + np.asarray(transform[:3, :3], dtype=np.float64).tobytes()) co, si = math.cos(yaw), math.sin(yaw) rotation = np.array([[co, -si, 0], [si, co, 0], [0, 0, 1.]]) origin = (transform[:3, 3]-centre) @ rotation - rays = optical @ transform[:3, :3].T @ rotation + rays = base_rays @ rotation half = side/2 parallel = np.abs(rays) < 1e-12 safe = np.where(parallel, 1., rays) diff --git a/tests/test_tracker_ray_cache.py b/tests/test_tracker_ray_cache.py new file mode 100644 index 0000000..ef0a0c9 --- /dev/null +++ b/tests/test_tracker_ray_cache.py @@ -0,0 +1,149 @@ +"""Exact calibration-cache equivalence; synthetic analytical data only.""" +from copy import deepcopy +import math +import unittest +from unittest.mock import patch + +import numpy as np + +from dvidia_training import piper_rgbd_tracker as tracker +from tests.test_piper_rgbd_tracker import fixture + + +def uncached_cube_rays(shape, intrinsics, transform, centre, yaw, side): + """Frozen pre-cache equations, retained as the independent comparison.""" + fx, fy, cx, cy = intrinsics + rows, columns = np.indices(shape) + optical = np.stack(((columns+.5-cx)/fx, (rows+.5-cy)/fy, np.ones(shape)), axis=-1) + co, si = math.cos(yaw), math.sin(yaw) + rotation = np.array([[co, -si, 0], [si, co, 0], [0, 0, 1.]]) + origin = (transform[:3, 3]-centre) @ rotation + rays = optical @ transform[:3, :3].T @ rotation + half = side/2 + parallel = np.abs(rays) < 1e-12 + safe = np.where(parallel, 1., rays) + a, b = (-half-origin)/safe, (half-origin)/safe + near, far = np.minimum(a, b), np.maximum(a, b) + inside = np.abs(origin) <= half + near = np.where(parallel, np.where(inside, -np.inf, np.inf), near) + far = np.where(parallel, np.where(inside, np.inf, -np.inf), far) + enter, leave = near.max(axis=-1), far.min(axis=-1) + valid = (enter > 0) & (leave >= enter) + return valid, np.where(valid, enter, 0.) + + +def geometry(shape, intrinsics, transform): + return tracker._camera_ray_geometry(tuple(shape), + np.asarray(intrinsics, dtype=np.float64).tobytes(), + np.asarray(transform[:3, :3], dtype=np.float64).tobytes()) + + +def estimate(rgb, depth, calibration, frame): + result = tracker.estimate_pose(rgb, depth, calibration, frame_index=frame, + captured_at_seconds=.2, available_at_seconds=.205, decision_at_seconds=.21) + # Only local computation duration is nondeterministic; acquisition/age and + # every numeric estimate, status and diagnostic remain in the comparison. + result['diagnostics'].pop('processing_seconds') + return result + + +class TrackerRayCacheTests(unittest.TestCase): + def setUp(self): + tracker._camera_ray_geometry.cache_clear() + self.addCleanup(tracker._camera_ray_geometry.cache_clear) + + def test_randomized_ray_hits_and_depth_exactly_match_uncached_equations(self): + rng = np.random.default_rng(32101) + total_hits = 0 + for index in range(40): + height, width = (int(x) for x in rng.integers(24, 180, size=2)) + intrinsics = (float(rng.uniform(90, 500)), float(rng.uniform(90, 500)), + width/2+float(rng.uniform(-3, 3)), height/2+float(rng.uniform(-3, 3))) + rotation, _ = np.linalg.qr(rng.normal(size=(3, 3))) + if np.linalg.det(rotation) < 0: rotation[:, 0] *= -1 + if index % 5 == 0: rotation = np.eye(3) + transform = np.eye(4); transform[:3, :3] = rotation + transform[:3, 3] = rng.uniform(-.25, .25, size=3) + centre = transform[:3, 3]+rotation @ np.array([rng.uniform(-.01, .01), + rng.uniform(-.01, .01), rng.uniform(.18, .6)]) + yaw = float(rng.uniform(-math.pi, math.pi)) + args = ((height, width), intrinsics, transform, centre, yaw, .04) + expected = uncached_cube_rays(*args) + for _ in range(2): + actual = tracker._cube_rays(*args) + for observed, reference in zip(actual, expected): + np.testing.assert_array_equal(observed, reference) + total_hits += int(expected[0].sum()) + self.assertGreater(total_hits, 100) + + def test_calibration_changes_miss_but_object_pose_is_never_cached(self): + transform = np.eye(4); shape = (32, 48); intrinsics = (100., 110., 24., 16.) + geometry(shape, intrinsics, transform) + geometry(shape, intrinsics, transform) + self.assertEqual(tracker._camera_ray_geometry.cache_info().hits, 1) + for index in range(4): + changed = list(intrinsics); changed[index] += .001 + misses = tracker._camera_ray_geometry.cache_info().misses + geometry(shape, changed, transform) + self.assertEqual(tracker._camera_ray_geometry.cache_info().misses, misses+1) + for changed_shape in ((33, 48), (32, 49)): + misses = tracker._camera_ray_geometry.cache_info().misses + geometry(changed_shape, intrinsics, transform) + self.assertEqual(tracker._camera_ray_geometry.cache_info().misses, misses+1) + theta = .31; changed_rotation = np.eye(4) + changed_rotation[:3, :3] = [[math.cos(theta), 0, math.sin(theta)], + [0, 1, 0], [-math.sin(theta), 0, math.cos(theta)]] + misses = tracker._camera_ray_geometry.cache_info().misses + geometry(shape, intrinsics, changed_rotation) + self.assertEqual(tracker._camera_ray_geometry.cache_info().misses, misses+1) + # Translation changes the per-frame origin, not the direction cache. + changed_rotation[:3, 3] = [.02, -.01, .10] + for centre, yaw in ((np.array([.02, 0., .4]), .1), (np.array([-.01, .03, .3]), -.5)): + args = (shape, intrinsics, changed_rotation, centre, yaw, .04) + for a, b in zip(tracker._cube_rays(*args), uncached_cube_rays(*args)): + np.testing.assert_array_equal(a, b) + self.assertEqual(tracker._camera_ray_geometry.cache_info().misses, misses+1) + + def test_cache_retains_at_most_two_entries_and_is_irreversibly_read_only(self): + shape=(32, 48); intrinsics=(100., 110., 24., 16.); transform=np.eye(4) + array = geometry(shape, intrinsics, transform) + self.assertFalse(array.flags.writeable) + with self.assertRaises(ValueError): array[0, 0, 0] = 999 + with self.assertRaises(ValueError): array.setflags(write=True) + with self.assertRaises(ValueError): array.base.setflags(write=True) + geometry(shape, (101., 110., 24., 16.), transform) + geometry(shape, (102., 110., 24., 16.), transform) + info = tracker._camera_ray_geometry.cache_info() + self.assertEqual((info.maxsize, info.currsize), (2, 2)) + geometry(shape, intrinsics, transform) + self.assertEqual(tracker._camera_ray_geometry.cache_info().misses, info.misses+1) + # Every permitted entry's retained array bytes obey the documented cap. + biggest = geometry((480, 640), (500., 500., 320., 240.), transform) + self.assertEqual(biggest.nbytes*2, 14745600) + with self.assertRaises(ValueError): geometry((481, 640), intrinsics, transform) + + def test_current_frame_missing_occluded_and_invalid_calibration_still_match(self): + rgb, depth, calibration, _, _, mask = fixture(yaw=0) + full = estimate(rgb, depth, calibration, 4) + self.assertEqual(full['status'], 'available') + variants = [(rgb, depth, calibration)] + blank = np.full_like(rgb, 90) + variants.append((blank, depth, calibration)) + occluded_rgb, occluded_depth = rgb.copy(), depth.copy() + split = int(np.median(np.where(mask)[1])) + occluded_rgb[:, :split] = 90; occluded_depth[:, :split] = .40 + variants.append((occluded_rgb, occluded_depth, calibration)) + expired = deepcopy(calibration); expired['valid_until_seconds'] = .205 + variants.append((rgb, depth, expired)) + for index, values in enumerate(variants): + cached = estimate(*values, frame=5+index) + with patch.object(tracker, '_cube_rays', uncached_cube_rays): + expected = estimate(*values, frame=5+index) + self.assertEqual(cached, expected) + if index: + self.assertNotEqual(cached['status'], 'available') + for name in tracker.SIGNALS: + self.assertEqual(cached['signals'][name]['status'], 'missing') + + +if __name__ == '__main__': unittest.main()