Skip to content

fix(docs): small fixes for customizer optimize throughput nb#848

Open
anubhutivyas wants to merge 1 commit into
mainfrom
fix-6493857/anubhutiv
Open

fix(docs): small fixes for customizer optimize throughput nb#848
anubhutivyas wants to merge 1 commit into
mainfrom
fix-6493857/anubhutiv

Conversation

@anubhutivyas

@anubhutivyas anubhutivyas commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Documentation
    • Updated the throughput optimization tutorial to install dependencies directly through the notebook kernel.
    • Simplified installation instructions with quieter output.
    • Improved elapsed-time calculations in the results comparison example.

Signed-off-by: anubhutiv <anubhutiv@nvidia.com>
@anubhutivyas
anubhutivyas requested review from a team as code owners July 22, 2026 19:02
@github-actions github-actions Bot added the fix label Jul 22, 2026
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

Throughput tutorial

Layer / File(s) Summary
Notebook dependency installation
docs/customizer/tutorials/optimize-throughput.ipynb
Instructions and installation logic now use quiet %pip in the active notebook kernel.
Elapsed time calculation
docs/customizer/tutorials/optimize-throughput.ipynb
get_elapsed_time subtracts updated_at from created_at and converts the duration to seconds.

Suggested reviewers: mckornfield

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the doc notebook fixes and accurately signals a small update to the optimize throughput tutorial.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-6493857/anubhutiv

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 4e1a5d1 and 1f41b3b.

📒 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",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 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))
PY

Repository: 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.

@github-actions

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 27113/34832 77.8% 62.1%
Integration Tests 15892/33443 47.5% 19.9%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant