Skip to content

Pr/rl memory observability - #117

Merged
reiase merged 10 commits into
DeepLink-org:masterfrom
VincentCheungKokomo:pr/rl-memory-observability
Nov 19, 2026
Merged

reiase merged 10 commits into
DeepLink-org:masterfrom
VincentCheungKokomo:pr/rl-memory-observability

Conversation

@VincentCheungKokomo

Copy link
Copy Markdown
Contributor

No description provided.

root added 10 commits November 19, 2026 19:54
host.memory now reports per-process USS/PSS/anon/locked from smaps_rollup, so RSS inflation from shared object-store pages can be separated from private memory. python.gc records generational counts and GC pause histograms through gc.callbacks; python.cuda_memory and gpu.process_memory attribute GPU memory to the current process (torch allocator fallback works in containers where NVML host PIDs are unavailable). Tables are created eagerly so empty-table queries keep their schema instead of returning _error.
…r memory

Ray sanitises the driver environment, so PROBING=1 alone never reached workers. worker_runtime_env()/init_job() propagate PROBING while stripping PROBING_PORT, and the driver samples object-store stats into ray.object_store. examples/rl/actor_mem_sampler.py aggregates local Ray actors' RSS/USS/PSS into rl.actor_memory for the Host Memory page.
The Python wheel ships the runtime as probing/_core*.so, not libprobing.so next to the CLI executable; resolve PROBING_INJECT_LIB from probing._core and stop gating ptrace on the target's memory maps. When Ray propagates the driver's PROBING_PORT to every raylet, only one process can own the port: skip the HTTP bind on AddrInUse and keep the per-process Unix socket instead of retrying forever.
The Memory section now has a host-side view alongside device memory. /memory/host reads the driver-side rl.actor_memory table, shows latest RSS/USS/PSS per actor, a 10-minute USS timeline for the top 12 actors, and a detail table. Missing or empty tables render install instructions instead of an error; /memory links to the new page.
PROBING_SERVER_ADDR is derived from PROBING_PORT in the driver process, so filtering only PROBING_PORT still made every worker inherit the driver's bind address. Strip both and cover the behavior in the worker_runtime_env test.
On the PPO verification pod, ray.util.state.list_actors returned zero actors while four TrainingWorker processes were alive. The actor sampler now scans local ray:: worker processes with psutil and extracts the actor class from the process title, so rl.actor_memory and /memory/host still work when dashboard state is incomplete. Adds actor_class_from_process_title() to probing.ext.ray and a unit test.
Adds a runnable example that snapshots RSS/USS/PSS into rl.mem_snapshot on install and after every explicit gc.collect(). It is idempotent and re-entrancy safe.
chrono has no patched version; it is a direct dependency and is also pulled by arrow/datafusion. Track migration to jiff/time separately so cargo-deny stays green.
Creating every @table memtable at decoration time broke the documented lazy-mmap contract (and test_table_decorator_defers_mmap_until_append). Add eager=False by default and set eager=True only on inference_engine_metric, which needs an empty-query schema before the first scraped row. Add a regression test for the eager path.
@codecov

codecov Bot commented Nov 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.39535% with 16 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/lib.rs 0.00% 13 Missing ⚠️
tests/regression/core/test_table_docs.py 90.62% 3 Missing ⚠️
Files with missing lines Coverage Δ
tests/unit/test_gc_sampler.py 100.00% <100.00%> (ø)
tests/unit/test_rl_memory_observability.py 100.00% <100.00%> (ø)
tests/regression/core/test_table_docs.py 95.94% <90.62%> (-1.47%) ⬇️
src/lib.rs 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@reiase
reiase merged commit c4f77dc into DeepLink-org:master Nov 19, 2026
14 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants