This workflow avoids live SSH-dependent demos while still producing real supervised training data for a remote GPU run.
- A recorded trajectory directory under
runs/trajectories/ - A replayable live demo using the same actions
- An SFT-ready dataset in JSONL format under
runs/datasets/
- scripts/record_trajectory.py
- scripts/replay_trajectory.py
- scripts/export_sft_dataset.py
- tasks/examples/aki-demo-actions.json
npm run devThis gives:
- EHR UI on
http://127.0.0.1:3000 - Env server on
http://127.0.0.1:8000
python scripts/record_trajectory.py tasks/examples/aki-demo-actions.json --stop-on-doneThis creates a directory like:
runs/trajectories/20260307-120000-aki-chart-review-demo/
with:
manifest.jsonsteps.jsonlscreenshots/
python scripts/replay_trajectory.py runs/trajectories/<YOUR_TRAJECTORY_DIR>python scripts/export_sft_dataset.py runs/trajectories --output runs/datasets/ehrgym_sft.jsonlThe output is JSONL with one next-action training example per step.
Example with scp:
scp runs/datasets/ehrgym_sft.jsonl <user>@<gpu-host>:/workspace/data/Or upload the whole directory:
scp -r runs/datasets <user>@<gpu-host>:/workspace/After you create more action bundles, rerun the recorder and then rerun the exporter over the whole runs/trajectories/ directory.
- The exporter uses the observation from step
tas the input and the action at stept+1as the supervised target. - Screenshot paths are stored as absolute paths by default.
- For text-only experiments, export without image paths:
python scripts/export_sft_dataset.py runs/trajectories --image-mode none --output runs/datasets/ehrgym_sft_textonly.jsonl