fix(docs): small fixes for customizer optimize throughput nb - #848
fix(docs): small fixes for customizer optimize throughput nb#848anubhutivyas wants to merge 1 commit into
Conversation
Signed-off-by: anubhutiv <anubhutiv@nvidia.com>
📝 WalkthroughWalkthroughChangesThroughput tutorial
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/customizer/tutorials/optimize-throughput.ipynb`:
- Line 888: Update the timing calculation in optimize-throughput.mdx to parse
created_at and updated_at into datetime values before subtracting them, matching
the notebook’s direct datetime-field subtraction behavior. Locate the relevant
step timing code and ensure it no longer treats either timestamp as a string.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: c4567e5a-1867-4e8c-94d5-0d8dbb10b0f7
📒 Files selected for processing (1)
docs/customizer/tutorials/optimize-throughput.ipynb
| " created_at = datetime.fromisoformat(step.created_at.replace(\"Z\", \"+00:00\"))\n", | ||
| " updated_at = datetime.fromisoformat(step.updated_at.replace(\"Z\", \"+00:00\"))\n", | ||
| " return (updated_at - created_at).total_seconds()\n", | ||
| " return (step.updated_at - step.created_at).total_seconds()\n", |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
python3 - <<'PY'
import json, re, pathlib
paths = [
"docs/customizer/tutorials/optimize-throughput.ipynb",
"docs/customizer/tutorials/optimize-throughput.mdx",
]
for p in paths:
path = pathlib.Path(p)
print(f"\n## {p}")
if not path.exists():
print("MISSING")
continue
if p.endswith(".ipynb"):
nb = json.loads(path.read_text())
for i, cell in enumerate(nb.get("cells", [])):
src = "".join(cell.get("source", []))
if "created_at" in src or "updated_at" in src or "total_seconds()" in src:
print(f"\n-- cell {i} ({cell.get('cell_type')}) --")
print(src)
else:
text = path.read_text()
for m in re.finditer(r".{0,120}(created_at|updated_at|total_seconds\(\)).{0,120}", text):
print(m.group(0))
PYRepository: NVIDIA-NeMo/nemo-platform
Length of output: 1953
Update docs/customizer/tutorials/optimize-throughput.mdx. It still parses created_at/updated_at as strings while the notebook subtracts the datetime fields directly, so the published tutorial keeps the wrong timing code.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/customizer/tutorials/optimize-throughput.ipynb` at line 888, Update the
timing calculation in optimize-throughput.mdx to parse created_at and updated_at
into datetime values before subtracting them, matching the notebook’s direct
datetime-field subtraction behavior. Locate the relevant step timing code and
ensure it no longer treats either timestamp as a string.
|
|
addressed in another PR |
Summary by CodeRabbit