fix(docs): small fixes for customizer optimize throughput nb#848
Open
anubhutivyas wants to merge 1 commit into
Open
fix(docs): small fixes for customizer optimize throughput nb#848anubhutivyas wants to merge 1 commit into
anubhutivyas wants to merge 1 commit into
Conversation
Signed-off-by: anubhutiv <anubhutiv@nvidia.com>
Contributor
📝 WalkthroughWalkthroughChangesThroughput tutorial
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Contributor
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", |
Contributor
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.
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by CodeRabbit