Inspect · Source & workspace
Requested workspace inspection related to source & workspace.
1 call · #0001–#0001
echo <val>ls -l -a <val> <n> > <path>Claude Fable 5.1 · RL
Qwen3-1.7B online GRPO 2dev · Joint Optimization
01 / PROCESS MAP
Each row shows one agent’s tool events in its own recorded order. Colors show broad activities; bar widths do not represent duration.
Main agentClaude Fable 5.1 · 297 visible calls
02 / EVENT SEQUENCE
Requests are grouped by agent, activity and topic. Delegations open into child branches. Summaries describe visible requests; tool errors and missing responses are flagged. A recorded response does not establish command success or a performance improvement.
Scroll within this panel to view all events. Command sketches retain familiar programs and options. Values become <val> or <n>; paths, addresses and script bodies are hidden as <path>, <url> and <script>.
Requested workspace inspection related to source & workspace.
1 call · #0001–#0001
echo <val>ls -l -a <val> <n> > <path>Requested file and log inspection and workspace inspection related to task requirements.
3 calls · #0002–#0004
cat <path>cd <val><command> <args>find <val> -maxdepth <n>head -n <n>Requested file and log inspection related to reward & policy updates.
1 call · #0005–#0005
cd <val>echo <val>cat <path>echoRequested file and log inspection related to benchmark & validation setup.
1 call · #0006–#0006
cd <path><command> <args>cat <val>echoRequested file and log inspection related to task requirements.
2 calls · #0007–#0008
cd <val>wc -l <path> <path> <path>echo <val>sed -n <val> <path>cat <path>echoecho <path>head -c <n> <path>Requested file and log inspection, script or workload execution and repository inspection related to parallelism & communication.
1 call · #0009–#0009
echo <val><command> <args>head <flag>python3 -Vpython3 -c <script> <n> >& <path>tail -n <n>git -C <val> <val> --oneline <flag> <args>envgrep -i -E <val>sorthead -n <n>Requested file and log inspection related to source & workspace.
5 calls · #0010–#0014
sed -n <val> <path>cat <path>echo <val>Requested file and log inspection related to task requirements.
1 call · #0015–#0015
cd <path>echo <val>cat <val>head -n <n> <val>echo <path>cat <path>Requested environment setup or inspection, source searches and workspace inspection related to source & workspace.
2 calls · #0016–#0017
echo <val>envgrep -E <val>sortls -l -a <path> <n> >& <path>head<command> <args>ls <val> <n> > <path>find <path> -maxdepth <n> -iname <val> <flag> <args>head -n <n>cd <path>echo <path>find <path> -maxdepth <n> -type <val>ls <path>grep -r -l <val> <path> --include <path> <n> > <path>Requested workspace file updates and script or workload execution related to benchmark & validation setup.
1 call · #0018–#0018
cd <path>mkdir -p <path>bash <script> > <path> <n> >& <path>echo <val> >> <path>Requested file and log inspection, workspace inspection and script or workload execution related to source & workspace.
1 call · #0019–#0019
echo <val>cat <val>echofind <path> -name <val> <n> > <path>headls <path>head -n <n>python3 -c <script> <n> >& <path>tail -n <n>Requested workspace inspection and file and log inspection related to rollout generation.
1 call · #0020–#0020
cd <path>echo <val>ls -R <path>head -n <n>cat <path>Requested workspace inspection, source searches and file and log inspection related to checkpoints & weight state.
1 call · #0021–#0021
cd <path>ls -l -aecho <val>grep -r -n <val> <path> --include <path>head -n <n>Requested source searches and file and log inspection related to source & workspace.
1 call · #0022–#0022
cd <path>echo <val>grep -n <val> <path>head -n <n>echoecho <path>Requested source searches and file and log inspection related to rollout generation.
2 calls · #0023–#0024
cd <path>echo <val>grep -n <val> <path>head -n <n>echosed -n <val> <path>Requested file and log inspection, workspace inspection and runtime inspection related to device memory.
1 call · #0025–#0025
tail -c <n> <path> <n> > <path>echo <val>ls -l -a <val> <n> > <path>npu-smi info <n> > <path>sed -n <val>Requested file and log inspection and source searches related to checkpoints & weight state.
2 calls · #0026–#0027
cd <path>echo <val>cat <path>grep -n <val> <path>head -n <n>sed -n <val> <path>Requested file and log inspection related to rollout generation.
1 call · #0028–#0028
cd <path>sed -n <val> <path>echo <path>Requested workspace inspection, file and log inspection and source searches related to source & workspace.
1 call · #0029–#0029
cd <path>echo <path>ls <val> <n> > <path>head -n <n>grep -r -l -n <val> --include <path> <path> <path> <n> > <path>echo <val>grep -n <val> <path>Requested workspace inspection, file and log inspection and source searches related to rollout generation.
1 call · #0030–#0030
cd <path>ls <path>echo <val>sed -n <val> <path> <n> > <path>grep -r -n <val> <path> <path>head -n <n>Requested file and log inspection related to benchmark & validation setup.
1 call · #0031–#0031
date -uecho <val>tail -c <n> <path> <n> > <path>echoRequested file and log inspection related to checkpoints & weight state.
1 call · #0032–#0032
sed -n <val> <path>Requested file and log inspection related to rollout generation.
3 calls · #0033–#0035
sed -n <val> <path>echo <val>Requested file and log inspection related to source & workspace.
1 call · #0036–#0036
sed -n <val> <path>echo <val>Requested file and log inspection and source searches related to rollout generation.
1 call · #0037–#0037
sed -n <val> <path>echo <path>grep -n <val> <path>head -n <n>Requested workspace inspection, source searches and file and log inspection related to source & workspace.
1 call · #0038–#0038
ls -l -a <path> <n> > <path>echo <val>grep -r -n <val> <path> <n> > <path>head -n <n>Requested file and log inspection, workspace inspection and script or workload execution related to benchmark & validation setup.
1 call · #0039–#0039
date -uecho <val>tail -c <n> <path> <n> > <path>ls -l -a <val>python3 -c <script> <n> >& <path>tail -n <n>Requested source searches and file and log inspection related to prefix caching.
1 call · #0040–#0040
cd <path>grep -r -n <val> <path><command> <args>head <flag>echo <val>grep -n <val> <val>head -n <n>echo <path>grep -r -n <val> <path> --include <path> --include <val>Requested file and log inspection related to checkpoints & weight state.
1 call · #0041–#0041
cd <path>echo <val>sed -n <val> <path>Requested file and log inspection related to source & workspace.
1 call · #0042–#0042
sed -n <val> <path>Requested source searches and file and log inspection related to reward & policy updates.
1 call · #0043–#0043
cd <path>grep -r -n <val> -A <n> <path>head -n <n>echo <val>Requested workspace inspection, source searches and file and log inspection related to checkpoints & weight state.
1 call · #0044–#0044
cd <path>ls <path>echo <flag>ls -l -a <path>echo <val>grep -r -n <val> <path> <path> <n> > <path>head -n <n>echo <path>grep -r -n <val> <path> <path>Requested file and log inspection, workspace inspection and runtime inspection related to device memory.
1 call · #0045–#0045
date -uecho <val>tail -c <n> <path> <n> > <path>ls -l -a <val>echonpu-smi info <n> > <path>sed -n <path>head -n <n>Requested workspace inspection, file and log inspection and script or workload execution related to source & workspace.
1 call · #0046–#0046
ls -l -a <path>echo <val>cat <path>python3 -c <script> <n> >& <path>tail -n <n>Requested file and log inspection and source searches related to checkpoints & weight state.
2 calls · #0047–#0048
sed -n <val> <path>echo <path>grep -r -n <val> -A <n> <path> <n> > <path>grep -n <val>head -n <n>Requested file and log inspection related to rollout generation.
1 call · #0049–#0049
sed -n <val> <path>Requested source searches and file and log inspection related to source & workspace.
1 call · #0050–#0050
cd <path>grep -r -n <val> <path> <path> <n> > <path>headecho <val>grep -n <val> <path>head -n <n>grep -n <val> -A <n> <path>Requested workspace inspection, source searches and file and log inspection related to device memory.
1 call · #0051–#0051
date -uecho <val>ls -l -a <val>grep <flag> <args>tail -n <n>tail -c <n> <path> <n> > <path>echonpu-smi info <n> > <path>sed -n <path>head -n <n>Requested source searches and file and log inspection related to checkpoints & weight state.
1 call · #0052–#0052
cd <path>echo <val>grep -n <val> <path>head -n <n>echo <path>grep -r -n <val> <path> <path> <n> > <path>Requested source searches and file and log inspection related to source & workspace.
1 call · #0053–#0053
cd <path>grep -r -n <val> --include <path> <path>head<command> <args>head <flag>echo <val>grep -n <val> -A <n> <val>head -n <n>Requested source searches and file and log inspection related to kv-cache management.
1 call · #0054–#0054
cd <path>echo <val>grep -r -n <val> --include <path> <path>head -n <n>sed -n <val> <path>Requested environment setup or inspection, workspace inspection and file and log inspection related to device memory.
1 call · #0055–#0055
env <vars>echo <val>ls -l -a <val> <n> > <path>cat <path> <n> > <path>ls <path>grep -r -n <val> <path>head -n <n>Requested workspace inspection, source searches and file and log inspection related to benchmark & validation setup.
1 call · #0056–#0056
date -uls -l -a <val>echo <val>grep <flag> <args>tail -n <n>tail -c <n> <path>Requested file and log inspection and source searches related to source & workspace.
3 calls · #0057–#0059
sed -n <val> <path>grep -n <val> <path>head -n <n>echo <val>grep -n <val> -A <n> <path>cd <path>grep -r -n <val> -A <n> <path>echo <path>grep -r -n <val> -A <n> <path> <path> <n> > <path>Requested file and log inspection and source searches related to checkpoints & weight state.
2 calls · #0060–#0061
sed -n <val> <path>cd <path>echo <val>grep -r -n <val> <path> <path> <n> > <path>head -n <n>grep -n <val> <path>Requested workspace inspection, source searches and file and log inspection related to benchmark & validation setup.
1 call · #0062–#0062
date -uls -l -a <val>echo <val>grep <flag> <args>tail -n <n>Requested source searches and file and log inspection related to rollout generation.
1 call · #0063–#0063
cd <path>echo <val>grep -r -n <val> -A <n> <path> <path>head -n <n>sed -n <val> <path>Requested source searches and file and log inspection related to source & workspace.
1 call · #0064–#0064
cd <path>echo <val>grep -r -n <val> -A <n> <path> <n> > <path>grep -r -n <val> -A <n> --include <path> <path>head -n <n>grep -r -n <val> <path> <n> > <path>Requested file and log inspection and source searches related to rollout generation.
2 calls · #0065–#0066
cd <path>sed -n <val> <path>echo <val>grep -r -n <val> <path>head -n <n>grep -r -n <val> -A <n> <path>grep -n <val> <path>Requested script or workload execution related to checkpoints & weight state.
1 call · #0067–#0067
python3 - <script>Requested source searches and file and log inspection related to optimizer & gradients.
1 call · #0068–#0068
cd <path>echo <path>grep -r -n <val> -A <n> <path>head -n <n>echo <val>sed -n <val> <path>Requested script or workload execution, file and log inspection and runtime inspection related to source & workspace.
1 call · #0069–#0069
echo <val>python3 -c <script> <n> >& <path>tail -n <n>free -ghead -n <n>df -h <path> <path> <n> > <path><command> <args>Requested source searches and file and log inspection related to batching & scheduling.
1 call · #0070–#0070
cd <path>echo <path>grep -r -n <val> <path> <path> <path> <n> > <path>head -n <n>echogrep -n <val> <path>Requested source searches, file and log inspection and script or workload execution related to runtime processes.
1 call · #0071–#0071
cd <path>echo <val>grep -r -n <val> -A <n> <path>head -n <n>python3 -c <script>grep -r -n <val> <path> --include <path>Requested workspace inspection and file and log inspection related to source & workspace.
1 call · #0072–#0072
cd <path>echo <val>ls -l -a <path> <n> >& <path>head -n <n>echo <path>cat <path>sed -n <val> <path>Requested source searches, file and log inspection and workspace inspection related to checkpoints & weight state.
3 calls · #0073–#0075
cd <path>grep -n <val> -A <n> <path> <path> <path> <n> > <path>head -n <n>echo <val>grep -r -n <val> -A <n> <path>sed -n <val> <path>echo <path>grep -n <val> <path>ls -l -a <val> <n> > <path>headls -l -a <path> <path> <path> <n> > <path>npu-smi info <n> > <path>sed -n <path>Requested workspace file updates, file and log inspection and script or workload execution related to checkpoints & weight state.
1 call · #0076–#0076
mkdir -p <path>cat > <path> <script>python3 -c <script>Requested file and log inspection and source searches related to source & workspace.
2 calls · #0077–#0078
cd <path><command> <args>head <flag>echo <val>grep -n <val> -A <n> <val>head -n <n>grep -r -n <val> -A <n> --include <path> <path>Requested file and log inspection related to batching & scheduling.
1 call · #0079–#0079
cd <path>sed -n <val> <path>Requested file and log inspection related to source & workspace.
1 call · #0080–#0080
cd <path>sed -n <val> <path>echo <path>Requested file and log inspection related to checkpoints & weight state.
1 call · #0081–#0081
cd <path>sed -n <val> <path>echo <val>Requested file and log inspection, source searches and script or workload execution related to batching & scheduling.
1 call · #0082–#0082
cd <path>sed -n <val> <path>echo <val>grep -r -n <val> -A <n> <path>head -n <n>date -upython3 -c <script>Requested file and log inspection and script or workload execution related to checkpoints & weight state.
1 call · #0083–#0083
cat >> <path> <script>python3 -c <script>Requested file and log inspection and script or workload execution related to checkpoints & weight state.
1 call · #0084–#0084
cat >> <path> <script>python3 -c <script>Requested source searches and file and log inspection related to batching & scheduling.
1 call · #0085–#0085
cd <path>echo <path>grep -r -n <val> -A <n> <path>head -n <n>grep -r -n <val> <path>echo <val>Requested workspace inspection and file and log inspection related to checkpoints & weight state.
1 call · #0086–#0086
cd <path>ls <path> <n> > <path>head -n <n>echo <path>find <val> -name <path> <n> > <path>xargs <val> <flag> <args>echo <val>find <val> -path <val> -name <path> <n> > <path>Requested file and log inspection and script or workload execution related to checkpoints & weight state.
1 call · #0087–#0087
cat >> <path> <script>python3 -c <script>Requested script or workload execution related to source & workspace.
1 call · #0088–#0088
date -upython3 -c <script>Requested source searches and file and log inspection related to checkpoints & weight state.
1 call · #0089–#0089
cd <path>echo <path>grep -n <val> <path>head -n <n>echo <val>grep -c <val> <path>Requested source searches and file and log inspection related to source & workspace.
1 call · #0090–#0090
cd <path>echo <val>grep -r -n <val> -A <n> <path>head -n <n>sed -n <val> <path>Requested source searches and file and log inspection related to reward & policy updates.
1 call · #0091–#0091
cd <path>echo <path>grep -r -n <val> --include <path> <path>headecho <val>grep -n <val> <path>head -n <n>grep -r -n <val> --include <path> <path> <path> <n> > <path>Requested script or workload execution related to rollout generation.
1 call · #0092–#0092
cd <path>python3 - <script>Requested script or workload execution related to source & workspace.
1 call · #0093–#0093
date -upython3 -c <script>Requested script or workload execution, source searches and file and log inspection related to reward & policy updates.
1 call · #0094–#0094
cd <path>timeout <n> <val> -c <path> <n> >& <path>grep -v -E <val>tail -n <n>Requested workspace file updates, script or workload execution and file and log inspection related to benchmark & validation setup.
1 call · #0095–#0095
mkdir -p <path>cp <path> <path> <n> > <path>echo <val>echo <flag>timeout <n> <val> <path> <n> >& <path>tail -n <n>python3 -c <script>Requested file and log inspection, script or workload execution and source searches related to source & workspace.
2 calls · #0096–#0097
cd <path><command> <args>tail -n <n>echo <val>head -n <n>python3 -m <module> <script> <n> >& <path>grep -A <n> <val> <val> <n> > <path>date -upython3 -c <script>Requested script or workload execution related to benchmark & validation setup.
1 call · #0098–#0098
cd <path>timeout <n> <val> <path> > <path> <n> >& <path>echo <val> >> <path>Requested file and log inspection and source searches related to source & workspace.
1 call · #0099–#0099
cd <path>echo <val>awk <val> <path>grep -n <val> <path>head -n <n>grep <flag> <args>Requested script or workload execution related to source & workspace.
1 call · #0100–#0100
cd <path>python3 - <script>Requested file and log inspection and source searches related to checkpoints & weight state.
1 call · #0101–#0101
cd <path>echo <val>sed -n <path> <path>grep -E <val>echogrep -n <val> <path>head -n <n>Requested script or workload execution related to reward & policy updates.
1 call · #0102–#0102
cd <path>python3 - <script>Requested file and log inspection, workspace inspection and source searches related to benchmark & validation setup.
1 call · #0103–#0103
date -uecho <val>tail -c <n> <path> <n> > <path>echols -l -a <val>tail -n <n>grep -v -E <val>Requested source searches and script or workload execution related to attention kernels.
1 call · #0104–#0104
grep -n <val> <path>echo <flag>python3 -c <script>Requested script or workload execution related to source & workspace.
1 call · #0105–#0105
python3 -c <script>Requested file and log inspection, source searches and workspace inspection related to device memory.
1 call · #0106–#0106
date -uecho <val>tail -c <n> <path> <n> > <path>echogrep <flag> <args>tail -n <n>grep -v -i -E <val>head -n <n>ls -l -a <path> <n> > <path>npu-smi info <n> > <path>sed -n <path>Requested script or workload execution related to benchmark & validation setup.
1 call · #0107–#0107
python3 - <script>Requested environment setup or inspection, file and log inspection and workspace inspection related to checkpoints & weight state.
1 call · #0108–#0108
env <vars>cat > <path> <script>printf <flag> <args>echo <val>ls <val>echo <flag>cat <path>Requested script or workload execution, source searches and file and log inspection related to device memory.
1 call · #0109–#0109
date -upython3 -c <script>echo <val>grep <flag> <args>tail -n <n>ls -l -a <path> <n> > <path>grep -v -i -E <val>head -n <n>Requested source searches and file and log inspection related to device memory.
1 call · #0110–#0110
cd <path>echo <path>grep -r -n <val> <path> <path> <n> > <path>head -n <n>echo <val>grep -r -n <val> <path> <n> > <path>Requested file and log inspection and source searches related to rollout generation.
1 call · #0111–#0111
cd <path>echo <val>sed -n <val> <path>grep -n <val> <path>head -n <n>Requested file and log inspection and source searches related to source & workspace.
1 call · #0112–#0112
cd <path>echo <val>sed -n <path> <path>echogrep -n <val> <path>Requested file and log inspection, source searches and workspace inspection related to device memory.
2 calls · #0113–#0114
cd <path>echo <val>sed -n <val> <path>echogrep -r -n <val> <path> <path> <n> > <path>head -n <n>ls <path>headRequested source searches related to kv-cache management.
1 call · #0115–#0115
cd <path>echo <path>grep -n <val> <path>echo <val>grep -n <flag> <args>Requested script or workload execution, source searches and file and log inspection related to device memory.
1 call · #0116–#0116
date -upython3 -c <script>echo <val>grep <flag> <args>tail -n <n>echo <path>ls -l -a <path> <path> <n> > <path>npu-smi info <n> > <path>sed -n <path>head -n <n>Requested file and log inspection related to device memory.
1 call · #0117–#0117
cd <path>sed -n <val> <path>Requested script or workload execution related to parallelism & communication.
1 call · #0118–#0118
python3 - <script>Requested script or workload execution, source searches and file and log inspection related to device memory.
2 calls · #0119–#0120
date -upython3 -c <script>echo <val>grep <flag> <args>tail -n <n>ls -l -a <path> <path> <n> > <path>grep -v -i -E <val>head -n <n>ls -l -a <path> <n> > <path>npu-smi info <n> > <path>sed -n <path>Requested repository inspection and file and log inspection related to source & workspace.
1 call · #0121–#0121
<command> <args>echo <val>echo <flag>git -C <path> <val> <flag> <args>head -n <n>Requested script or workload execution and file and log inspection related to reward & policy updates.
1 call · #0122–#0122
cd <path>timeout <n> <val> -m <val> <path> <path> -q <flag> <args>tail -n <n>Requested file and log inspection and source searches related to task requirements.
1 call · #0123–#0123
cd <path>echo <val>wc -l <path> <path>grep -n <val> <path>tail -n <n>Requested script or workload execution, source searches and file and log inspection related to device memory.
1 call · #0124–#0124
date -upython3 -c <script>echo <val>grep <flag> <args>tail -n <n>ls -l -a <path> <n> > <path>wc -c <path> <n> > <path>tail -c <n> <path> <n> > <path>echogrep -v -i -E <val>head -n <n>Requested file and log inspection, script or workload execution and source searches related to checkpoints & weight state.
2 calls · #0125–#0126
df -h <val> <path> <n> > <path>head -n <n>echo <val>python3 -c <script>grep -n <val> <path>echosed -n <path> <path>cd <path>Requested script or workload execution, source searches and file and log inspection related to device memory.
1 call · #0127–#0127
date -upython3 -c <script>echo <val>grep <flag> <args>tail -n <n>ls -l -a <path> <n> > <path>tail -c <n> <path> <n> > <path>echogrep -v -i -E <val>head -n <n>Requested source searches and file and log inspection related to source & workspace.
2 calls · #0128–#0129
cd <path>echo <val>grep -n <val> -A <n> <path>grep -r -n -A <n> <val> --include <path> <path>grep <flag> <args>head -n <n>grep -r -n <val> <path> <path> <n> > <path>Requested script or workload execution related to reward & policy updates.
1 call · #0130–#0130
cd <path>timeout <n> <val> <val> <script>Requested script or workload execution, source searches and file and log inspection related to device memory.
1 call · #0131–#0131
date -upython3 -c <script>echo <val>grep <flag> <args>tail -n <n>ls -l -a <path> <n> > <path>tail -c <n> <path> <n> > <path>echogrep -v -i -E <val>head -n <n>Requested file and log inspection and source searches related to checkpoints & weight state.
1 call · #0132–#0132
cd <path>sed -n <path> <path>grep -n <val>Requested source searches and file and log inspection related to source & workspace.
1 call · #0133–#0133
cd <path>echo <val>grep -n <val> -A <n> <path>sed -n <path> <path>Requested source searches related to benchmark & validation setup.
1 call · #0134–#0134
echo <val>grep -n <val> <path>cd <path>echo <path>Requested script or workload execution, source searches and file and log inspection related to device memory.
1 call · #0135–#0135
date -upython3 -c <script>echo <val>grep <flag> <args>tail -n <n>ls -l -a <path> <n> > <path>tail -c <n> <path> <n> > <path>echogrep -v -i -E <val>head -n <n>Requested source searches and script or workload execution related to benchmark & validation setup.
1 call · #0136–#0136
cd <path>echo <val>echo <path>grep -n <val> <path>python3 -c <script>Requested source searches and file and log inspection related to batching & scheduling.
1 call · #0137–#0137
cd <path>echo <val>grep -n <val> -A <n> <path>sed -n <val>Requested source searches and file and log inspection related to device memory.
1 call · #0138–#0138
echo <val>grep <flag> <args>sort -uhead -n <n>Requested script or workload execution, source searches and file and log inspection related to rollout generation.
1 call · #0139–#0139
python3 - <script>echo <path>grep <flag> <args>head -n <n>echo <val>Requested environment setup or inspection, file and log inspection and source searches related to benchmark & validation setup.
3 calls · #0140–#0142
env <vars>echo <val>wc -c <val>awk <path> <val>grep -v -E <val>tail -n <n>ls -l -a <val> <n> > <path>head -n <n>ls -l -a <path> <n> > <path>find <path> -name <val> <n> > <path>wc -c <path>tail -n <n> <path>cut <flag>echoRequested script or workload execution related to source & workspace.
1 call · #0143–#0143
date -upython3 -c <script>Requested environment setup or inspection, source searches and file and log inspection related to benchmark & validation setup.
1 call · #0144–#0144
env <vars>echo <val>grep <flag> <args>grep -v -i -E <val>tail -n <n>Requested script or workload execution and workspace file updates related to reward & policy updates.
1 call · #0145–#0145
cd <path>python3 - <script>echo <val>mkdir -p <path>rm -rf <path><command> <args>echo <val> >> <path>Requested script or workload execution related to source & workspace.
1 call · #0146–#0146
date -upython3 -c <script>Requested script or workload execution related to reward & policy updates.
2 calls · #0147–#0148
python3 - <script>Requested script or workload execution related to benchmark & validation setup.
1 call · #0149–#0149
date -upython3 -c <script>Requested source searches, file and log inspection and workspace inspection related to reward & policy updates.
1 call · #0150–#0150
echo <val>grep <flag> <args>cut <flag>tail -n <n>ls -l -a <path> <n> > <path>tail -c <n> <path> <n> > <path>echoRequested script or workload execution, workspace inspection and source searches related to benchmark & validation setup.
1 call · #0151–#0151
python3 - <script>echo <val>ls -l -a <path> <n> > <path>grep -n <val> <path>head -n <n>Requested workspace file updates, workspace inspection and script or workload execution related to reward & policy updates.
1 call · #0152–#0152
mkdir -p <path>cp <path> <path> <n> > <path>echo <val>ls <path>rm -f <path> <path>rm -rf <path>cd <path>timeout <n> <val> <path> > <path> <n> >& <path>echo <val> >> <path>Requested script or workload execution related to benchmark & validation setup.
1 call · #0153–#0153
date -upython3 -c <script>Requested script or workload execution, environment setup or inspection and source searches related to device memory.
1 call · #0154–#0154
date -upython3 -c <script>env <vars>echo <path>grep <flag> <args>cut <flag>tail -n <n>echo <val>sort -uhead -n <n>ls -l -a <path> <path> <n> > <path>npu-smi info <n> > <path>sed -n <path>Requested environment setup or inspection, workspace inspection and source searches related to checkpoints & weight state.
1 call · #0155–#0155
env <vars>echo <val>ls <val> <n> > <path>echoecho <path><command> <args>grep -n <val> <path>head -n <n>df -h <val>tail -n <n>Requested script or workload execution related to reward & policy updates.
1 call · #0156–#0156
python3 - <script>Requested script or workload execution, environment setup or inspection and source searches related to device memory.
1 call · #0157–#0157
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>sort -uhead -n <n>wc -c <path> <n> > <path>ls -l -a <path> <n> > <path>npu-smi info <n> > <path>sed -n <path>Requested script or workload execution related to reward & policy updates.
1 call · #0158–#0158
python3 - <script>Requested source searches and file and log inspection related to checkpoints & weight state.
1 call · #0159–#0159
cd <path>echo <val>grep -r -n <val> -A <n> <path>head -n <n>echoRequested script or workload execution related to checkpoints & weight state.
1 call · #0160–#0160
cd <path>python3 - <script>Requested script or workload execution, environment setup or inspection and source searches related to device memory.
1 call · #0161–#0161
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>sort -uhead -n <n>echo <path>wc -c <path> <n> > <path>ls -l -a <path> <n> > <path>grep -v -i -E <val>npu-smi info <n> > <path>sed -n <path>Requested file and log inspection and source searches related to checkpoints & weight state.
2 calls · #0162–#0163
cd <path>echo <val>sed -n <val> <path>grep -n -E <val>echogrep -r -n <val> <path>head -n <n>grep -n <val> <path>sed -n <path> <path>Requested script or workload execution, environment setup or inspection and source searches related to device memory.
1 call · #0164–#0164
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>sort -uhead -n <n>echo <path>wc -c <path> <n> > <path>ls -l -a <path> <n> > <path>grep -v -i -E <val>npu-smi info <n> > <path>sed -n <path>Requested script or workload execution related to checkpoints & weight state.
1 call · #0165–#0165
python3 - <script>Requested environment setup or inspection, file and log inspection and workspace inspection related to reward & policy updates.
1 call · #0166–#0166
env <vars>cat > <path> <script>printf <flag> <args>echo <val>ls <val>echo <flag>cat <path>Requested script or workload execution, environment setup or inspection and source searches related to device memory.
1 call · #0167–#0167
date -upython3 -c <script>env <vars>echo <path>grep <flag> <args>cut <flag>tail -n <n>echo <val>sort -uhead -n <n>wc -c <path> <n> > <path>ls -l -a <path> <n> > <path>tail -c <n> <path> <n> > <path>echogrep -v -i -E <val>Requested script or workload execution related to source & workspace.
1 call · #0168–#0168
cd <path>python3 - <script>Requested script or workload execution, environment setup or inspection and source searches related to device memory.
1 call · #0169–#0169
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>sort -uhead -n <n>echo <path>wc -c <path> <n> > <path>ls -l -a <path> <n> > <path>grep -v -i -E <val>npu-smi info <n> > <path>sed -n <path>Requested file and log inspection and source searches related to source & workspace.
1 call · #0170–#0170
cd <path>echo <val>sed -n <path> <path>grep -n -A <n> <val> <path>sed -n <path>head -n <n>grep -n <flag> <args>Requested script or workload execution, source searches and file and log inspection related to precision & numerical checks.
1 call · #0171–#0171
cd <path>timeout <n> <val> -c <val> <n> >& <path>grep -v -E <val>tail -n <n>Requested workspace inspection, file and log inspection and workspace file updates related to reward & policy updates.
1 call · #0172–#0172
ls -l -a <path> <n> > <path>echo <flag>head -c <n> <path> <n> > <path>echoecho <val>rm -f <path>echo <path>Requested script or workload execution, environment setup or inspection and source searches related to device memory.
1 call · #0173–#0173
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>sort -uecho <path>wc -c <path> <n> > <path>ls -l -a <path> <n> > <path>grep -v -i -E <val>head -n <n>tail -c <n> <path> <n> > <path>Requested script or workload execution related to checkpoints & weight state.
1 call · #0174–#0174
python3 - <script>Requested script or workload execution, source searches and file and log inspection related to source & workspace.
1 call · #0175–#0175
cd <path>python3 -c <script> <n> >& <path>grep -v -E <val>tail -n <n>Requested script or workload execution, environment setup or inspection and source searches related to device memory.
1 call · #0176–#0176
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>sort -uecho <path>wc -c <path> <n> > <path>ls -l -a <path> <n> > <path>tail -c <n> <path> <n> > <path>echogrep -v -i -E <val>head -n <n>Requested script or workload execution related to attention kernels.
1 call · #0177–#0177
python3 -c <script>Requested file and log inspection and workspace inspection related to checkpoints & weight state.
1 call · #0178–#0178
echo <val>df -h <path> <path> <n> > <path>head -n <n>echo <path>ls -d <path> <n> > <path>du <flag> <args>tail -n <n>df -h <val>Requested repository inspection and file and log inspection related to source & workspace.
1 call · #0179–#0179
<command> <args>echo <val>echo <flag>git -C <path> <val> <flag> <args>awk <val>Requested source searches, script or workload execution and file and log inspection related to reward & policy updates.
1 call · #0180–#0180
cd <path>echo <val>grep -n <val> <path>echopython3 - <script>echo <path><command> <args>grep -c <val>grep -n <val> -B <n> <path>head -n <n>Requested script or workload execution, environment setup or inspection and source searches related to device memory.
1 call · #0181–#0181
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>sortuniq -cecho <path>wc -c <path> <n> > <path>ls -l -a <path> <n> > <path>grep -v -i -E <val>head -n <n>npu-smi info <n> > <path>sed -n <path>Requested source searches and file and log inspection related to reward & policy updates.
1 call · #0182–#0182
echo <val>grep -n <val> <path>head -n <n>echocd <path>sed -n <path> <path>grep <flag> <args>tr -d <val>sed <path>Requested script or workload execution, environment setup or inspection and source searches related to device memory.
1 call · #0183–#0183
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>ls -l -a <path> <n> > <path>tail -c <n> <path> <n> > <path>echogrep -v -i -E <val>head -n <n>Requested script or workload execution related to checkpoints & weight state.
1 call · #0184–#0184
python3 - <script>Requested source searches and file and log inspection related to checkpoints & weight state.
1 call · #0185–#0185
echo <val>grep -n <val> -A <n> <path>echosed -n <path> <path>grep -E <val>head -n <n>cd <path>grep -n <val> <path>Requested script or workload execution, environment setup or inspection and source searches related to device memory.
1 call · #0186–#0186
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>ls -l -a <path> <n> > <path>tail -c <n> <path> <n> > <path>echogrep -v -i -E <val>head -n <n>Requested script or workload execution and file and log inspection related to attention kernels.
1 call · #0187–#0187
python3 -c <script> <n> > <path>echo <val>cat > <path> <script>python3 <script> <path> <path>Requested environment setup or inspection, workspace inspection and file and log inspection related to checkpoints & weight state.
1 call · #0188–#0188
env <vars>echo <val><command> <args>echols -l -a <path> <n> > <path>echo <path>ls -d <path> <path> <n> > <path>df -h <val>tail -n <n>Requested workspace file updates, script or workload execution and execution waits related to benchmark & validation setup.
2 calls · #0189–#0190
cp <path> <path>cp <path> <path> <n> > <path>echo <val>cd <path>timeout <n> <val> <path> > <path> <n> >& <path>echo <val> >> <path>sleep <n>python3 <script> <path> <path>Requested script or workload execution related to checkpoints & weight state.
2 calls · #0191–#0192
python3 - <script>Requested script or workload execution, environment setup or inspection and source searches related to checkpoints & weight state.
1 call · #0193–#0193
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>ls -l -a <path> <path> <path> <n> > <path>du <flag> <args>grep -v -i -E <val>head -n <n>Requested environment setup or inspection, script or workload execution and file and log inspection related to checkpoints & weight state.
1 call · #0194–#0194
env <vars>python3 - <script>echo <flag>cat <path>Requested script or workload execution, environment setup or inspection and source searches related to checkpoints & weight state.
1 call · #0195–#0195
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>sort -uhead -n <n>ls -l -a <path> <path> <n> > <path>echo <path>du <flag> <args>grep -v -i -E <val>Requested script or workload execution related to reward & policy updates.
1 call · #0196–#0196
cd <path>python3 - <script>Requested source searches and file and log inspection related to benchmark & validation setup.
1 call · #0197–#0197
cd <path>echo <path>grep -n -B <n> -A <n> <val> <path>echoecho <val>grep -n <val> <path>grep -n <val> -A <n> <path>head -n <n>Requested script or workload execution and file and log inspection related to reward & policy updates.
1 call · #0198–#0198
cd <path>timeout <n> <val> -m <val> <path> <path> -q <flag> <args>tail -n <n>Requested script or workload execution, environment setup or inspection and source searches related to checkpoints & weight state.
1 call · #0199–#0199
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>sort -uhead -n <n>wc -c <path> <n> > <path>echo <path>ls -l -a <path> <n> > <path>du <flag> <args>grep -v -i -E <val>Requested file and log inspection, source searches and workspace inspection related to benchmark & validation setup.
1 call · #0200–#0200
echo <val>cat <path>echogrep -n <val> <path>grep -i -E <val>head -n <n>echo <path>ls <path>Requested workspace inspection, file and log inspection and source searches related to source & workspace.
1 call · #0201–#0201
cd <path>echo <val>find <val> -name <path> <n> > <path>head -n <n>echoecho <path>grep -i -E <val>find <val> -name <val> <n> > <path>Requested file and log inspection and script or workload execution related to checkpoints & weight state.
1 call · #0202–#0202
cat > <path> <script>echo <val>python3 <script> <path> <n> >& <path>head -n <n>Requested script or workload execution and file and log inspection related to reward & policy updates.
1 call · #0203–#0203
cd <path>timeout <n> <val> -m <val> <path> <path> <path> <path> -q <flag> <args>tail -n <n>Requested script or workload execution, environment setup or inspection and source searches related to checkpoints & weight state.
1 call · #0204–#0204
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>sort -uhead -n <n>wc -c <path> <n> > <path>echo <path>ls -l -a <path> <n> > <path>du <flag> <args>grep -v -i -E <val>npu-smi info <n> > <path>sed -n <path>Requested environment setup or inspection and file and log inspection related to source & workspace.
1 call · #0205–#0205
env <vars>tail -n <n> <val> <n> > <path>echo <val>Requested script or workload execution, environment setup or inspection and source searches related to checkpoints & weight state.
4 calls · #0206–#0209
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>sort -uhead -n <n>wc -c <path> <n> > <path>echo <path>ls -l -a <path> <n> > <path>du <flag> <args>grep -v -i -E <val>python3 - <script>npu-smi info <n> > <path>sed -n <path>Requested script or workload execution related to source & workspace.
1 call · #0210–#0210
cd <path>python3 - <script>Requested workspace inspection, file and log inspection and source searches related to checkpoints & weight state.
2 calls · #0211–#0212
echo <val>ls -d <path> <n> > <path>du <flag> <args>echocd <path>sed -n <path> <path>head -n <n>echo <path>ls -l -a <path> <n> > <path>grep -n <val> <path>grep -n <val> -A <n> <path>date -upython3 -c <script>env <vars>grep <flag> <args>cut <flag>tail -n <n>sort -uwc -c <path> <n> > <path>grep -v -i -E <val>Requested file and log inspection and source searches related to source & workspace.
1 call · #0213–#0213
cd <path>echo <val>sed -n <path> <path>head -n <n>grep -n <val> <path>Requested script or workload execution, environment setup or inspection and source searches related to checkpoints & weight state.
1 call · #0214–#0214
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>echo <path>head -n <n>wc -c <path> <n> > <path>ls -l -a <path> <n> > <path>du <flag> <args>grep -v -i -E <val>npu-smi info <n> > <path>sed -n <path>Requested file and log inspection, repository inspection and workspace inspection related to runtime processes.
1 call · #0215–#0215
echo <val><command> <args>sed <path>echowc -l <path> <path>echo <path>git -C <path> <val> <flag> <args>awk <val>ls -l -a <path> <path> <n> > <path>Requested script or workload execution, environment setup or inspection and source searches related to checkpoints & weight state.
1 call · #0216–#0216
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>echo <path>head -n <n>ls -l -a <path> <n> > <path>du <flag> <args>grep -v -i -E <val>tail -c <n> <path> <n> > <path>Requested script or workload execution related to checkpoints & weight state.
1 call · #0217–#0217
python3 - <script>Requested file and log inspection and script or workload execution related to reward & policy updates.
1 call · #0218–#0218
cat > <path> <script>echo <path>python3 -c <script>Requested script or workload execution, environment setup or inspection and source searches related to checkpoints & weight state.
2 calls · #0219–#0220
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>echo <path>head -n <n>ls -l -a <path> <n> > <path>du <flag> <args>grep -v -i -E <val>Requested environment setup or inspection, workspace inspection and file and log inspection related to checkpoints & weight state.
1 call · #0221–#0221
env <vars>echo <val>find <path> -maxdepth <n> <n> > <path>head -n <n>echodu <flag> <args><command> <args>ls -l -a <path> <n> > <path>df -h <val>tail -n <n>Requested workspace inspection, source searches and file and log inspection related to benchmark & validation setup.
1 call · #0222–#0222
echo <val>ls -l -a <path> <path> <n> > <path>grep -v -E <val>head -n <n>echopython3 -c <script>ls -l -a <path> <n> > <path>Requested script or workload execution, environment setup or inspection and source searches related to checkpoints & weight state.
1 call · #0223–#0223
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>ls -l -a <path> <n> > <path>echo <path>ls -l -a <path> <path> <n> > <path>grep -v -i -E <val>head -n <n>npu-smi info <n> > <path>sed -n <path>Requested environment setup or inspection, source searches and file and log inspection related to benchmark & validation setup.
1 call · #0224–#0224
env <vars>echo <val><command> <args>echogrep -n <path> -A <n> <path>head -n <n>ls -l -a <path> <n> > <path>python3 -c <script>Requested environment setup or inspection and script or workload execution related to checkpoints & weight state.
1 call · #0225–#0225
env <vars>python3 - <val> <script>Requested script or workload execution, environment setup or inspection and source searches related to checkpoints & weight state.
3 calls · #0226–#0228
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>sort -uhead -n <n>wc -c <path> <n> > <path>ls -l -a <path> <n> > <path>grep -v -i -E <val>npu-smi info <n> > <path>sed -n <path>sed <path>echodf -h <path>du <flag> <args>Requested source searches and script or workload execution related to benchmark & validation setup.
1 call · #0229–#0229
echo <path>grep -n <val> -B <n> -A <n> <path>echoecho <val>python3 -c <script>Requested environment setup or inspection, workspace inspection and file and log inspection related to checkpoints & weight state.
1 call · #0230–#0230
env <vars>echo <val>ls <path> <n> > <path>head -n <n><command> <args>echoecho <path>ls -d <path> <path> <n> > <path>cat <path> <n> > <path>python3 -c <script>Requested script or workload execution, environment setup or inspection and source searches related to device memory.
1 call · #0231–#0231
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>sort -uwc -c <path> <n> > <path>head -n <n>ls -l -a <path> <n> > <path>grep -v -i -E <val>npu-smi info <n> > <path>sed -n <path>Requested environment setup or inspection and script or workload execution related to checkpoints & weight state.
1 call · #0232–#0232
env <vars>echo <val>python3 -c <script> <n> > <path>echoRequested workspace inspection, file and log inspection and source searches related to reward & policy updates.
1 call · #0233–#0233
echo <val>ls -l -a <path> <path> <n> > <path>awk <val>echols -l -a <path> <n> > <path>grep -v <val>tail -n <n>ls <val> <n> > <path>sed <path>git -C <path> <val> <flag> <args>wc -l <path>Requested file and log inspection and source searches related to source & workspace.
1 call · #0234–#0234
echo <val>cat <path> <n> > <path>echogrep -n <val> -B <n> <path>head -n <n>Requested script or workload execution related to reward & policy updates.
1 call · #0235–#0235
python3 - <script>Requested script or workload execution, environment setup or inspection and source searches related to device memory.
2 calls · #0236–#0237
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>sort -uwc -c <path> <n> > <path>head -n <n>ls -l -a <path> <n> > <path>grep -v -i -E <val>tail -c <n> <path> <n> > <path>npu-smi info <n> > <path>sed -n <path>Requested file and log inspection and source searches related to checkpoints & weight state.
1 call · #0238–#0238
echo <val>sed -n <path> <path>echogrep -n <path> -A <n> <path>head -n <n>grep <flag> <args>echo <path>grep -n <val> -A <n> <path>Requested file and log inspection, workspace inspection and script or workload execution related to checkpoints & weight state.
1 call · #0239–#0239
echo <val>echoecho <path>df -h <path>tail -n <n>du <flag> <args>ls -d <path> <path> <path> <n> > <path>sed <path>python3 -c <script>Requested script or workload execution, environment setup or inspection and source searches related to device memory.
1 call · #0240–#0240
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>sort -uwc -c <path> <n> > <path>head -n <n>ls -l -a <path> <n> > <path>grep -v -i -E <val>Requested source searches, file and log inspection and runtime inspection related to reward & policy updates.
2 calls · #0241–#0242
echo <val><command> <args>grep <val>head -n <n>echopgrep <flag> <args>grep -n <val> -B <n> <path>grep -n <val> -A <n> <path>cd <path>sed -n <path> <path>grep -n -B <n> -A <n> <val> <path>Requested script or workload execution, environment setup or inspection and source searches related to device memory.
1 call · #0243–#0243
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>sort -uwc -c <path> <n> > <path>head -n <n>ls -l -a <path> <n> > <path>grep -v -i -E <val>npu-smi info <n> > <path>sed -n <path>Requested file and log inspection, workspace file updates and script or workload execution related to benchmark & validation setup.
1 call · #0244–#0244
cat > <path> <script>chmod <val> <path>bash -n <script>echo <val>ls -l -a <path> <path> <n> > <path>awk <val>Requested script or workload execution and source searches related to checkpoints & weight state.
1 call · #0245–#0245
echo <val>python3 -c <script>echoecho <path>grep -n <val> <path>Requested workspace file updates, file and log inspection and script or workload execution related to benchmark & validation setup.
1 call · #0246–#0246
cp <path> <path>echo <path>cat > <path> <script>chmod <val> <path>bash -n <script>echo <val>Requested script or workload execution, environment setup or inspection and source searches related to device memory.
2 calls · #0247–#0248
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>sort -uwc -c <path> <n> > <path>head -n <n>ls -l -a <path> <n> > <path>grep -v -i -E <val>echo <path>npu-smi info <n> > <path>sed -n <path>Requested workspace file updates, script or workload execution and file and log inspection related to source & workspace.
1 call · #0249–#0249
rm -rf <path>mkdir -p <path>cp <path> <path>python3 - <script>echoecho <val>diff -u <path> <path>head -n <n>diff -q <path> <path>Requested environment setup or inspection, file and log inspection and workspace inspection related to reward & policy updates.
1 call · #0250–#0250
env <vars>cat > <path> <script>printf <flag> <args>echo <val>ls <val>sed <path>echo <flag>cat <path>Requested script or workload execution, environment setup or inspection and source searches related to device memory.
1 call · #0251–#0251
date -upython3 -c <script>env <vars>echo <path>grep <flag> <args>cut <flag>tail -n <n>echo <val>sort -uwc -c <path> <n> > <path>head -n <n>ls -l -a <path> <n> > <path>grep -v -i -E <val>Requested script or workload execution, source searches and file and log inspection related to source & workspace.
1 call · #0252–#0252
python3 -m <module> <script>echo <val>diff <path> <path>grep -E <val>wc -lsed <path>grep -c <val> <path>rm -rf <path>ls -l -a <path>awk <val>diff -q <path> <path>Requested workspace inspection, source searches and file and log inspection related to reward & policy updates.
1 call · #0253–#0253
echo <val>echo <flag>ls -l -a <path> <n> > <path>grep -v <val>tail -n <n>du <flag> <args>ls -d <path> <n> > <path>sed <path>echoecho <path><command> <args>wc <flag>printf <val> <val> <val>ls -l -a <path>Requested script or workload execution, environment setup or inspection and source searches related to device memory.
1 call · #0254–#0254
date -upython3 -c <script>env <vars>echo <path>grep <flag> <args>cut <flag>tail -n <n>echo <val>sort -uwc -c <path> <n> > <path>head -n <n>ls -l -a <path> <n> > <path>grep -v -i -E <val>npu-smi info <n> > <path>sed -n <path>Requested environment setup or inspection, workspace inspection and source searches related to reward & policy updates.
2 calls · #0255–#0256
env <vars>echo <val><command> <args>echols -l -a <path> <n> > <path>grep -v <val>tail -n <n>python3 -c <script> <n> > <path>echo <path>ls <path> <n> > <path>sed <path>python3 - <script>Requested workspace file updates and script or workload execution related to benchmark & validation setup.
1 call · #0257–#0257
cp <path> <path> <n> > <path>echo <val>rm -f <path> <path>cd <path>timeout <n> <val> <path> > <path> <n> >& <path>echo <val> >> <path>Requested execution waits, script or workload execution and file and log inspection related to checkpoints & weight state.
1 call · #0258–#0258
sleep <n>python3 <script> <path> <n> >& <path>head -n <n>echoecho <val>python3 -c <script>Requested script or workload execution, environment setup or inspection and source searches related to device memory.
1 call · #0259–#0259
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>sort -uwc -c <path> <n> > <path>head -n <n>ls -l -a <path> <n> > <path>grep -v -i -E <val>Requested script or workload execution related to checkpoints & weight state.
1 call · #0260–#0260
python3 - <script>Requested script or workload execution related to benchmark & validation setup.
1 call · #0261–#0261
python3 - <script>Requested script or workload execution, environment setup or inspection and source searches related to device memory.
1 call · #0262–#0262
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>sort -uwc -c <path> <n> > <path>head -n <n>ls -l -a <path> <n> > <path>grep -v -i -E <val>npu-smi info <n> > <path>sed -n <path>Requested file and log inspection, source searches and repository inspection related to source & workspace.
1 call · #0263–#0263
echo <val><command> <args>echo <path>diff -u <path> <path>head -n <n>echogrep -c <val> <path>sed <path>git -C <path> <val> <flag> <args>wc -l <path>wc <flag>printf <val> <val> <val>python3 -c <script>Requested environment setup or inspection, file and log inspection and workspace inspection related to checkpoints & weight state.
1 call · #0264–#0264
env <vars>echo <val>du <flag> <args>sed <path>ls -d <path> <path> <path> <n> > <path>echo <path>echols -l -a <path> <n> > <path>awk <val>df -h <path>tail -n <n>ls -d <path> <n> > <path>pgrep <flag> <args>head -n <n>Requested script or workload execution, environment setup or inspection and source searches related to device memory.
1 call · #0265–#0265
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>sort -uwc -c <path> <n> > <path>head -n <n>ls -l -a <path> <n> > <path>grep -v -i -E <val>Requested script or workload execution related to checkpoints & weight state.
1 call · #0266–#0266
python3 - <script>Requested workspace inspection, file and log inspection and runtime inspection related to benchmark & validation setup.
1 call · #0267–#0267
echo <val>ls -d <path> <n> > <path>sed <path>echopgrep <flag> <args>cut <flag>echo <path>grep <flag> <args>sort -ugrep -n <val> <path>wc -lRequested script or workload execution, environment setup or inspection and source searches related to device memory.
1 call · #0268–#0268
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>sort -uwc -c <path> <n> > <path>head -n <n>ls -l -a <path> <n> > <path>grep -v -i -E <val>tail -c <n> <path> <n> > <path>Requested script or workload execution, file and log inspection and workspace inspection related to checkpoints & weight state.
1 call · #0269–#0269
echo <val>python3 -c <script>echo<command> <args>du <flag> <args>sed <path>ls -d <path> <path> <n> > <path>echo <path>ls <path> <n> > <path>xargs <flag> <args>Requested script or workload execution, environment setup or inspection and source searches related to reward & policy updates.
1 call · #0270–#0270
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>ls -l -a <path> <n> > <path>sort -uwc -c <path> <n> > <path>head -n <n>grep -v -i -E <val>Requested script or workload execution related to benchmark & validation setup.
1 call · #0271–#0271
echo <val>python3 -c <script>echoRequested script or workload execution, source searches and file and log inspection related to rollout generation.
1 call · #0272–#0272
cd <path>echo <val>python3 - <script>echogrep -n <val> <path>sed <path>Requested script or workload execution, environment setup or inspection and source searches related to reward & policy updates.
1 call · #0273–#0273
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>ls -l -a <path> <n> > <path>sort -uwc -c <path> <n> > <path>head -n <n>grep -v -i -E <val>npu-smi info <n> > <path>sed -n <path>Requested environment setup or inspection, script or workload execution and file and log inspection related to checkpoints & weight state.
1 call · #0274–#0274
env <vars>python3 - <script>echo <flag>cat <path>echosed -n <path> <path>head -n <n>Requested script or workload execution, environment setup or inspection and source searches related to reward & policy updates.
1 call · #0275–#0275
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>ls -l -a <path> <n> > <path>sort -uwc -c <path> <n> > <path>head -n <n>grep -v -i -E <val>Requested file and log inspection and source searches related to batching & scheduling.
1 call · #0276–#0276
cd <path>echo <val>sed -n <path> <path>echogrep <flag> <args>sed <path>grep -n <val> <path>grep -n <val> -A <n> <path>grep -n -E <val>Requested script or workload execution, environment setup or inspection and source searches related to reward & policy updates.
1 call · #0277–#0277
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>ls -l -a <path> <n> > <path>sort -uwc -c <path> <n> > <path>head -n <n>grep -v -i -E <val>Requested script or workload execution related to checkpoints & weight state.
1 call · #0278–#0278
python3 - <script>Requested script or workload execution, environment setup or inspection and source searches related to reward & policy updates.
1 call · #0279–#0279
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>ls -l -a <path> <n> > <path>sort -uwc -c <path> <n> > <path>head -n <n>grep -v -i -E <val>npu-smi info <n> > <path>sed -n <path>Requested workspace inspection, file and log inspection and script or workload execution related to reward & policy updates.
1 call · #0280–#0280
echo <val>ls -l -a <path> <n> > <path>awk <path>echols -l -a <path> <path> <n> > <path>awk <val><command> <args>sed <path>python3 -c <script>Requested script or workload execution, environment setup or inspection and source searches related to reward & policy updates.
1 call · #0281–#0281
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>ls -l -a <path> <n> > <path>sort -uwc -c <path> <n> > <path>head -n <n>tail -c <n> <path> <n> > <path>Requested environment setup or inspection, source searches and file and log inspection related to benchmark & validation setup.
1 call · #0282–#0282
echo <val>env <vars>grep <flag> <args>head -n <n>sed <path>cut <flag>tail -n <n>echoRequested script or workload execution, environment setup or inspection and source searches related to reward & policy updates.
1 call · #0283–#0283
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>ls -l -a <path> <n> > <path>sort -used <path>tail -c <n> <path> <n> > <path>Requested runtime inspection, file and log inspection and script or workload execution related to checkpoints & weight state.
2 calls · #0284–#0285
echo <val>pgrep <flag> <args>cut <flag>sed <path>echopython3 -c <script>pgrep -c -f <val> <n> > <path>ls -d <path> <path> <path> <n> > <path>ls -l -a <path> <n> > <path>du <flag> <args>echo <path>ls <path> <n> > <path>ls -d <path> <n> > <path><command> <args>wc <flag>printf <val> <val> <val>Requested script or workload execution, environment setup or inspection and source searches related to reward & policy updates.
1 call · #0286–#0286
date -upython3 -c <script>env <vars>echo <path>grep <flag> <args>cut <flag>tail -n <n>echo <val>ls -l -a <path> <n> > <path>tail -c <n> <path> <n> > <path>pgrep -c -f <val> <n> > <path>sed <path>Requested environment setup or inspection, file and log inspection and source searches related to device memory.
1 call · #0287–#0287
env <vars>echo <val>tail -n <n> <path> <n> > <path>cut <flag>echoecho <path>grep <flag> <args>sed <path>npu-smi info <n> > <path>sed -n <path>head -n <n>Requested script or workload execution, environment setup or inspection and source searches related to reward & policy updates.
1 call · #0288–#0288
date -upython3 -c <script>env <vars>echo <val>grep <flag> <args>cut <flag>tail -n <n>ls -l -a <path> <n> > <path>sed <path>tail -c <n> <path> <n> > <path>Requested environment setup or inspection, source searches and file and log inspection related to benchmark & validation setup.
3 calls · #0289–#0291
echo <val>env <vars>grep <flag> <args>tail -n <n>sed <path>echo <path>head -n <n>cut <flag>echopython3 -c <script><command> <args>sleep <n>date -uls -l -a <path> <n> > <path>tail -c <n> <path> <n> > <path>pgrep -c -f <val> <n> > <path>Requested script or workload execution related to checkpoints & weight state.
1 call · #0292–#0292
python3 - <script>Requested script or workload execution, file and log inspection and workspace inspection related to checkpoints & weight state.
1 call · #0293–#0293
cd <path>timeout <n> <val> <path> <n> >& <path>tail -n <n>python3 -c <script>echo <val>ls -d <path> <path> <path> <n> > <path>echo <path>ls <path>xargs <flag> <args>sed <path>df -h <path>npu-smi info <n> > <path>sed -n <path>head -n <n>Requested repository inspection, file and log inspection and script or workload execution related to source & workspace.
1 call · #0294–#0294
echo <path>git -C <path> <val> <flag> <args>sed <path>echoecho <val><command> <args>wc <flag>printf <val> <val> <val>python3 -c <script>cd <path>python3 -c <script> <n> >& <path>tail -n <n>wc -l <path>ls <path>Requested script or workload execution related to checkpoints & weight state.
1 call · #0295–#0295
python3 - <script>Requested file and log inspection, workspace file updates and workspace inspection related to reward & policy updates.
1 call · #0296–#0296
echo <val>du <flag> <args>sed <path>rm -rf <path>rm -f <path> <path> <path> <path> <path>rm -rf <path> <path>rm -rf <path> <path> <n> > <path>ls -l -a <path> <path> <n> > <path>grep -v -E <val>ls -d <path> <path> <path> <n> > <path>Requested script or workload execution, source searches and file and log inspection related to source & workspace.
1 call · #0297–#0297
cd <path>timeout <n> <val> -c <val> > <path> <n> > <path>echo <val>echo <flag>grep -a <val> <path>grep <flag> <args>head -n <n>trueecho <path>rm -f <path> <path>03 / CANDIDATE ARTIFACT
Read code changes as Git diffs. Identifying strings are masked; binary files are listed by their full relative names.
Base commit: 0b2151ec61de5d99e0811b01c09e43a99a23e69d
@@ -0,0 +1,14 @@+# Copyright 2024 Bytedance Ltd. and/or its affiliates+#+# Licensed under the Apache License, Version 2.0 (the "License");+# you may not use this file except in compliance with the License.+# You may obtain a copy of the License at+#+# http://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing, software+# distributed under the License is distributed on an "AS IS" BASIS,+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+# See the License for the specific language governing permissions and+# limitations under the License.+"""Framework-owned online RL runtimes driven by an external host contract."""@@ -0,0 +1,1374 @@+# Copyright 2024 Bytedance Ltd. and/or its affiliates+#+# Licensed under the Apache License, Version 2.0 (the "License");+# you may not use this file except in compliance with the License.+# You may obtain a copy of the License at+#+# http://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing, software+# distributed under the License is distributed on an "AS IS" BASIS,+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+# See the License for the specific language governing permissions and+# limitations under the License.+"""Framework-owned online GRPO/RLVR runtime for colocated Ascend execution.++The host supervises this process over a Unix stream socket and starts its+monotonic timer at the ``start`` boundary. Everything that does not depend on+the timed workload - model construction, rollout engine launch, graph capture,+kernel warmup and the initial rollout-policy refresh - is completed before the+runtime answers ``ready``, so the measured interval contains online work only.++Two structural differences from a plain synchronous reference loop:++1. The rollout engine stays resident. Its key-value cache is sized for the+ real concurrency ceiling instead of the whole device, so the engine never+ has to release and re-acquire device memory around a weight refresh.+2. Compilation, capture and allocation happen during startup, driven by+ synthetic batches shaped like the real ones. Warmup never steps the+ optimizer, so the timed run still begins from the supplied policy.++Numerical semantics (sampling, deterministic reward, group-normalized+advantages, clipped token-mean actor loss, AdamW, BF16 compute with FP32 master+parameters, full rollout refresh after every update) are unchanged.+"""++from __future__ import annotations++import argparse+import asyncio+import hashlib+import json+import math+import os+import shutil+import socket+import sys+import time+import traceback+from collections.abc import Mapping+from pathlib import Path+from typing import Any+from urllib.request import Request, urlopen++MODEL_ID = "Qwen/Qwen3-1.7B"+RESPONSES_PER_PROMPT = 4+PROMPT_GROUPS_PER_UPDATE = 8+# Used only to shape warmup prompts, which run before the host supplies the+# workload. Warmup output is discarded and never scored or trained on.+WARMUP_SYSTEM_PROMPT = (+ "Solve the problem in at most three short sentences. "+ "End with the final numeric answer as \\boxed{number}, and do not continue after the box."+)+MAX_PROMPT_TOKENS = 256+MAX_RESPONSE_TOKENS = 256+GROUP_EPSILON = 1e-6+TEMPERATURE = 0.7+TOP_P = 0.8+TOP_K = 20++# Device budget for the resident rollout engine, as a fraction of total device+# memory. The timed workload needs at most `max_num_seqs` concurrent sequences+# of `max_model_len` tokens, which is a small fraction of an Ascend 910B's+# capacity; the remainder stays available for FSDP parameters, gradients and+# optimizer state, which are resident for the whole run.+ROLLOUT_MEMORY_FRACTION = 0.14+MAX_NUM_SEQS = 32+MAX_NUM_BATCHED_TOKENS = 4096+# Tokens per actor micro-batch. The clipped token-mean objective normalizes by+# the global token count, so micro-batch packing does not change the update.+ACTOR_MAX_TOKENS_PER_MICROBATCH = 4096+LOGPROB_MAX_TOKENS_PER_MICROBATCH = 4096+WEIGHT_SYNC_BUCKET_MEGABYTES = 1024+++DIAGNOSTIC_DIR = Path(os.environ.get("VERL_ONLINE_GRPO_DIAGNOSTIC_DIR", "/tmp/verl-online-grpo"))+++def _emit_diagnostic(action: str, result: dict[str, Any]) -> None:+ """Record gate outcomes and phase timings outside the host's result dir.++ Observability only. Any failure here is swallowed: it must never turn a+ successful run into a failed one.+ """+ try:+ _emit_diagnostic_unguarded(action, result)+ except Exception: # noqa: BLE001 - diagnostics must not affect the run+ traceback.print_exc()+++def _emit_diagnostic_unguarded(action: str, result: dict[str, Any]) -> None:+ gates = result.get("gates") or {}+ failed = sorted(name for name, value in gates.items() if not value)+ summary = {+ "action": action,+ "status": result.get("status"),+ "failed_gates": failed,+ "committed_updates": result.get("committed_updates"),+ "accepted_trajectories": result.get("accepted_trajectories"),+ "consumed_response_tokens": result.get("consumed_response_tokens"),+ "end_to_end_seconds": round(float(result.get("end_to_end_seconds") or 0.0), 3),+ "phase_timings": result.get("phase_timings"),+ "state_dtypes": result.get("state_dtypes"),+ "freshness": [+ {+ "policy_version": probe.get("policy_version"),+ "rollout_reported_version": probe.get("rollout_reported_version"),+ "max_abs_logprob_difference": probe.get("max_abs_logprob_difference"),+ }+ for probe in (result.get("freshness_probes") or [])+ ],+ "policy_versions": result.get("policy_versions"),+ }+ print("ONLINE_GRPO_SUMMARY " + json.dumps(summary, sort_keys=True), file=sys.stderr, flush=True)+ try:+ DIAGNOSTIC_DIR.mkdir(parents=True, exist_ok=True)+ (DIAGNOSTIC_DIR / f"run-result-{action}.json").write_text(+ json.dumps(result, indent=2, sort_keys=True) + "\n", encoding="utf-8"+ )+ except OSError:+ pass+++def _print_step_progress(values: dict[str, Any]) -> None:+ """Emit one per-update progress line; never raises."""+ try:+ print("ONLINE_GRPO_STEP " + json.dumps(values, sort_keys=True), file=sys.stderr, flush=True)+ except Exception: # noqa: BLE001 - progress logging must not affect the run+ pass+++def _load_json(path: Path) -> dict[str, Any]:+ value = json.loads(Path(path).read_text(encoding="utf-8"))+ if not isinstance(value, dict):+ raise RuntimeError(f"JSON object required: {path}")+ return value+++class ControlChannel:+ """Line-delimited JSON channel to the supervising host."""++ def __init__(self, path: str) -> None:+ self._socket = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)+ self._socket.connect(path)+ self._buffer = bytearray()++ def send(self, value: dict[str, Any]) -> None:+ payload = json.dumps(value, allow_nan=False, separators=(",", ":"))+ self._socket.sendall(payload.encode("utf-8") + b"\n")++ def receive(self) -> dict[str, Any]:+ while b"\n" not in self._buffer:+ chunk = self._socket.recv(65536)+ if not chunk:+ raise RuntimeError("host control connection closed")+ self._buffer.extend(chunk)+ line, _, rest = bytes(self._buffer).partition(b"\n")+ self._buffer = bytearray(rest)+ value = json.loads(line)+ if not isinstance(value, dict) or not isinstance(value.get("type"), str):+ raise RuntimeError("host control message is invalid")+ return value++ def close(self) -> None:+ try:+ self._socket.close()+ except OSError:+ pass+++def _score_responses(endpoint: tuple[str, str], items: list[tuple[str, str]]) -> list[float]:+ """Score generated responses with the host's deterministic verifier."""+ request = Request(+ endpoint[0] + "/score_batch",+ data=json.dumps(+ {+ "items": [+ {"prompt_id": prompt_id, "response_text": response_text}+ for prompt_id, response_text in items+ ]+ },+ allow_nan=False,+ separators=(",", ":"),+ ).encode("utf-8"),+ headers={+ "Authorization": f"Bearer {endpoint[1]}",+ "Content-Type": "application/json",+ },+ method="POST",+ )+ with urlopen(request, timeout=300) as response:+ payload = json.loads(response.read())+ rewards = payload.get("rewards") if isinstance(payload, dict) else None+ if (+ not isinstance(rewards, list)+ or len(rewards) != len(items)+ or any(+ isinstance(value, bool) or not isinstance(value, (int, float)) or float(value) not in {0.0, 1.0}+ for value in rewards+ )+ ):+ raise RuntimeError("reward endpoint returned invalid rewards")+ return [float(value) for value in rewards]+++def build_worker_class():+ """Build the actor worker class with the observation hooks the host needs.++ Imported lazily so the module can be introspected without a live runtime.+ """+ import torch++ from verl.single_controller.base.decorator import Dispatch, register+ from verl.utils import tensordict_utils as tu+ from verl.workers.engine_workers import ActorRolloutRefWorker++ class OnlineGRPOActorWorker(ActorRolloutRefWorker):+ """Actor/rollout worker with policy observation and warmup entry points."""++ @register(dispatch_mode=Dispatch.ONE_TO_ALL)+ def synchronize(self):+ torch.npu.synchronize()+ return True++ @register(dispatch_mode=Dispatch.ONE_TO_ALL)+ def policy_projection(self):+ terms = []+ parameter_count = 0+ tensor_count = 0+ for ordinal, parameter in enumerate(self.actor.engine.module.parameters()):+ local = parameter.detach()+ if hasattr(local, "to_local"):+ local = local.to_local()+ flat = local.reshape(-1)+ parameter_count += flat.numel()+ tensor_count += 1+ if flat.numel():+ for position in sorted({0, flat.numel() // 2, flat.numel() - 1}):+ terms.append(float(flat[position].float().cpu().item()) * ((ordinal + position) % 31 + 1) / 31)+ return {+ "value": math.fsum(terms),+ "logical_parameter_count": parameter_count,+ "parameter_tensor_count": tensor_count,+ }++ @register(dispatch_mode=Dispatch.ONE_TO_ALL)+ def state_dtypes(self):+ parameter_dtypes: dict[str, int] = {}+ optimizer_dtypes: dict[str, int] = {}+ for parameter in self.actor.engine.module.parameters():+ name = str(parameter.dtype).removeprefix("torch.")+ parameter_dtypes[name] = parameter_dtypes.get(name, 0) + parameter.numel()+ for state in self.actor.engine.optimizer.state.values():+ for value in state.values():+ if isinstance(value, torch.Tensor):+ name = str(value.dtype).removeprefix("torch.")+ optimizer_dtypes[name] = optimizer_dtypes.get(name, 0) + value.numel()+ return {"parameters": parameter_dtypes, "optimizer": optimizer_dtypes}++ @register(dispatch_mode=Dispatch.ONE_TO_ALL)+ def device_observation(self):+ return {+ "role": "actor",+ "current_device": int(torch.npu.current_device()),+ "visible_devices": os.environ.get("ASCEND_RT_VISIBLE_DEVICES", "not set"),+ }++ @register(dispatch_mode=Dispatch.ONE_TO_ALL)+ def warmup_actor(self, data):+ """Compile and allocate the training path without changing weights.++ Runs a full forward and backward so every kernel, autograd buffer+ and activation-checkpoint path used by the timed updates is+ resident, then discards the gradients. The optimizer is never+ stepped, so the policy is bit-identical afterwards.+ """+ engine = self.actor.engine+ defaults = dict(+ use_remove_padding=self.actor.model_config.get("use_remove_padding", False),+ use_dynamic_bsz=self.actor.engine_config.use_dynamic_bsz,+ max_token_len_per_gpu=self.actor.engine_config.max_token_len_per_gpu,+ micro_batch_size_per_gpu=self.actor.engine_config.micro_batch_size_per_gpu,+ use_fused_kernels=self.actor.engine_config.use_fused_kernels,+ )+ for key, value in defaults.items():+ if key not in data.keys():+ tu.assign_non_tensor(data, **{key: value})+ with engine.train_mode():+ engine.optimizer_zero_grad()+ engine.forward_backward_batch(data, loss_function=self.actor.loss_fn, forward_only=False)+ engine.optimizer_zero_grad()+ torch.npu.synchronize()+ return True++ @register(dispatch_mode=Dispatch.ONE_TO_ALL)+ def export_portable_actor(self, target_path: str, source_model_path: str):+ """Write a standard Transformers actor snapshot for external reload.++ Correctness-only: this runs outside the measured interval.+ """+ from safetensors.torch import save_file++ from verl.utils.fsdp_utils import get_fsdp_full_state_dict+ from verl.utils.model import convert_weight_keys++ module = self.actor.engine.module+ state_dict = get_fsdp_full_state_dict(module, offload_to_cpu=True, rank0_only=True)+ if torch.distributed.get_rank() != 0:+ torch.distributed.barrier()+ return None++ unwrapped = getattr(module, "_fsdp_wrapped_module", module)+ state_dict = convert_weight_keys(state_dict, unwrapped)+ source_config = _load_json(Path(source_model_path) / "config.json")+ tied = source_config.get("tie_word_embeddings") is True++ exported: dict[str, torch.Tensor] = {}+ for name, value in state_dict.items():+ if not isinstance(value, torch.Tensor):+ continue+ if tied and name == "lm_head.weight":+ # The tied embedding is the single source of truth; keeping a+ # duplicate would not match the reference tensor inventory.+ continue+ exported[name] = value.detach().to(torch.bfloat16).contiguous().cpu()++ target = Path(target_path)+ if target.exists():+ shutil.rmtree(target)+ target.mkdir(parents=True, exist_ok=True)+ save_file(exported, str(target / "model.safetensors"), metadata={"format": "pt"})+ (target / "config.json").write_text(+ json.dumps(source_config, indent=2, sort_keys=True) + "\n", encoding="utf-8"+ )+ result = {+ "path": str(target),+ "tensor_count": len(exported),+ "parameter_count": sum(value.numel() for value in exported.values()),+ }+ del exported+ del state_dict+ torch.distributed.barrier()+ return result++ return OnlineGRPOActorWorker+++def _worker_results(value: Any, *, expected: int) -> list[Any]:+ while isinstance(value, (list, tuple)) and len(value) == 1 and isinstance(value[0], (list, tuple)):+ value = value[0]+ if not isinstance(value, (list, tuple)) or len(value) != expected:+ raise RuntimeError(f"expected {expected} worker results")+ return list(value)+++def _aggregate_projection(value: Any) -> dict[str, Any]:+ workers = _worker_results(value, expected=2)+ return {+ "value": math.fsum(float(item["value"]) for item in workers),+ "logical_parameter_count": sum(int(item["logical_parameter_count"]) for item in workers),+ "parameter_tensor_count": sum(int(item["parameter_tensor_count"]) for item in workers),+ "worker_count": len(workers),+ }+++def _aggregate_state_dtypes(value: Any) -> dict[str, dict[str, int]]:+ workers = _worker_results(value, expected=2)+ result: dict[str, dict[str, int]] = {"parameters": {}, "optimizer": {}}+ for worker in workers:+ for state_kind in result:+ for dtype, count in worker[state_kind].items():+ result[state_kind][str(dtype)] = result[state_kind].get(str(dtype), 0) + int(count)+ return result+++def _numeric_metrics(raw: Any) -> dict[str, float]:+ if not hasattr(raw, "items"):+ raise RuntimeError("actor metrics are not a mapping")+ result: dict[str, float] = {}+ for name, value in raw.items():+ values = value if isinstance(value, list) else [value]+ numeric = []+ for item in values:+ if hasattr(item, "value"):+ item = item.value+ if hasattr(item, "item"):+ item = item.item()+ if isinstance(item, (int, float)) and not isinstance(item, bool):+ numeric.append(float(item))+ if numeric:+ result[str(name)] = math.fsum(numeric) / len(numeric)+ return result+++def build_config(+ model_path: Path,+ tokenizer_path: Path,+ source_root: Path,+ mini_batch_size: int,+ committed_updates: int,+):+ """Compose the actor/rollout configuration for the resident colocated plan.++ Numerics follow the public workload. The deviations from a sleep-based+ reference plan are deliberate and confined to placement and batching:+ the rollout key-value cache is sized for the real concurrency ceiling+ rather than the whole device, and the engine is never released, so a+ weight refresh does not pay a release/re-acquire cycle.+ """+ from hydra import compose, initialize_config_dir+ from omegaconf import open_dict++ config_dir = source_root / "verl/trainer/config"+ with initialize_config_dir(version_base=None, config_dir=str(config_dir)):+ config = compose(config_name="ppo_trainer", overrides=["actor_rollout_ref.rollout.name=vllm"])+ with open_dict(config):+ config.trainer.n_gpus_per_node = 2+ config.trainer.nnodes = 1+ config.trainer.logger = ["console"]+ actor_rollout_ref = config.actor_rollout_ref+ actor_rollout_ref.model.path = str(model_path)+ actor_rollout_ref.model.tokenizer_path = str(tokenizer_path)+ actor_rollout_ref.model.enable_gradient_checkpointing = True+ actor_rollout_ref.model.use_remove_padding = True+ actor = actor_rollout_ref.actor+ actor.strategy = "fsdp2"+ actor.ppo_mini_batch_size = mini_batch_size+ actor.ppo_micro_batch_size = None+ actor.ppo_micro_batch_size_per_gpu = None+ actor.ppo_max_token_len_per_gpu = ACTOR_MAX_TOKENS_PER_MICROBATCH+ actor.use_dynamic_bsz = True+ actor.use_torch_compile = False+ actor.ppo_epochs = 1+ actor.shuffle = False+ actor.loss_agg_mode = "token-mean"+ actor.entropy_coeff = 0.0+ actor.calculate_entropy = False+ actor.use_kl_loss = False+ actor.clip_ratio = 0.2+ actor.clip_ratio_low = 0.2+ actor.clip_ratio_high = 0.2+ actor.optim.lr = 0.000001+ actor.optim.weight_decay = 0.01+ actor.optim.betas = [0.9, 0.999]+ actor.optim.clip_grad = 1.0+ actor.optim.total_training_steps = committed_updates+ actor.fsdp_config.strategy = "fsdp2"+ actor.fsdp_config.fsdp_size = 2+ actor.fsdp_config.forward_only = False+ actor.fsdp_config.model_dtype = "fp32"+ actor.fsdp_config.dtype = "bfloat16"+ actor.fsdp_config.param_offload = False+ actor.fsdp_config.optimizer_offload = False+ actor.fsdp_config.offload_policy = False+ actor.fsdp_config.use_torch_compile = False+ rollout = actor_rollout_ref.rollout+ rollout.name = "vllm"+ rollout.mode = "async"+ rollout.nnodes = 1+ rollout.n_gpus_per_node = 2+ rollout.tensor_model_parallel_size = 2+ rollout.data_parallel_size = 1+ rollout.pipeline_model_parallel_size = 1+ rollout.prompt_length = MAX_PROMPT_TOKENS+ rollout.response_length = MAX_RESPONSE_TOKENS+ rollout.max_model_len = MAX_PROMPT_TOKENS + MAX_RESPONSE_TOKENS+ rollout.gpu_memory_utilization = ROLLOUT_MEMORY_FRACTION+ rollout.max_num_seqs = MAX_NUM_SEQS+ rollout.max_num_batched_tokens = MAX_NUM_BATCHED_TOKENS+ rollout.enable_chunked_prefill = True+ rollout.skip_tokenizer_init = False+ rollout.log_prob_use_dynamic_bsz = True+ rollout.log_prob_max_token_len_per_gpu = LOGPROB_MAX_TOKENS_PER_MICROBATCH+ rollout.log_prob_micro_batch_size = None+ rollout.log_prob_micro_batch_size_per_gpu = None+ # The engine stays resident for the whole run: nothing releases or+ # re-acquires its device memory around a weight refresh.+ rollout.free_cache_engine = False+ rollout.checkpoint_engine.backend = "naive"+ rollout.checkpoint_engine.update_weights_bucket_megabytes = WEIGHT_SYNC_BUCKET_MEGABYTES+ rollout.checkpoint_engine.engine_kwargs = {}+ return config+++class OnlineGRPORuntime:+ """Owns the internal process graph and execution plan for one host run."""++ def __init__(self, args: argparse.Namespace) -> None:+ self.args = args+ self.run_spec = _load_json(Path(args.run_spec))+ self.action = str(self.run_spec["action"])+ self.model_path = Path(args.model_path)+ self.tokenizer_path = Path(args.tokenizer_path)+ self.runtime_dir = Path(args.runtime_dir)+ self.result_dir = Path(args.result_dir)+ self.source_root = Path(__file__).resolve().parents[3]+ self.committed_updates = 1 if self.action in {"smoke", "restart"} else 8+ # smoke exercises a single prompt group; every other action uses the+ # full eight groups per update.+ self.groups_per_update = 1 if self.action == "smoke" else PROMPT_GROUPS_PER_UPDATE+ self.restart_checkpoint = self.run_spec.get("restart_checkpoint")+ self.checkpoint_root = self.runtime_dir.parent / "checkpoints"+ self.checkpoint_path = self.checkpoint_root / "update-8"+ self.initial_actor_version = 8 if self.action == "restart" else 0+ self.actor_group = None+ self.llm_server_manager = None+ self.checkpoint_manager = None+ self.client = None+ self.tokenizer = None+ self.prompt_asset: dict[str, Any] | None = None+ self.system_prompt: str | None = None+ self.base_seed = 20260817+ self.reward_endpoint: tuple[str, str] | None = None+ self.device_observations: dict[str, Any] = {}+ self.initial_projection: dict[str, Any] = {}+ self.current_actor_version = self.initial_actor_version+ self.portable_actor_path: str | None = None+ self.phase_timings: dict[str, float] = {}++ # -- startup ---------------------------------------------------------++ def setup(self) -> None:+ """Bring up workers, rollout engine and the initial policy refresh.++ Runs entirely before the runtime answers ``ready``, so none of it+ lands inside the host's measured interval.+ """+ import ray++ from verl.checkpoint_engine import CheckpointEngineManager+ from verl.single_controller.ray import RayClassWithInitArgs, RayWorkerGroup+ from verl.single_controller.ray.base import create_colocated_worker_cls+ from verl.trainer.ppo.ray_trainer import ResourcePoolManager, Role+ from verl.utils import omega_conf_to_dataclass+ from verl.utils.device import get_device_name+ from verl.workers.rollout.llm_server import LLMServerManager++ started = time.monotonic()+ self._load_tokenizer()+ self.config = build_config(+ self.model_path,+ self.tokenizer_path,+ self.source_root,+ mini_batch_size=self.groups_per_update * RESPONSES_PER_PROMPT,+ committed_updates=self.committed_updates,+ )+ ray_temp = Path("/tmp") / ("vr-fw-" + hashlib.sha256(f"{self.runtime_dir}".encode()).hexdigest()[:10])+ ray_temp.mkdir(parents=True, exist_ok=True)+ self._ray_temp = ray_temp+ ray.init(+ include_dashboard=False,+ _temp_dir=str(ray_temp),+ runtime_env={+ "env_vars": {+ "TOKENIZERS_PARALLELISM": "false",+ "RAY_EXPERIMENTAL_NOSET_CUDA_VISIBLE_DEVICES": "1",+ "RAY_EXPERIMENTAL_NOSET_ASCEND_RT_VISIBLE_DEVICES": "1",+ "VLLM_USE_V1": "1",+ "HCCL_CONNECT_TIMEOUT": "1500",+ "HCCL_NPU_SOCKET_PORT_RANGE": "61000-61050",+ }+ },+ )+ pool_id = "colocated_pool"+ actor_role = Role.ActorRollout+ role_name = str(actor_role)+ pool_manager = ResourcePoolManager(resource_pool_spec={pool_id: [2]}, mapping={actor_role: pool_id})+ pool_manager.create_resource_pool()+ worker_class = build_worker_class()+ actor_cls = RayClassWithInitArgs(+ cls=ray.remote(worker_class), config=self.config.actor_rollout_ref, role=role_name+ )+ colocated_cls = create_colocated_worker_cls(class_dict={role_name: actor_cls})+ self.actor_group = RayWorkerGroup(+ resource_pool=pool_manager.get_resource_pool(actor_role),+ ray_cls_with_init=colocated_cls,+ device_name=get_device_name(),+ ).spawn(prefix_set={role_name})[role_name]+ self.actor_group.init_model()++ self.checkpoint_reloaded = self.action == "restart"+ if self.checkpoint_reloaded:+ source = Path(str(self.restart_checkpoint)) if self.restart_checkpoint else self.checkpoint_path+ if not source.is_dir():+ raise RuntimeError("update-eight actor checkpoint is unavailable")+ self.actor_group.load_checkpoint(str(source))++ self.initial_projection = _aggregate_projection(self.actor_group.policy_projection())+ actor_devices = _worker_results(self.actor_group.device_observation(), expected=2)++ self.llm_server_manager = LLMServerManager.create(+ config=self.config,+ worker_group=self.actor_group,+ rollout_resource_pool=pool_manager.get_resource_pool(actor_role),+ )+ replicas = self.llm_server_manager.get_replicas()+ if len(replicas) != 1 or len(replicas[0].workers) != 2:+ raise RuntimeError("rollout did not create exactly one TP2 replica")+ rollout_workers = replicas[0].workers+ rollout_visible = ray.get([worker.get_cuda_visible_devices.remote() for worker in rollout_workers])++ def observe_rollout_device(worker):+ import os++ import torch++ return {+ "role": "rollout",+ "current_device": int(torch.npu.current_device()),+ "visible_devices": os.environ.get("ASCEND_RT_VISIBLE_DEVICES", "not set"),+ }++ rollout_devices = ray.get(+ [worker.execute_with_func_generator.remote(observe_rollout_device) for worker in rollout_workers]+ )+ for observation, visible in zip(rollout_devices, rollout_visible, strict=True):+ observation["reported_visible_devices"] = visible+ self.device_observations = {"actor": actor_devices, "rollout": rollout_devices}+ actor_device_set = {item["current_device"] for item in actor_devices}+ rollout_device_set = {item["current_device"] for item in rollout_devices}+ if actor_device_set != rollout_device_set or len(actor_device_set) != 2:+ raise RuntimeError("actor FSDP2 and rollout TP2 did not share the same two devices")++ self.checkpoint_manager = CheckpointEngineManager(+ config=omega_conf_to_dataclass(self.config.actor_rollout_ref.rollout.checkpoint_engine),+ trainer=self.actor_group,+ replicas=replicas,+ )+ # Publish the starting policy to the resident rollout engine.+ self.checkpoint_manager.update_weights(global_steps=self.initial_actor_version)+ self.client = self.llm_server_manager.get_client()+ self.phase_timings["setup_seconds"] = time.monotonic() - started++ def _load_tokenizer(self) -> None:+ from transformers import AutoTokenizer++ self.tokenizer = AutoTokenizer.from_pretrained(+ self.tokenizer_path, local_files_only=True, trust_remote_code=True+ )+ if self.tokenizer.pad_token_id is None:+ self.tokenizer.pad_token_id = self.tokenizer.eos_token_id++ def encode_prompt(self, question: str) -> list[int]:+ # During warmup the host has not sent the workload yet, so fall back to+ # a prompt of the same shape purely to drive compilation.+ system_prompt = self.system_prompt or WARMUP_SYSTEM_PROMPT+ token_ids = self.tokenizer.apply_chat_template(+ [+ {"role": "system", "content": system_prompt},+ {"role": "user", "content": question},+ ],+ tokenize=True,+ add_generation_prompt=True,+ enable_thinking=False,+ )+ if isinstance(token_ids, Mapping):+ token_ids = token_ids["input_ids"]+ token_ids = list(token_ids)+ if len(token_ids) > MAX_PROMPT_TOKENS:+ raise RuntimeError("prompt exceeds the configured prompt budget")+ return token_ids++ # -- batch construction ---------------------------------------------++ def build_padded_batch(self, generated):+ """Assemble the trajectory batch and GRPO advantages for one update."""+ import numpy as np+ import torch+ from tensordict import TensorDict++ from verl.utils import tensordict_utils as tu+ from verl.workers.utils.padding import left_right_2_no_padding++ metadata, outputs, prompt_batch = generated+ rows = []+ group_rewards: dict[int, list[float]] = {index: [] for index in range(len(prompt_batch))}+ group_texts: dict[int, list[str]] = {index: [] for index in range(len(prompt_batch))}+ policy_versions = set()+ decoded = []+ for (prompt_ordinal, prompt, response_ordinal, seed), output in zip(metadata, outputs, strict=True):+ if output.stop_reason != "completed" or not output.token_ids:+ raise RuntimeError(f"rollout {prompt['id']}/{response_ordinal} did not complete")+ if output.log_probs is None or len(output.log_probs) != len(output.token_ids):+ raise RuntimeError("rollout logprobs are incomplete")+ policy_versions.add(output.extra_fields.get("global_steps"))+ text = self.tokenizer.decode(output.token_ids, skip_special_tokens=True)+ decoded.append((prompt_ordinal, prompt, response_ordinal, seed, output, text))++ rewards = _score_responses(+ self.reward_endpoint, [(str(prompt["id"]), text) for _, prompt, _, _, _, text in decoded]+ )+ for (prompt_ordinal, prompt, response_ordinal, seed, output, text), reward in zip(+ decoded, rewards, strict=True+ ):+ group_rewards[prompt_ordinal].append(reward)+ group_texts[prompt_ordinal].append(text)+ rows.append(+ {+ "prompt_ordinal": prompt_ordinal,+ "prompt_id": prompt["id"],+ "response_ordinal": response_ordinal,+ "seed": seed,+ "prompt_ids": prompt["token_ids"],+ "response_ids": list(output.token_ids),+ "old_log_probs": list(output.log_probs),+ "reward": reward,+ }+ )+ if len(policy_versions) != 1 or next(iter(policy_versions)) is None:+ raise RuntimeError(f"rollout policy version is ambiguous: {policy_versions}")++ advantages: dict[int, list[float]] = {}+ for group, group_reward in group_rewards.items():+ mean = float(np.mean(group_reward))+ std = float(np.std(group_reward, ddof=1))+ advantages[group] = (+ [0.0] * len(group_reward)+ if std == 0+ else [(reward - mean) / (std + GROUP_EPSILON) for reward in group_reward]+ )+ for row in rows:+ row["advantage"] = advantages[row["prompt_ordinal"]][row["response_ordinal"]]++ prompt_width = max(len(row["prompt_ids"]) for row in rows)+ response_width = max(len(row["response_ids"]) for row in rows)+ pad = self.tokenizer.pad_token_id+ input_ids, attention_mask, position_ids = [], [], []+ responses, response_mask, old_log_probs, advantage_values, prompts = [], [], [], [], []+ for row in rows:+ prompt_padding = prompt_width - len(row["prompt_ids"])+ response_padding = response_width - len(row["response_ids"])+ prompt_row = [pad] * prompt_padding + row["prompt_ids"]+ response_row = row["response_ids"] + [pad] * response_padding+ mask = (+ [0] * prompt_padding+ + [1] * len(row["prompt_ids"])+ + [1] * len(row["response_ids"])+ + [0] * response_padding+ )+ positions = []+ position = 0+ for active in mask:+ positions.append(position if active else 0)+ if active:+ position += 1+ prompts.append(prompt_row)+ responses.append(response_row)+ input_ids.append(prompt_row + response_row)+ attention_mask.append(mask)+ position_ids.append(positions)+ response_mask.append([1] * len(row["response_ids"]) + [0] * response_padding)+ old_log_probs.append(row["old_log_probs"] + [0.0] * response_padding)+ advantage_values.append([row["advantage"]] * len(row["response_ids"]) + [0.0] * response_padding)++ padded = TensorDict(+ {+ "input_ids": torch.tensor(input_ids, dtype=torch.long),+ "attention_mask": torch.tensor(attention_mask, dtype=torch.bool),+ "position_ids": torch.tensor(position_ids, dtype=torch.long),+ "prompts": torch.tensor(prompts, dtype=torch.long),+ "responses": torch.tensor(responses, dtype=torch.long),+ "response_mask": torch.tensor(response_mask, dtype=torch.bool),+ "old_log_probs": torch.tensor(old_log_probs, dtype=torch.float32),+ "advantages": torch.tensor(advantage_values, dtype=torch.float32),+ },+ batch_size=[len(rows)],+ )+ batch = left_right_2_no_padding(padded.clone())+ tu.assign_non_tensor(+ batch,+ calculate_entropy=False,+ compute_loss=True,+ temperature=TEMPERATURE,+ global_batch_size=len(rows),+ mini_batch_size=len(rows),+ epochs=1,+ seed=self.base_seed,+ dataloader_kwargs={"shuffle": False},+ )+ observation = {+ "policy_version": int(next(iter(policy_versions))),+ "prompt_ids": [prompt["id"] for prompt in prompt_batch],+ "rewards": [group_rewards[index] for index in range(len(prompt_batch))],+ "advantages": [advantages[index] for index in range(len(prompt_batch))],+ "response_lengths": [len(row["response_ids"]) for row in rows],+ "response_texts": [group_texts[index] for index in range(len(prompt_batch))],+ "consumed_response_tokens": sum(len(row["response_ids"]) for row in rows),+ "nonzero_advantage_groups": sum(any(abs(v) > 0 for v in values) for values in advantages.values()),+ "trajectories": [+ {+ "prompt_id": row["prompt_id"],+ "response_ordinal": row["response_ordinal"],+ "seed": row["seed"],+ "response_ids": row["response_ids"],+ "old_log_probs": row["old_log_probs"],+ "response_text": group_texts[row["prompt_ordinal"]][row["response_ordinal"]],+ "reward": row["reward"],+ "advantage": row["advantage"],+ }+ for row in rows+ ],+ }+ return batch, padded, observation++ def generate_batch_sync(self, batch_ordinal: int, policy_version: int):+ return asyncio.run(self._generate_batch(batch_ordinal, policy_version))++ async def _generate_batch(self, batch_ordinal: int, policy_version: int):+ requests, metadata = [], []+ prompt_batch = self.prompt_batches[(batch_ordinal - 1) % len(self.prompt_batches)]+ for prompt_ordinal, prompt in enumerate(prompt_batch):+ for response_ordinal in range(RESPONSES_PER_PROMPT):+ seed = (+ self.base_seed+ + batch_ordinal * 100000+ + policy_version * 10000+ + prompt_ordinal * RESPONSES_PER_PROMPT+ + response_ordinal+ )+ request_id = f"b{batch_ordinal}-v{policy_version}-{prompt['id']}-{response_ordinal}"+ requests.append(+ self.client.generate(+ request_id,+ prompt_ids=prompt["token_ids"],+ sampling_params={+ "temperature": TEMPERATURE,+ "top_p": TOP_P,+ "top_k": TOP_K,+ "max_tokens": MAX_RESPONSE_TOKENS,+ "logprobs": True,+ "seed": seed,+ },+ )+ )+ metadata.append((prompt_ordinal, prompt, response_ordinal, seed))+ outputs = await asyncio.gather(*requests)+ return metadata, outputs, prompt_batch++ def actor_log_probs(self, padded):+ from verl.utils import tensordict_utils as tu+ from verl.workers.utils.padding import left_right_2_no_padding, no_padding_2_padding++ batch = left_right_2_no_padding(padded.clone())+ tu.assign_non_tensor(batch, calculate_entropy=False, compute_loss=False, temperature=TEMPERATURE)+ output = self.actor_group.compute_log_prob(batch)+ return no_padding_2_padding(tu.get(output, "log_probs"), batch).float().cpu()++ def _probe_tensordict(self, prompt_ids: list[int], token_ids: list[int], log_probs: list[float]):+ import torch+ from tensordict import TensorDict++ replicas = 2+ prompt_width, response_width = len(prompt_ids), len(token_ids)+ input_ids = torch.tensor([prompt_ids + list(token_ids)], dtype=torch.long)+ return TensorDict(+ {+ "input_ids": input_ids.repeat(replicas, 1),+ "attention_mask": torch.ones((replicas, prompt_width + response_width), dtype=torch.bool),+ "position_ids": torch.arange(prompt_width + response_width, dtype=torch.long)+ .unsqueeze(0)+ .repeat(replicas, 1),+ "prompts": torch.tensor([prompt_ids], dtype=torch.long).repeat(replicas, 1),+ "responses": torch.tensor([list(token_ids)], dtype=torch.long).repeat(replicas, 1),+ "response_mask": torch.ones((replicas, response_width), dtype=torch.bool),+ "old_log_probs": torch.tensor([list(log_probs)], dtype=torch.float32).repeat(replicas, 1),+ "advantages": torch.zeros((replicas, response_width), dtype=torch.float32),+ },+ batch_size=[replicas],+ )++ def freshness_probe(self, version: int) -> dict[str, Any]:+ """Compare live actor and rollout log-probabilities for fresh tokens."""++ async def generate():+ prompt = self.prompt_batches[0][0]+ output = await self.client.generate(+ f"freshness-{version}",+ prompt_ids=prompt["token_ids"],+ sampling_params={+ "temperature": TEMPERATURE,+ "top_p": TOP_P,+ "top_k": TOP_K,+ "max_tokens": 32,+ "logprobs": True,+ "seed": self.base_seed + 81983 + version,+ },+ )+ return prompt, output++ prompt, output = asyncio.run(generate())+ if output.stop_reason != "completed" or not output.token_ids or output.log_probs is None:+ raise RuntimeError("freshness rollout did not complete with logprobs")+ padded = self._probe_tensordict(prompt["token_ids"], list(output.token_ids), list(output.log_probs))+ actor_values = self.actor_log_probs(padded)[0, : len(output.token_ids)].tolist()+ rollout_values = list(output.log_probs)+ positions = sorted({0, len(actor_values) // 2, len(actor_values) - 1})+ selected = [+ {+ "position": position,+ "actor_log_prob": float(actor_values[position]),+ "rollout_log_prob": float(rollout_values[position]),+ }+ for position in positions+ ]+ return {+ "policy_version": version,+ "rollout_reported_version": output.extra_fields.get("global_steps"),+ "selected_log_probs": selected,+ "max_abs_logprob_difference": max(+ abs(item["actor_log_prob"] - item["rollout_log_prob"]) for item in selected+ ),+ }++ def host_final_probe(self, request: dict[str, Any]) -> dict[str, Any]:+ """Answer the host's post-run freshness probe on an unseen prompt."""+ prompt_ids = self.encode_prompt(str(request["question"]))+ max_tokens = int(request.get("max_tokens", 32))+ seed = int(request["seed"])++ async def generate():+ return await self.client.generate(+ f"host-probe-{seed}",+ prompt_ids=prompt_ids,+ sampling_params={+ "temperature": TEMPERATURE,+ "top_p": TOP_P,+ "top_k": TOP_K,+ "max_tokens": max_tokens,+ "logprobs": True,+ "seed": seed,+ },+ )++ output = asyncio.run(generate())+ if output.stop_reason != "completed" or not output.token_ids or output.log_probs is None:+ raise RuntimeError("host freshness probe did not complete with logprobs")+ padded = self._probe_tensordict(prompt_ids, list(output.token_ids), list(output.log_probs))+ actor_values = self.actor_log_probs(padded)[0, : len(output.token_ids)].tolist()+ return {+ "type": "probe_result",+ "policy_version": self.current_actor_version,+ "rollout_reported_version": output.extra_fields.get("global_steps"),+ "actor_log_probs": [float(value) for value in actor_values],+ "rollout_log_probs": [float(value) for value in output.log_probs],+ }++ # -- warmup ----------------------------------------------------------++ def warmup(self) -> None:+ """Pay one-time compilation, capture and allocation before ``ready``.++ Uses synthetic prompts of the same shape as the workload. Rollout+ sampling has no side effects on the policy, and the actor warmup runs a+ forward/backward without stepping the optimizer, so the timed run still+ starts from the supplied policy.+ """+ started = time.monotonic()+ filler = "Compute the total cost of 12 items priced at 7 dollars each and 5 items priced at 3 dollars each."+ warm_prompt = {"id": "warmup", "token_ids": self.encode_prompt(filler)}++ async def sample(count: int, max_tokens: int):+ return await asyncio.gather(+ *[+ self.client.generate(+ f"warmup-{max_tokens}-{index}",+ prompt_ids=warm_prompt["token_ids"],+ sampling_params={+ "temperature": TEMPERATURE,+ "top_p": TOP_P,+ "top_k": TOP_K,+ "max_tokens": max_tokens,+ "logprobs": True,+ "seed": 7_000_000 + index,+ },+ )+ for index in range(count)+ ]+ )++ # Drive the rollout engine at the concurrency and length the timed run+ # uses, so every decode/prefill graph is compiled and captured here.+ outputs = asyncio.run(sample(self.groups_per_update * RESPONSES_PER_PROMPT, MAX_RESPONSE_TOKENS))+ asyncio.run(sample(1, 32))++ # Build a batch shaped like a real update and warm the training and+ # log-probability paths, including the activation-checkpoint path.+ if any(output.token_ids for output in outputs):+ padded = self._warmup_padded_batch(warm_prompt["token_ids"], outputs)+ self.actor_group.warmup_actor(padded[0])+ self.actor_log_probs(padded[1])+ probe = self._probe_tensordict(+ warm_prompt["token_ids"], list(outputs[0].token_ids), list(outputs[0].log_probs)+ )+ self.actor_log_probs(probe)+ self.actor_group.synchronize()+ self.phase_timings["warmup_seconds"] = time.monotonic() - started++ def _warmup_padded_batch(self, prompt_ids: list[int], outputs):+ import torch+ from tensordict import TensorDict++ from verl.utils import tensordict_utils as tu+ from verl.workers.utils.padding import left_right_2_no_padding++ rows = [(list(output.token_ids), list(output.log_probs)) for output in outputs if output.token_ids]+ response_width = max(len(ids) for ids, _ in rows)+ pad = self.tokenizer.pad_token_id+ input_ids, attention_mask, position_ids = [], [], []+ responses, response_mask, old_log_probs, advantages, prompts = [], [], [], [], []+ for token_ids, log_probs in rows:+ response_padding = response_width - len(token_ids)+ mask = [1] * len(prompt_ids) + [1] * len(token_ids) + [0] * response_padding+ prompts.append(list(prompt_ids))+ responses.append(token_ids + [pad] * response_padding)+ input_ids.append(list(prompt_ids) + token_ids + [pad] * response_padding)+ attention_mask.append(mask)+ position_ids.append([index if active else 0 for index, active in enumerate(mask)])+ response_mask.append([1] * len(token_ids) + [0] * response_padding)+ old_log_probs.append(log_probs + [0.0] * response_padding)+ advantages.append([0.0] * response_width)+ padded = TensorDict(+ {+ "input_ids": torch.tensor(input_ids, dtype=torch.long),+ "attention_mask": torch.tensor(attention_mask, dtype=torch.bool),+ "position_ids": torch.tensor(position_ids, dtype=torch.long),+ "prompts": torch.tensor(prompts, dtype=torch.long),+ "responses": torch.tensor(responses, dtype=torch.long),+ "response_mask": torch.tensor(response_mask, dtype=torch.bool),+ "old_log_probs": torch.tensor(old_log_probs, dtype=torch.float32),+ "advantages": torch.tensor(advantages, dtype=torch.float32),+ },+ batch_size=[len(rows)],+ )+ train_batch = left_right_2_no_padding(padded.clone())+ tu.assign_non_tensor(+ train_batch,+ calculate_entropy=False,+ compute_loss=True,+ temperature=TEMPERATURE,+ global_batch_size=len(rows),+ mini_batch_size=len(rows),+ epochs=1,+ seed=self.base_seed,+ dataloader_kwargs={"shuffle": False},+ )+ return train_batch, padded++ # -- timed run -------------------------------------------------------++ def prepare_workload(self, start_message: dict[str, Any]) -> None:+ """Bind the host-supplied prompts and reward endpoint (timed)."""+ endpoint = start_message["reward_endpoint"]+ self.reward_endpoint = (str(endpoint["url"]).rstrip("/"), str(endpoint["token"]))+ self.prompt_asset = _load_json(Path(str(start_message["prompt_path"])))+ records = self.prompt_asset["prompts"]+ self.system_prompt = str(self.prompt_asset["system_prompt"])+ self.base_seed = int(self.prompt_asset.get("seed", self.base_seed))+ if self.action == "smoke":+ records = records[:1]+ elif self.action == "restart":+ records = records[-8:]+ encoded = [{**item, "token_ids": self.encode_prompt(str(item["question"]))} for item in records]+ if self.action in {"smoke", "restart"}:+ self.prompt_batches = [encoded]+ else:+ if len(encoded) != 64:+ raise RuntimeError("a full run requires 64 distinct prompt groups")+ self.prompt_batches = [encoded[index : index + 8] for index in range(0, 64, 8)]++ def run(self) -> dict[str, Any]:+ """Execute the committed updates and collect the host's evidence."""+ observations: dict[str, Any] = {"initial": {"parameter_projection": self.initial_projection}}+ freshness_probes: list[dict[str, Any]] = []+ step_metrics: list[dict[str, Any]] = []+ policy_versions: list[dict[str, Any]] = []+ trajectory_records: list[dict[str, Any]] = []+ total_tokens = 0+ accepted_trajectories = 0+ sync_count = 0+ state_dtypes = None+ from verl.utils import tensordict_utils as tu++ verify_loss = self.action in {"correctness", "restart"}+ selected_updates = {1} if self.action in {"smoke", "restart"} else {1, 4, 8}++ timed_start = time.monotonic()+ generation_started = time.monotonic()+ current_generated = self.generate_batch_sync(1, self.current_actor_version)+ current_generation_seconds = time.monotonic() - generation_started++ for update in range(1, self.committed_updates + 1):+ scoring_started = time.monotonic()+ batch, padded, trajectory_observation = self.build_padded_batch(current_generated)+ scoring_seconds = time.monotonic() - scoring_started++ if verify_loss:+ pre_update_log_probs = self.actor_log_probs(padded)+ for row_index, row in enumerate(trajectory_observation["trajectories"]):+ response_length = len(row["response_ids"])+ row["new_log_probs"] = [+ float(value) for value in pre_update_log_probs[row_index, :response_length].tolist()+ ]++ trajectory_version = trajectory_observation["policy_version"]+ lag = self.current_actor_version - trajectory_version+ if lag < 0 or lag > 1:+ raise RuntimeError(f"trajectory policy lag {lag} is outside [0, 1]")+ total_tokens += trajectory_observation["consumed_response_tokens"]+ trajectory_records.extend({"update": update, **row} for row in trajectory_observation["trajectories"])+ update_batch = self.prompt_batches[(update - 1) % len(self.prompt_batches)]+ update_trajectories = len(update_batch) * RESPONSES_PER_PROMPT+ accepted_trajectories += update_trajectories++ self.actor_group.synchronize()+ actor_started = time.monotonic()+ actor_output = self.actor_group.update_actor(batch)+ self.actor_group.synchronize()+ actor_seconds = time.monotonic() - actor_started++ metrics = _numeric_metrics(tu.get(actor_output, "metrics"))+ if update == 1:+ state_dtypes = _aggregate_state_dtypes(self.actor_group.state_dtypes())+ self.current_actor_version += 1++ sync_started = time.monotonic()+ self.checkpoint_manager.update_weights(global_steps=self.current_actor_version)+ sync_seconds = time.monotonic() - sync_started+ sync_count += 1++ if update in {1, self.committed_updates}:+ probe_started = time.monotonic()+ probe = self.freshness_probe(self.current_actor_version)+ probe["seconds"] = time.monotonic() - probe_started+ freshness_probes.append(probe)++ if update in selected_updates:+ current_log_probs = self.actor_log_probs(padded)+ probe_positions = []+ for row in range(min(4, current_log_probs.shape[0])):+ length = int(padded["response_mask"][row].sum())+ positions = sorted({0, length // 2, length - 1})+ probe_positions.append([float(current_log_probs[row, position]) for position in positions])+ observations[str(update)] = {+ "trajectory": trajectory_observation,+ "actor_metrics": metrics,+ "parameter_projection": _aggregate_projection(self.actor_group.policy_projection()),+ "selected_log_probs": probe_positions,+ }++ _print_step_progress(+ {+ "update": update,+ "generation_s": round(current_generation_seconds, 2),+ "scoring_s": round(scoring_seconds, 2),+ "actor_s": round(actor_seconds, 2),+ "sync_s": round(sync_seconds, 2),+ "tokens": trajectory_observation["consumed_response_tokens"],+ "lag": lag,+ }+ )+ step_metrics.append(+ {+ "update": update,+ "trajectory_policy_version": trajectory_version,+ "actor_version_before_update": self.current_actor_version - 1,+ "actor_version_after_update": self.current_actor_version,+ "policy_lag": lag,+ "consumed_response_tokens": trajectory_observation["consumed_response_tokens"],+ "accepted_trajectories": update_trajectories,+ "scoring_seconds": scoring_seconds,+ "rollout_generation_seconds": current_generation_seconds,+ "rollout_sleep_seconds": 0.0,+ "actor_update_seconds": actor_seconds,+ "weight_sync_seconds": sync_seconds,+ "actor_metrics": metrics,+ "nonzero_advantage_groups": trajectory_observation["nonzero_advantage_groups"],+ }+ )+ policy_versions.append(+ {+ "update": update,+ "trajectory": trajectory_version,+ "actor_before": self.current_actor_version - 1,+ "actor_after": self.current_actor_version,+ "rollout_after_sync": self.current_actor_version,+ "lag": lag,+ }+ )++ if update < self.committed_updates:+ generation_started = time.monotonic()+ current_generated = self.generate_batch_sync(update + 1, self.current_actor_version)+ current_generation_seconds = time.monotonic() - generation_started++ end_to_end_seconds = time.monotonic() - timed_start+ assert state_dtypes is not None+ final_projection = observations[str(self.committed_updates)]["parameter_projection"]+ parameters_changed = final_projection["value"] != self.initial_projection["value"]+ freshness_valid = all(+ probe["rollout_reported_version"] == probe["policy_version"]+ and probe["max_abs_logprob_difference"] <= 0.5+ for probe in freshness_probes+ )+ metrics_finite = (+ end_to_end_seconds > 0+ and all(+ item["actor_metrics"]+ and all(math.isfinite(value) for value in item["actor_metrics"].values())+ and item["actor_update_seconds"] > 0+ and item["weight_sync_seconds"] > 0+ for item in step_metrics+ )+ and set(state_dtypes["parameters"]) == {"float32"}+ and set(state_dtypes["optimizer"]).issubset({"float32"})+ and bool(state_dtypes["optimizer"])+ )+ expected_trajectories = sum(len(batch) * RESPONSES_PER_PROMPT for batch in self.prompt_batches)+ observation_updates = {"1"} if self.action in {"smoke", "restart"} else {"1", "4", "8"}+ gates = {+ "actor_initialized": True,+ "rollout_initialized": True,+ "rollouts_complete": accepted_trajectories == expected_trajectories,+ "reward_advantage_valid": all(+ math.isfinite(value)+ for key in observation_updates+ for group in observations[key]["trajectory"]["advantages"]+ for value in group+ ),+ "updates_complete": len(step_metrics) == self.committed_updates,+ "weights_synced": sync_count == self.committed_updates,+ "policy_lag_valid": all(0 <= item["lag"] <= 1 for item in policy_versions),+ "freshness_valid": freshness_valid,+ "parameters_changed": parameters_changed,+ "metrics_finite": metrics_finite,+ "observations_complete": observation_updates.issubset(observations)+ and len(freshness_probes) == (1 if self.action in {"smoke", "restart"} else 2),+ }++ saved_checkpoint = None+ if self.action == "correctness":+ self.checkpoint_path.parent.mkdir(parents=True, exist_ok=True)+ self.actor_group.save_checkpoint(str(self.checkpoint_path), global_step=8, max_ckpt_to_keep=1)+ if not self.checkpoint_path.is_dir():+ raise RuntimeError("update-eight actor checkpoint was not created")+ saved_checkpoint = str(self.checkpoint_path)+ export = _worker_results(+ self.actor_group.export_portable_actor(+ str(self.checkpoint_path / "portable-actor"), str(self.model_path)+ ),+ expected=2,+ )+ record = next((item for item in export if isinstance(item, dict)), None)+ if record is None:+ raise RuntimeError("portable actor export did not report a result")+ self.portable_actor_path = str(record["path"])++ result = {+ "schema_version": 1,+ "kind": "online_grpo_worker",+ "action": self.action,+ "status": "passed" if all(gates.values()) else "failed",+ "gates": gates,+ "committed_updates": self.committed_updates,+ "accepted_trajectories": accepted_trajectories,+ "consumed_response_tokens": total_tokens,+ "trajectory_records": trajectory_records,+ "end_to_end_seconds": end_to_end_seconds,+ "policy_versions": policy_versions,+ "step_metrics": step_metrics,+ "observations": observations,+ "freshness_probes": freshness_probes,+ "device_observations": self.device_observations,+ "logical_parameter_count": self.initial_projection["logical_parameter_count"],+ "parameter_tensor_count": self.initial_projection["parameter_tensor_count"],+ "state_dtypes": state_dtypes,+ "checkpoint_path": saved_checkpoint,+ "checkpoint_reloaded": self.checkpoint_reloaded,+ "runtime_layout": self.runtime_layout(),+ "phase_timings": dict(self.phase_timings),+ }+ if self.portable_actor_path is not None:+ result["portable_actor_path"] = self.portable_actor_path+ return result++ def runtime_layout(self) -> dict[str, Any]:+ return {+ "activation_checkpointing": True,+ "actor_world_size": 2,+ "dynamic_batching": True,+ "enable_chunked_prefill": True,+ "gpu_memory_utilization": ROLLOUT_MEMORY_FRACTION,+ "log_prob_max_tokens_per_microbatch": LOGPROB_MAX_TOKENS_PER_MICROBATCH,+ "max_num_batched_tokens": MAX_NUM_BATCHED_TOKENS,+ "max_num_seqs": MAX_NUM_SEQS,+ "max_tokens_per_microbatch": ACTOR_MAX_TOKENS_PER_MICROBATCH,+ "optimizer_offload": False,+ "parameter_offload": False,+ "remove_padding": True,+ "resident_rollout_engine": True,+ "rollout_tensor_parallel_size": 2,+ "startup_warmup": True,+ "weight_sync_bucket_megabytes": WEIGHT_SYNC_BUCKET_MEGABYTES,+ }++ def shutdown(self) -> None:+ import ray++ try:+ if ray.is_initialized():+ ray.shutdown()+ except Exception: # noqa: BLE001 - shutdown must not mask the run result+ traceback.print_exc()+ shutil.rmtree(getattr(self, "_ray_temp", Path("/nonexistent")), ignore_errors=True)+++def main(argv: list[str] | None = None) -> int:+ parser = argparse.ArgumentParser()+ parser.add_argument("--run-spec", required=True)+ parser.add_argument("--model-path", required=True)+ parser.add_argument("--tokenizer-path", required=True)+ parser.add_argument("--runtime-dir", required=True)+ parser.add_argument("--result-dir", required=True)+ parser.add_argument("--control-socket", required=True)+ args = parser.parse_args(argv)++ channel = ControlChannel(args.control_socket)+ runtime = OnlineGRPORuntime(args)+ try:+ runtime.setup()+ runtime.warmup()+ _print_step_progress({"ready": True, **runtime.phase_timings})+ channel.send({"type": "ready"})++ start_message = channel.receive()+ if start_message.get("type") != "start":+ raise RuntimeError("host did not send a start message")+ runtime.prepare_workload(start_message)+ result = runtime.run()+ _emit_diagnostic(runtime.action, result)+ result_path = Path(args.result_dir) / "run-result.json"+ result_path.write_text(+ json.dumps(result, allow_nan=False, indent=2, sort_keys=True) + "\n", encoding="utf-8"+ )+ channel.send({"type": "completed"})++ while True:+ message = channel.receive()+ kind = message.get("type")+ if kind == "probe":+ channel.send(runtime.host_final_probe(message["request"]))+ elif kind == "shutdown":+ break+ else:+ raise RuntimeError(f"unexpected host message: {kind}")+ return 0+ except BaseException:+ traceback.print_exc()+ return 1+ finally:+ runtime.shutdown()+ channel.close()+++if __name__ == "__main__":+ raise SystemExit(main())