nemo-rl-brev-etiquette
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBrev Etiquette
Brev操作规范
Operate as though is the source checkout and is the working storage for generated experiment state. Keep the repo small, reproducible, and easy to inspect. Move bulky run outputs to before launching anything expensive.
/home/ubuntu/RL/ephemeral/ephemeral将视为源代码检出目录,作为生成实验状态的工作存储目录。保持仓库体积小巧、可复现且易于检查。在启动任何资源密集型任务前,将庞大的运行输出移至。
/home/ubuntu/RL/ephemeral/ephemeralStorage Rules
存储规则
- Keep code edits, small config changes, committed experiment hypotheses, and concise reproducibility records under .
/home/ubuntu/RL - Put generated experiment assets under , including checkpoints, run logs, Ray temp directories, W&B offline files, profiler traces, evaluation dumps, rollout samples, and per-experiment artifacts.
/ephemeral - Keep reusable caches under one shared cache root per user, not under each experiment. This includes Hugging Face models, dataset caches, PyTorch caches, Triton caches,
/ephemeralcaches, and pip caches.uv - Before a campaign or long run, check capacity with and avoid starting if
df -h /home/ubuntu/RL /ephemeralis missing or nearly full./ephemeral - Create a campaign root such as and use one subdirectory per experiment.
/ephemeral/nemo-rl/${USER:-ubuntu}/nemo-rl-auto-research/<campaign> - Do not leave large files, cache directories, or generated outputs in the git checkout. If a tool defaults to the repo, override its output/cache path before running it.
- 将代码编辑、小型配置修改、已提交的实验假设和简洁的可复现记录保存在下。
/home/ubuntu/RL - 将生成的实验资产放在下,包括检查点、运行日志、Ray临时目录、W&B离线文件、分析器追踪数据、评估输出、滚动样本和每个实验的工件。
/ephemeral - 将可复用缓存放在每个用户专属的共享缓存根目录下,而非每个实验目录下。这包括Hugging Face模型、数据集缓存、PyTorch缓存、Triton缓存、
/ephemeral缓存和pip缓存。uv - 在启动任务或长时间运行前,使用检查容量,若
df -h /home/ubuntu/RL /ephemeral缺失或接近满容量则避免启动。/ephemeral - 创建任务根目录,例如,并为每个实验创建一个子目录。
/ephemeral/nemo-rl/${USER:-ubuntu}/nemo-rl-auto-research/<campaign> - 不要在git检出目录中遗留大文件、缓存目录或生成的输出。如果工具默认将输出保存到仓库,运行前需覆盖其输出/缓存路径。
Environment Secrets
环境密钥
- Treat as the local secret store. It may contain keys such as
/home/ubuntu/RL/.env,WANDB_API_KEY, orHF_TOKEN.HUGGING_FACE_HUB_TOKEN - Before any run that may need external auth, load when it exists. Never print,
/home/ubuntu/RL/.env, log, commit, or summarize secret values.cat - If is absent, or a required key is still unset after loading it, remind the user to add the needed key to that file before launching authenticated work.
/home/ubuntu/RL/.env
bash
if [ -f /home/ubuntu/RL/.env ]; then
set -a
. /home/ubuntu/RL/.env
set +a
else
echo "Missing /home/ubuntu/RL/.env; add required keys such as WANDB_API_KEY or HF_TOKEN before authenticated runs."
fi- 将视为本地密钥存储。它可能包含
/home/ubuntu/RL/.env、WANDB_API_KEY或HF_TOKEN等密钥。HUGGING_FACE_HUB_TOKEN - 在任何可能需要外部认证的运行前,若存在则加载该文件。绝不要打印、
/home/ubuntu/RL/.env查看、记录、提交或总结密钥值。cat - 若不存在,或加载后仍缺少所需密钥,请提醒用户在启动认证工作流前将所需密钥添加到该文件中。
/home/ubuntu/RL/.env
bash
if [ -f /home/ubuntu/RL/.env ]; then
set -a
. /home/ubuntu/RL/.env
set +a
else
echo "Missing /home/ubuntu/RL/.env; add required keys such as WANDB_API_KEY or HF_TOKEN before authenticated runs."
fiAuto-Research Pattern
自动研究模式
When using , keep the git ledger in the repo and heavy evidence on .
nemo-rl-auto-research/ephemeralbash
if [ -f /home/ubuntu/RL/.env ]; then
set -a
. /home/ubuntu/RL/.env
set +a
fi
BREV_ROOT=/ephemeral/nemo-rl/${USER:-ubuntu}
CACHE_ROOT=$BREV_ROOT/cache
CAMPAIGN_ROOT=$BREV_ROOT/nemo-rl-auto-research/<campaign>
EXP_DIR=$CAMPAIGN_ROOT/<experiment>
mkdir -p "$EXP_DIR"/{logs,checkpoints,artifacts,ray,tmp,wandb}
mkdir -p "$CACHE_ROOT"/{huggingface,torch,triton,uv,pip,xdg,wandb}
export HF_HOME=$CACHE_ROOT/huggingface
export HF_HUB_CACHE=$HF_HOME/hub
export HF_DATASETS_CACHE=$HF_HOME/datasets
export TRANSFORMERS_CACHE=$HF_HOME/transformers
export TORCH_HOME=$CACHE_ROOT/torch
export TRITON_CACHE_DIR=$CACHE_ROOT/triton
export UV_CACHE_DIR=$CACHE_ROOT/uv
export PIP_CACHE_DIR=$CACHE_ROOT/pip
export XDG_CACHE_HOME=$CACHE_ROOT/xdg
export WANDB_CACHE_DIR=$CACHE_ROOT/wandb
export RAY_TMPDIR=$EXP_DIR/ray
export TMPDIR=$EXP_DIR/tmp
export WANDB_DIR=$EXP_DIR/wandbRecord the absolute paths in the nemo-rl-auto-research TSV fields for log path, checkpoint path, artifacts, shared cache root, and command. If the TSV itself may grow large, store the full TSV in and keep a small pointer file or summary in the repo.
/ephemeral/ephemeral使用时,将git记录保存在仓库中,将占用大量空间的实验数据存储在上。
nemo-rl-auto-research/ephemeralbash
if [ -f /home/ubuntu/RL/.env ]; then
set -a
. /home/ubuntu/RL/.env
set +a
fi
BREV_ROOT=/ephemeral/nemo-rl/${USER:-ubuntu}
CACHE_ROOT=$BREV_ROOT/cache
CAMPAIGN_ROOT=$BREV_ROOT/nemo-rl-auto-research/<campaign>
EXP_DIR=$CAMPAIGN_ROOT/<experiment>
mkdir -p "$EXP_DIR"/{logs,checkpoints,artifacts,ray,tmp,wandb}
mkdir -p "$CACHE_ROOT"/{huggingface,torch,triton,uv,pip,xdg,wandb}
export HF_HOME=$CACHE_ROOT/huggingface
export HF_HUB_CACHE=$HF_HOME/hub
export HF_DATASETS_CACHE=$HF_HOME/datasets
export TRANSFORMERS_CACHE=$HF_HOME/transformers
export TORCH_HOME=$CACHE_ROOT/torch
export TRITON_CACHE_DIR=$CACHE_ROOT/triton
export UV_CACHE_DIR=$CACHE_ROOT/uv
export PIP_CACHE_DIR=$CACHE_ROOT/pip
export XDG_CACHE_HOME=$CACHE_ROOT/xdg
export WANDB_CACHE_DIR=$CACHE_ROOT/wandb
export RAY_TMPDIR=$EXP_DIR/ray
export TMPDIR=$EXP_DIR/tmp
export WANDB_DIR=$EXP_DIR/wandb在nemo-rl-auto-research的TSV字段中记录的绝对路径,包括日志路径、检查点路径、工件、共享缓存根目录和命令。如果TSV本身可能变得很大,将完整TSV存储在中,并在仓库中保留一个小型指针文件或摘要。
/ephemeral/ephemeralLaunch Checklist
启动检查清单
- Inspect disk first: .
df -h /home/ubuntu/RL /ephemeral - Choose a unique run root before editing recipes or launching jobs.
/ephemeral - Reuse a shared cache root such as across experiments unless a run explicitly requires a clean cache.
/ephemeral/nemo-rl/${USER:-ubuntu}/cache - Override recipe output paths, logger paths, checkpoint paths, and temp paths to point under the experiment directory.
- Override cache paths to point under the shared cache root.
- Stream stdout/stderr to or an equivalent file under
$EXP_DIR/logs/run.log./ephemeral - Periodically check disk during long runs with and stop gracefully if the volume is approaching exhaustion.
df -h /ephemeral - At the end, summarize the important metrics and paths in the repo ledger; do not copy bulky artifacts back into .
/home/ubuntu/RL
- 首先检查磁盘:。
df -h /home/ubuntu/RL /ephemeral - 在编辑脚本或启动作业前,选择一个唯一的运行根目录。
/ephemeral - 在多个实验间复用共享缓存根目录(如),除非运行明确要求使用干净缓存。
/ephemeral/nemo-rl/${USER:-ubuntu}/cache - 将脚本输出路径、日志记录器路径、检查点路径和临时路径覆盖为指向实验目录下的路径。
- 将缓存路径覆盖为指向共享缓存根目录下的路径。
- 将stdout/stderr流输出到或
$EXP_DIR/logs/run.log下的等效文件。/ephemeral - 在长时间运行期间定期使用检查磁盘,若卷即将耗尽则优雅停止运行。
df -h /ephemeral - 运行结束后,在仓库记录中总结重要指标和路径;不要将庞大的工件复制回。
/home/ubuntu/RL
Cleanup
清理步骤
- Clean only files that belong to the current campaign or experiment.
- Prefer pruning clearly named experiment directories under ; never remove shared caches or another user's run directory without an explicit instruction.
/ephemeral/nemo-rl/... - Preserve enough small metadata in the repo to reproduce a result after is cleaned.
/ephemeral
- 仅清理属于当前任务或实验的文件。
- 优先删除下命名清晰的实验目录;未经明确指示,绝不要删除共享缓存或其他用户的运行目录。
/ephemeral/nemo-rl/... - 在仓库中保留足够的小型元数据,以便在被清理后仍能复现结果。
/ephemeral