You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Complete reference of every environment variable Probing reads. Variables are grouped
by subsystem.
Activation
Variable
Values
Default
Description
PROBING
0, 1/followed, 2/nested, regex:PATTERN, SCRIPT.py
unset (disabled)
Controls whether probing activates. 1 activates the current process. 2 activates current + child processes. regex:PATTERN activates when the script basename matches. SCRIPT.py activates when the script basename equals the value exactly.
PROBING_ORIGINAL
(set automatically)
—
Backs up the original PROBING value before probing modifies it. Set by site_hook; don't set manually.
Child-process propagation: In nested mode, the original PROBING value is propagated to children. In regex: mode, non-matching children inherit PROBING=1 so they can be inspected but won't re-trigger site hooks.
Prefix syntax: init:SCRIPT+<mode> runs exec(open(SCRIPT).read()) after activation.
Data storage
Variable
Default
Description
PROBING_DATA_DIR
Platform-specific
Root directory for mmap ring buffer files (MEMT tables). Each process creates a subdirectory named by its PID.
PROBING_TABLE_DEFAULT_MB
20
Default mmap ring byte budget per Python @table (and ExternalTable when discard_threshold is omitted). Override per table with @table(capacity_bytes=…). Tables are created on first write, not at import.
PROBING_COLD
unset
Set to on to enable hot-to-cold compaction of mmap tables.
PROBING_COLD_TARGET_MB
—
Target size per cold chunk after compaction.
PROBING_COLD_MAX_TOTAL_MB
—
Maximum total size of all cold storage files.
PROBING_COLD_TTL_SECS
—
Minimum age of a chunk before it's eligible for cold compaction.
PROBING_COLD_POLL_MS
—
Interval between compaction poll cycles.
PROBING_COLD_MAX_AGE_SECS
—
Maximum age of a chunk before forced compaction.
PROBING_COLD_DIR
—
Directory for cold storage files (defaults under PROBING_DATA_DIR).
Server & networking
Variable
Default
Description
PROBING_PORT
unset
TCP port for the embedded HTTP server. Set to RANDOM for automatic port selection. Required for remote access.
PROBING_SERVER_ADDR
Inferred from port
Explicit bind address (e.g. 0.0.0.0:8080).
PROBING_ADVERTISE_ADDR
MASTER_ADDR, then hostname
Address published to cluster peers when the server binds a wildcard address. Accepts host, host:port, IPv6, or a {port} placeholder. Set it explicitly on multi-homed hosts or when MASTER_ADDR is not the current node's peer-reachable address.
PROBING_NODE_HOST
OS hostname
Explicit host label reported in cluster heartbeats. Intended for container identity and local logical-node fixtures; it does not change the advertised network address.
PROBING_SERVER_ADDRPATTERN
unset
IP pattern filter for multi-homed hosts. Selects the first matching interface.
PROBING_SERVER_WORKER_THREADS
auto
Number of Tokio worker threads.
PROBING_MAX_CONNECTIONS
max(128, fan-out concurrency)
Maximum number of in-flight HTTP requests. Runtime SET server.max_connections=... updates the same limit.
PROBING_SERVER_TIMEOUT_SECS
30
End-to-end HTTP request deadline. Runtime SET server.timeout=... updates the same deadline.
PROBING_CTRL_ROOT
/tmp/probing/
Directory for Unix domain sockets (local PID-based connections).
PROBING_MAX_REQUEST_SIZE
server default
Maximum HTTP request body size in bytes.
PROBING_MAX_FILE_SIZE
server default
Maximum file upload size in bytes.
PROBING_ALLOWED_FILE_DIRS
server default
Colon-separated list of directories allowed for file reads.
PROBING_BASE_PATH
unset
URL path prefix for reverse proxy deployments (e.g. /probing).
PROBING_ASSETS_ROOT
built-in default
Path to the web UI static assets directory.
Authentication
Variable
Default
Description
PROBING_AUTH_TOKEN
unset
Bearer token for HTTP authentication. Required for remote access when set.
PROBING_AUTH_USERNAME
unset
Username for Basic authentication.
PROBING_AUTH_REALM
unset
Authentication realm string for Basic auth.
Tracing & spans
Variable
Default
Description
PROBING_SPAN_BACKENDS
memtable
Comma-separated span backends. Built-in: memtable (python.trace_event), logger (stderr), otel (OpenTelemetry), none (stack only, no persistence). configure_backends([]) also disables until reset_backends(). Unknown names fall back to memtable only. Custom backends: probing.span_backends entry point. See Tracing and training phases.
PROBING_SPAN_LOG_LEVEL
INFO
Log level for the logger span backend.
PROBING_SPAN_LOCATION
unset
Enable automatic location capture via inspect.stack() for every span. Adds overhead; use sparingly.
PROBING_TRACE_STDOUT
unset
When 1/true, probing.inspect.trace emits variable/tensor updates to stdout instead of the Python logger.
Global step bucket size (falls back to PROBING_STEP_BUCKET).
Parallel topology (role)
Set these to describe your training's parallelism configuration. Probing combines
them into a role string like dp=2,pp=1,tp=0.
Variable
Description
PROBING_TP_RANK / PROBING_TP_SIZE
Tensor parallelism rank and size.
PROBING_PP_RANK / PROBING_PP_SIZE
Pipeline parallelism rank and size.
PROBING_DP_RANK / PROBING_DP_SIZE
Data parallelism rank and size.
PROBING_EP_RANK
Expert parallelism rank.
PROBING_CP_RANK
Context parallelism rank.
PROBING_ROLE_<NAME>
Arbitrary named parallelism dimension (e.g. PROBING_ROLE_SP=8).
Non-PROBING-prefixed aliases are also recognized for Megatron compatibility:
TP_RANK, TP_SIZE, PP_RANK, PP_SIZE, DP_RANK, DP_SIZE,
TENSOR_MODEL_PARALLEL_RANK, PIPELINE_MODEL_PARALLEL_RANK,
DATA_PARALLEL_RANK, and more.
CPU sampling
Variable
Default
Description
PROBING_CPU
enabled
Set to 0, off, false, or no to disable CPU sampling.
PROBING_CPU_SAMPLE_MS
1000
Sampling interval in milliseconds. Set to 0 to disable.
PROBING_CPU_THREAD_TOP_N
8
Maximum number of threads to sample per process per interval.
GPU sampling
Variable
Default
Description
PROBING_GPU
enabled
Set to 0, off, false, or no to disable GPU sampling.
Ascend metrics source: auto prefers DCMI and falls back to npu-smi; use smi to force the CLI path.
PROBING_DCMI_LIB
—
Explicit path to Ascend libdcmi.so.
NCCL & HCCL
Variable
Description
PROBING_NCCL_MOCK
Enable mock NCCL proxy data for testing without GPUs.
PROBING_FAKES
Opt-in fake packages for macOS debugging (1/all, or comma list: megatron,transformer_engine,apex,flash_attn,triton). See python/probing/fakes/README.md.
PROBING_FAKES_FORCE
When 1, shadow real packages for enabled specs (needed if megatron-core is installed but unusable on macOS).
PROBING_FAKE_DEVICE
meta / cpu / mps. Remap CUDA device APIs when probing.fakes is installed. Scripted loops default to meta (no compute). Real Megatron-LM runner (examples/megatron/run_megatron_lm_pretrain.py) defaults to cpu.
MEGATRON_LM
Path to a Megatron-LM checkout for the real-code runner (default: sibling ../Megatron-LM). One checkout at a time — switch versions by changing this path.
MEGATRON_LM_ALLOW_ANY_VERSION
When 1, skip the megatron-core smoke version gate (default allows ≥0.12.1 and <0.21).
PROBING_MEGATRON_REAL_LM
Opt-in for tests/regression/ext/test_megatron_real_lm.py (1 to run).
—
Fake layer also writes python.fake_event ground-truth rows and can hook torch.distributed to dual-write python.comm_collective for correlation / verify.
PROBING_NCCL_PROFILER
Path to the NCCL profiler shared library.
PROBING_NCCL_MIN_MSG_BYTES
Skip recording NCCL ops smaller than this size in bytes (default 0 = record all).
PROBING_NCCL_INFLIGHT_THRESHOLD_SECS
Watchdog threshold for snapshotting in-flight (possibly hung) NCCL ops into nccl.inflight_ops (default 10, 0 disables).
PROBING_HCCL_PROFAPI_REAL
Path to the real HCCL profapi library (Ascend NPU).
PROBING_HCCL_SHIM
Path to the HCCL shim library.
PROBING_HCCL_SHIM_LOG
Enable HCCL shim debug logging.
RDMA
Variable
Default
Description
PROBING_RDMA_HCA_NAME
—
HCA device name filter for RDMA counter sampling.
PROBING_RDMA_SAMPLE_RATE
—
RDMA counter sampling rate in seconds.
PyTorch integration
Variable
Default
Description
PROBING_TORCH_PROFILING
—
Set to on to activate PyTorch module hooks and write python.torch_trace. Default when enabled: 5% step sampling (rate=0.05), full-snapshot (layer_rate=1.0), shadow cadence 4:1 (shadow=4:1 — one baseline step per four probed steps for in-run overhead in python.torch_step_timing). Spec is rate[:layer_rate] (layer_rate = per-layer hit probability on a sampled step); a leading random:/ordered: token is accepted for back-compat (always random). Override with e.g. 1.0, 0.05:0.1, shadow=8:2, or shadow=off. Backward timing (backward=on) times each module's backward via output/input grad hooks; off by default.
PROBING_TORCHRUN_CLUSTER
1
Enable automatic torchrun cluster registration. Set to 0 to disable.
PROBING_TORCHRUN_STORE_TIMEOUT
—
Timeout for torchrun distributed store operations.
PROBING_TCPSTORE_INSPECT
0
Allow pytorch/runtime-debug?include_values=true to preview otherwise-redacted TCPStore values. The endpoint remains read-only. Use only in trusted environments.
Megatron autostart
Megatron integration is best-effort and enabled by default when Megatron env vars
or modules are detected. No training-script changes are required beyond PROBING=2.
Variable
Default
Description
PROBING_MEGATRON
auto
auto = on when Megatron env/modules detected; on/off to force.
PROBING_MEGATRON_STEP_SYNC
auto
Sync probing.step with Megatron iteration via wrapped train_step.
probing.megatron.enable
—
Config override for Megatron autostart (probing.config.set).
probing.megatron.step_sync
—
Config override for iteration sync.
Import hooks run when megatron.core.parallel_state and megatron.training.training
load: parallel ranks flow into probing.set_role, and train_step aligns step
coordinates for SQL JOINs.
vLLM autostart
vLLM integration is best-effort and enabled by default when vLLM env vars
or modules are detected (including the macOS vllm-metal platform plugin).
No inference-script changes are required beyond PROBING=2.
Variable
Default
Description
PROBING_VLLM
auto
auto = on when vLLM env/modules detected; on/off to force.
PROBING_VLLM_STEP_SYNC
auto
Sync probing.step with vLLM scheduler steps via wrapped LLMEngine.step.
probing.vllm.enable
—
Config override for vLLM autostart (probing.config.set).
probing.vllm.step_sync
—
Config override for engine step sync.
Import hooks run when vllm_metal (macOS Metal plugin), vllm.v1.engine.llm_engine,
or vllm.engine.llm_engine load: distributed ranks and backend=metal flow into
probing.set_role, and LLMEngine.step aligns step coordinates for SQL JOINs.
Variable
Default
Description
PROBING_FR_ON_WATCHDOG
auto
On NCCL watchdog exceptions, snapshot Flight Recorder into probing tables.
probing.fr.on_watchdog
—
Config override for watchdog Flight Recorder snapshot.
PyTorch Flight Recorder
Probing can snapshot PyTorch NCCL Flight Recorder data via
/apis/pythonext/flight-recorder/snapshot and writes it to
python.torch_nccl_flight_record / python.torch_nccl_pg_status.
These variables are read by PyTorch, not Probing, but should be set before
torch.distributed.init_process_group.
Variable
Default
Description
TORCH_NCCL_TRACE_BUFFER_SIZE
PyTorch default
Set to a positive value (for example 2000) to enable Flight Recorder ring-buffer collection.
TORCH_NCCL_DUMP_ON_TIMEOUT
false
Let PyTorch dump Flight Recorder files automatically on watchdog timeout.
TORCH_FR_DUMP_TEMP_FILE
PyTorch default
Prefix/path for PyTorch Flight Recorder dump files.
TORCH_NCCL_TRACE_CPP_STACK
false
Include C++ stack traces in Flight Recorder entries.
TORCH_NCCL_ENABLE_TIMING
false
Add CUDA timing events for collectives; may add overhead.
TORCH_SYMBOLIZE_MODE
PyTorch default
C++ stack symbolization mode (dladdr, addr2line, fast).