log-analysis

โดย nvidia

วิเคราะห์ไฟล์บันทึกงาน SLURM เพื่อระบุสาเหตุของความล้มเหลวและการตัดสินใจเริ่มงานใหม่โดยใช้ NVRxLogAnalyzer ใช้เมื่อคุณมีบันทึกงานฝึกอบรม SLURM และ...

npx skills add https://github.com/nvidia/nvidia-resiliency-ext --skill log-analysis

Skill: log_analysis

Analyze a SLURM job log file for failure root-cause attribution and restart decisions using NVRxLogAnalyzer.

Script: scripts/nvrx_logsage.pyattribution/log_analyzer/nvrx_logsage.py


What it does

  1. Reads the log file (UTF-8, falls back to latin-1).
  2. Splits into per-cycle chunks using chunk_logs_strict (scans for profiling.py:.*Cycle:\s*N markers). Falls back to a single chunk when no markers are found.
  3. For each chunk, extracts application errors via return_application_errors (logsage).
  4. Classifies each chunk with fast-path pattern matching (training done, SLURM cancelled, preemption, time limit) or calls the LLM via get_proposed_solution_cat.
  5. Returns one result tuple per cycle.

CLI

python scripts/nvrx_logsage.py \
    --log-path /path/to/job.log \
    [--model MODEL] \
    [--temperature 0.2] \
    [--top_p 0.7] \
    [--max_tokens 8192] \
    [--exclude_nvrx_logs] \
    [--is_per_cycle]
FlagDefaultDescription
--log-pathrequiredPath to the job log file
--modelnvidia/nemotron-3-super-120b-a12bLLM model
--temperature0.2Sampling temperature
--top_p0.7Top-p nucleus sampling
--max_tokens8192Max output tokens
--exclude_nvrx_logs / --no-exclude_nvrx_logsonStrip nvidia_resiliency_ext / [workload:] lines before chunking (default on; use --no-exclude_nvrx_logs to disable)
--is_per_cycleoffSkip chunking — treat the whole file as a single pre-split cycle

Programmatic API

from nvidia_resiliency_ext.attribution.log_analyzer.nvrx_logsage import NVRxLogAnalyzer

analyzer = NVRxLogAnalyzer({
    "log_path": "/path/to/job.log",
    "model": "nvidia/nemotron-3-super-120b-a12b",
    "temperature": 0.2,
    "top_p": 0.7,
    "max_tokens": 8192,
    "exclude_nvrx_logs": False,
    "is_per_cycle": False,
})
results = analyzer.run_sync({"log_path": "/path/to/job.log"})
# results: tuple[list[RawAnalysisResultItem], AttributionState]

Run-time overrides take precedence over constructor config (see base.effective_run_or_init_config).


Output

Each returned RawAnalysisResultItem keeps raw_text with five fields joined by \n, but also carries the parsed fields directly so consumers do not reparse the text:

<restart_decision>      # "RESTART IMMEDIATE" | "STOP - DONT RESTART IMMEDIATE"
<error_explanation>     # short string or ""
<attribution_text>      # "Attribution: Primary issues: [...], Secondary issues: [...]"
<additional_detail>     # extended text or ""
<checkpoint_saved>      # "True" | "False"

The serialized cycle fields are auto_resume, auto_resume_explanation, attribution_text, checkpoint_saved_flag, primary_issues, and secondary_issues, plus the parsed cycle action. The overall client decision is emitted separately as recommendation.action / recommendation.source. The runner's internal AttributionState.STOP is set only when the parsed cycle action is STOP.

Fast-path decisions (no LLM call)

Detected conditionrestart_decisionattribution_text
Training completeSTOP - DONT RESTART IMMEDIATETRAINING DONE
SLURM preemptionRESTART IMMEDIATESLURM CANCELLED DUE TO PREEMPTION
SLURM step cancelledRESTART IMMEDIATESLURM STEP CANCELLED
SLURM job requeueRESTART IMMEDIATESLURM STEP CANCELLED JOB REQUEUE
Time-limit exceededSTOP - DONT RESTART IMMEDIATEstatus string
Empty logNO LOGS
No errors foundERRORS NOT FOUND
LLM failureLLM FAILURE

Prerequisites

  • LLM_API_KEY set (env var, LLM_API_KEY_FILE, or ~/.llm_api_key)
  • Package installed: pip install 'nvidia-resiliency-ext[attribution]' or pip install -e '.[attribution]' from repo root

Skills เพิ่มเติมจาก nvidia

compileiq-debug
nvidia
ใช้เมื่อมีบางอย่างผิดปกติ: Search() ค้าง, การประเมินทั้งหมดคืนค่า INVALID_SCORE, คะแนนไม่ดีขึ้น, ทุกคอนฟิกคืนค่าเลขเดียวกัน, ข้อผิดพลาด ptxas…
create-github-pr
nvidia
สร้างคำขอดึงข้อมูล GitHub โดยใช้ gh CLI ใช้เมื่อผู้ใช้ต้องการสร้าง PR ใหม่ ส่งโค้ดเพื่อตรวจสอบ หรือเปิดคำขอดึงข้อมูล คำหลักที่ใช้เรียก -…
nemoclaw-maintainer-cross-issue-sweep
nvidia
สแกน issue อื่นๆ ที่เปิดอยู่เพื่อค้นหาว่า PR ที่กำหนดอาจแก้ไขหรือทำให้เสียโดยไม่ได้ตั้งใจ แสดงผลโอกาสในการแก้ไขที่เกี่ยวข้องและความเสี่ยงที่ขัดแย้งกันพร้อมไฟล์:บรรทัด…
fhir-basics
nvidia
สอนให้เอเจนต์เข้าใจการทำงานของ FHIR R4 API ทรัพยากรที่มีให้ วิธีค้นหาด้วยพารามิเตอร์ค้นหา และวิธีแยกวิเคราะห์รูปแบบการตอบกลับทั้งหมดอย่างถูกต้อง…
compileiq-validate-result
nvidia
ใช้หลังจากที่การค้นหาเสร็จสิ้น และก่อนที่จะอ้างสิทธิ์การเร่งความเร็วหรือจัดส่ง ACF โหลดไฟล์ CSV dump_results แยกผู้สมัคร K อันดับแรก (วัตถุประสงค์เดียว)…
changelog-audit
nvidia
ตรวจสอบ Warp CHANGELOG.md ก่อนปล่อย: กู้คืนรายการที่สูญหาย จัดเรียงตามผลกระทบต่อผู้ใช้ ปรับปรุงภาษาในรายการ จัดบรรทัด และ (ในโหมดสาขาปล่อย) เปรียบเทียบการเพิ่มเวอร์ชัน…
maintain-dynamic-plugins
nvidia
ดูแล NeMo Relay dynamic plugin loaders, manifests, Rust native SDKs, gRPC worker protocol, Python worker SDK, เอกสาร, การทดสอบ และความครอบคลุมของเวิร์กโฟลว์การเผยแพร่
dgx-diagnose
nvidia
วินิจฉัยปัญหาทั่วไปของ DGX Station GB300 — CUDA ล่ม, การกำหนดเป้าหมาย GPU ผิด, บั๊กคอนเทนเนอร์ vLLM/SGLang, ปัญหาสถานะ MIG, ข้อผิดพลาด NVLink/Fabric Manager,…