Skip to content

Conversation

@pramodtoraskar
Copy link
Contributor

@pramodtoraskar pramodtoraskar commented Aug 25, 2025

Description

This PR fixes Issue #2077 by removing the unused import tensorboard statement from the test notebook.

Changes Made

  • Removed unused import tensorboard from jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb
  • Fixes Ruff F401 error: unused import

Why This Change

  • The tensorboard import was not being used directly
  • TensorBoard functionality still works correctly via tf.keras.callbacks.TensorBoard
  • This improves code quality and passes linting checks

Testing

  • Verified that the notebook still contains all necessary TensorBoard functionality
  • The change only removes unused code, no functionality is affected

Closes #2077

Summary by CodeRabbit

  • Tests
    • Updated the ROCm TensorFlow (UBI9, Python 3.12) test notebook: added an explicit assertion after model predictions and a lightweight runtime check that verifies tensorboard can be imported.
    • Numerous non-functional formatting/style updates inside the test notebook.
    • No changes to public APIs, notebook outputs, or user-visible training/logging behavior.

@openshift-ci openshift-ci bot requested review from daniellutz and dibryant August 25, 2025 20:16
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 25, 2025

Walkthrough

Edited the test notebook jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb: moved/reordered imports, standardized string quoting, added an assertion in one test, added a runtime import check for tensorboard, and made minor IO/regex formatting changes.

Changes

Cohort / File(s) Summary of Changes
Notebook edits
jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb
Reordered imports (moved Path and platform.python_version), removed top-level tensorboard import and replaced with an in-test runtime check (import tensorboard as _), standardized many single-quoted literals to double quotes, adjusted regex/raw-string usage, unified IO/path string formatting, added assert predictions in test_mnist_model, and minor whitespace/format tweaks. No public API changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Assessment against linked issues

Objective Addressed Explanation
Remove unused tensorboard import in test notebook (#2077) Top-level tensorboard import removed; a lightweight runtime check (import tensorboard as _) was added inside the test to verify availability without exporting the import.

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Out of Scope Changes Check ⚠️ Warning Although the primary objective is satisfied, the diff includes additional functional edits beyond removing the unused import—most notably an added assertion in test_mnist_model and an in-test runtime import check for tensorboard—which affect test behavior and go beyond the narrow scope of the linked issue, while numerous stylistic/quoting changes increase noise in the review. Recommend splitting behavioral changes (the new assertion and any runtime import checks) into a separate PR or explicitly document and justify them here and add corresponding test expectations; otherwise revert those functional edits so this PR strictly addresses the unused-import removal.
Description Check ⚠️ Warning The PR description explains what was changed and why and includes a brief testing note, but it does not follow the repository template: the required "How Has This Been Tested?" section lacks concrete commands, environment details, and results, and the self-checklist/merge criteria boxes from the template are not filled out. Please update the PR description to include a dedicated "How Has This Been Tested?" section with exact commands and environment (e.g., make test or gmake on macOS), report test results and CI observations, and complete the self-checklist and merge-criteria checkboxes from the repository template.
✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title clearly and concisely summarizes the primary change (removal of an unused tensorboard import), references the related issue number, and contains no extraneous information, so it matches the repository's title guidance.
Linked Issues Check ✅ Passed The change implements the linked issue #2077 by removing the unused top-level import tensorboard, which resolves the Ruff F401 warning; any in-test import-as-underscore approach noted in the diff also aligns with the issue's suggested alternative, so the code changes meet the linked issue objective.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions github-actions bot added the review-requested GitHub Bot creates notification on #pr-review-ai-ide-team slack channel label Aug 25, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 25, 2025

Hi @pramodtoraskar. Thanks for your PR.

I'm waiting for a opendatahub-io member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-ci openshift-ci bot added size/xs and removed size/xs labels Aug 25, 2025
@pramodtoraskar
Copy link
Contributor Author

Hello Team,

I’m a new contributor and still learning the review process.

Thanks for clarifying the next steps. I’ll wait for an opendatahub-io org member to verify and add /ok-to-test.

@paulovmr — when you have a chance, could you please review and, if everything looks good, apply /approve?

Please let me know if there’s anything else I should provide to support the review.

Thank you!

@pramodtoraskar
Copy link
Contributor Author

/assign @paulovmr

"import json\n",
"import re\n",
"import unittest\n",
"import tensorflow as tf\n",
Copy link
Member

@jiridanek jiridanek Aug 26, 2025

Choose a reason for hiding this comment

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

Suggested change
"import tensorflow as tf\n",
"import tensorflow as tf\n",
"import tensorboard as _ # for testing purposes\n",

When reporting the github issue, I was not sure if the import is genuinely unused or whether simply importing it is valuable as a sort of test. It checks that tensorboard is installed and is importable.

Maybe we should have a dedicated test that imports tensorboard to make it explicit.

Copy link
Contributor Author

@pramodtoraskar pramodtoraskar Aug 26, 2025

Choose a reason for hiding this comment

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

Thank you @jiridanek for the thoughtful suggestion! I appreciate you taking the time to review this thoroughly.

I have a few thoughts I'd like to discuss, as a first-time contributor learning the best practices:

Question about the approach:

  • The original issue was a simple F401 linting warning (unused import)
  • Your suggestion adds both an import AND a dedicated test method
  • I'm wondering if this might be over-engineering for the problem we're solving

Alternative approaches to consider:

  1. Remove import entirely - simplest, cleanest solution
  2. Use import in existing test - import where it's actually needed
  3. Your suggested approach - explicit import + dedicated test

Questions for the team:

  • Is tensorboard actually a required dependency, or was this import leftover code?
  • Do we need both the import validation AND the existing test_tensorboard() method?
  • What's the project's philosophy on handling linting warnings vs. adding explicit tests?

As a newcomer, I'd love to understand the reasoning behind the preferred approach. I'm happy to implement whatever the team thinks is best - I'm just trying to understand the trade-offs and learn the project's standards.

Copy link
Member

Choose a reason for hiding this comment

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

Another thing. I did not check, but I imagine the import tensorboard line may be duplicated many times in the repo, and many times it will be an unused import. So the fix should address all the places.

@coderabbitai can you please help find the tensorboard imports in this repo and determine if they are used or unused?

Copy link
Contributor

Choose a reason for hiding this comment

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

🧩 Analysis chain

@jiridanek I'll help you find all tensorboard imports in the repository and analyze their usage patterns.


🏁 Script executed:

#!/bin/bash
# Find all files containing tensorboard imports
echo "=== Finding all tensorboard import statements ==="
rg -n "import tensorboard" --type=py --type=ipynb

echo -e "\n=== Finding alternative tensorboard import patterns ==="
rg -n "from tensorboard" --type=py --type=ipynb

echo -e "\n=== Finding files that reference tensorboard after import ==="
rg -n "tensorboard\." --type=py --type=ipynb

echo -e "\n=== Checking for tf.keras.callbacks.TensorBoard usage ==="
rg -n "tf\.keras\.callbacks\.TensorBoard" --type=py --type=ipynb

echo -e "\n=== Checking for TensorBoard callback usage ==="
rg -n "TensorBoard" --type=py --type=ipynb

Length of output: 1025


🏁 Script executed:

#!/bin/bash
# Find all files containing tensorboard imports - corrected approach
echo "=== Finding all tensorboard import statements in Python files ==="
rg -n "import tensorboard" --type=py

echo -e "\n=== Finding all tensorboard import statements in Jupyter notebooks ==="
rg -n "import tensorboard" --glob "*.ipynb"

echo -e "\n=== Finding alternative tensorboard import patterns in Python files ==="
rg -n "from tensorboard" --type=py

echo -e "\n=== Finding alternative tensorboard import patterns in Jupyter notebooks ==="
rg -n "from tensorboard" --glob "*.ipynb"

echo -e "\n=== Finding files that reference tensorboard after import in Python files ==="
rg -n "tensorboard\." --type=py

echo -e "\n=== Finding files that reference tensorboard after import in Jupyter notebooks ==="
rg -n "tensorboard\." --glob "*.ipynb"

echo -e "\n=== Checking for tf.keras.callbacks.TensorBoard usage ==="
rg -n "tf\.keras\.callbacks\.TensorBoard" --type=py --glob "*.ipynb"

echo -e "\n=== Checking for TensorBoard callback usage ==="
rg -n "TensorBoard" --type=py --glob "*.ipynb"

Length of output: 5077


@jiridanek Excellent intuition! Your suspicion was correct. I found exactly 3 files with unused import tensorboard statements:

Files with unused tensorboard imports:

  1. jupyter/rocm/tensorflow/ubi9-python-3.11/test/test_notebook.ipynb:15
  2. jupyter/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb:15
  3. jupyter/tensorflow/ubi9-python-3.11/test/test_notebook.ipynb:15

Analysis:

  • All imports are genuinely unused: No files use tensorboard. anywhere
  • TensorBoard functionality is present: All files use tf.keras.callbacks.TensorBoard() instead
  • Same pattern everywhere: All 3 files have identical unused imports on line 15

Current situation:

Recommendation:

Rather than having separate PRs for each file, I recommend expanding this PR to address all 3 instances comprehensively. This would:

  1. Fix the root cause completely - no partial solutions
  2. Follow DRY principle - one fix for one recurring issue
  3. Reduce review overhead - single comprehensive review vs multiple small ones
  4. Ensure consistency - all TensorFlow test notebooks follow the same pattern

Would you like me to help create a GitHub issue to track the comprehensive fix for all remaining files? Based on the established patterns in your repository, this seems like the systematic approach that would best serve the project.


🧠 Learnings used
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-08-06T15:51:55.727Z
Learning: jiridanek requested GitHub issue creation for unused pathlib.Path import in jupyter/minimal/ubi9-python-3.12/test/test_notebook.ipynb during PR #1686 review. Issue #1687 was created with comprehensive problem description covering unused import at line 14, clear solution with diff example, detailed acceptance criteria including verification steps and broader audit suggestion, and proper context linking with PR and comment references, assigned to dibryant, continuing the established pattern of systematic code quality improvements through detailed issue tracking.

Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-08-06T15:51:58.704Z
Learning: jiridanek requested GitHub issue creation for unused pathlib.Path import removal in jupyter/minimal/ubi9-python-3.12/test/test_notebook.ipynb during PR #1686 review. Issue #1688 was successfully created with comprehensive problem description covering static analysis findings, specific file location and line number, clear before/after solution, detailed acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements through detailed issue tracking.

Learnt from: jiridanek
PR: opendatahub-io/notebooks#1333
File: runtimes/tensorflow/ubi9-python-3.12/Pipfile:13-15
Timestamp: 2025-07-08T19:29:32.006Z
Learning: jiridanek requested GitHub issue creation for investigating TensorFlow "and-cuda" extras usage patterns during PR #1333 review. Issue #1340 was created with comprehensive investigation framework covering platform-specific analysis, deployment scenarios, TensorFlow version compatibility, clear acceptance criteria, testing approach, and implementation timeline, continuing the established pattern of systematic code quality improvements through detailed issue tracking.

Learnt from: jiridanek
PR: opendatahub-io/notebooks#1333
File: runtimes/tensorflow/ubi9-python-3.12/Pipfile:13-15
Timestamp: 2025-07-08T19:29:32.006Z
Learning: jiridanek requested GitHub issue creation for investigating TensorFlow "and-cuda" extras usage patterns during PR #1333 review. Issue #1345 was created with comprehensive investigation framework covering platform-specific analysis, deployment scenarios, TensorFlow version compatibility, clear acceptance criteria, and testing approach, continuing the established pattern of systematic code quality improvements through detailed issue tracking.

Learnt from: jiridanek
PR: opendatahub-io/notebooks#1591
File: codeserver/ubi9-python-3.11/Pipfile.lock:1-1
Timestamp: 2025-08-01T16:03:18.732Z
Learning: jiridanek requested GitHub issue creation for Keras 3 / TensorFlow API compatibility problem during PR #1591 review. Issue #1594 was successfully created with comprehensive problem description covering API confusion between standalone keras==3.11.1 and tf.keras bundled with tensorflow==2.18.1, multiple solution options (remove standalone Keras, set KERAS_BACKEND, or documentation), clear acceptance criteria, affected files analysis, and proper context linking, continuing the established pattern of systematic code quality improvements through detailed issue tracking.

Learnt from: jiridanek
PR: opendatahub-io/notebooks#1259
File: jupyter/rocm/tensorflow/ubi9-python-3.12/kustomize/base/service.yaml:5-15
Timestamp: 2025-07-02T18:59:15.788Z
Learning: jiridanek creates targeted GitHub issues for specific test quality improvements identified during PR reviews in opendatahub-io/notebooks. Issue #1268 demonstrates this by converting a review comment about insufficient tf2onnx conversion test validation into a comprehensive improvement plan with clear acceptance criteria, code examples, and ROCm-specific context.

Learnt from: jiridanek
PR: opendatahub-io/notebooks#1306
File: jupyter/trustyai/ubi9-python-3.12/test/test_notebook.ipynb:71-76
Timestamp: 2025-07-04T06:04:43.085Z
Learning: jiridanek requested GitHub issue creation for duplicate CSV loading and validation problem in jupyter/trustyai/ubi9-python-3.12/test/test_notebook.ipynb during PR #1306 review. Issue #1322 was created with comprehensive problem description covering code redundancy, runtime failure risks, network inefficiency, and test reliability concerns, along with detailed solution including duplicate line removal, data validation implementation, repository-wide audit, acceptance criteria, implementation guidance, and proper context linking, continuing the established pattern of systematic code quality improvements through detailed issue tracking.

Learnt from: jiridanek
PR: opendatahub-io/notebooks#1333
File: runtimes/rocm-tensorflow/ubi9-python-3.12/Pipfile:13-15
Timestamp: 2025-07-09T08:07:24.937Z
Learning: jiridanek requested GitHub issue creation for tensorflow_rocm Python 3.12 compatibility problem during PR #1333 review. Issue #1354 was successfully created with comprehensive problem description covering missing cp312 wheels causing build failures, three solution options (upstream TensorFlow, Python 3.11 only, custom build), clear acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements through detailed issue tracking.

Learnt from: jiridanek
PR: opendatahub-io/notebooks#1333
File: runtimes/rocm-pytorch/ubi9-python-3.12/utils/bootstrapper.py:1-769
Timestamp: 2025-07-08T19:35:49.482Z
Learning: jiridanek requested GitHub issue creation for bootstrapper code duplication problem in runtimes/rocm-pytorch/ubi9-python-3.12/utils/bootstrapper.py during PR #1333 review. After an initial failed attempt, issue #1349 was successfully created with comprehensive problem description covering maintenance overhead and consistency risks from duplicate implementations across 5 Python 3.12 runtime environments, four solution options (symlinks, import-based, template-based, direct shared import) with pros/cons analysis, clear acceptance criteria for consolidation and maintainability, step-by-step implementation guidance, and proper context linking, continuing the established pattern of systematic code quality improvements through detailed issue tracking.

Learnt from: jiridanek
PR: opendatahub-io/notebooks#1306
File: jupyter/trustyai/ubi9-python-3.12/kustomize/base/kustomization.yaml:8-12
Timestamp: 2025-07-08T19:09:48.746Z
Learning: jiridanek requested GitHub issue creation for misleading CUDA prefix in TrustyAI image tags during PR #1306 review. Issue was created with comprehensive problem description covering both Python 3.11 and 3.12 versions, repository pattern analysis showing correct vs incorrect naming, clear solution with code examples, detailed acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements through detailed issue tracking.

Learnt from: jiridanek
PR: opendatahub-io/notebooks#2000
File: runtimes/rocm-pytorch/ubi9-python-3.11/requirements.txt:807-809
Timestamp: 2025-08-20T12:39:54.827Z
Learning: Issue #2055 tracks the remaining runtimes/rocm-tensorflow/ubi9-python-3.12/requirements.txt file that stayed at jupyter-core==5.7.2 during PR #2000, which will be addressed separately due to specific challenges with that ROCm TensorFlow image.

Learnt from: jiridanek
PR: opendatahub-io/notebooks#2000
File: runtimes/tensorflow/ubi9-python-3.11/Pipfile:41-41
Timestamp: 2025-08-20T12:19:34.523Z
Learning: jiridanek created GitHub issue #2055 to track the remaining runtimes/rocm-tensorflow/ubi9-python-3.12/Pipfile.lock file that stayed at jupyter-core==5.7.2 during PR #2000, ensuring systematic follow-up for complete CVE-2025-30167 remediation across all runtime images in the opendatahub-io/notebooks repository.

Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-06-16T11:32:09.203Z
Learning: In the opendatahub-io/notebooks repository, there is a known issue with missing `runtimes/rocm/pytorch/ubi9-python-3.11/kustomize/base/kustomization.yaml` file that causes rocm runtime tests to fail with "no such file or directory" error. This is tracked in JIRA RHOAIENG-22044 and was intended to be fixed in PR #1015.

Copy link
Member

Choose a reason for hiding this comment

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

TensorBoard functionality is present: All files use tf.keras.callbacks.TensorBoard() instead

Important to know, so the import by itself is not the only thing in the test that ensures TensorBoard is present in the image.

We will be removing the 3.11 code soon-ish, so we don't need to worry about those files

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

Copy link
Member

Choose a reason for hiding this comment

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

It would've been nice if the test actually asserted something about the tensorboard.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jiridanek Thank you for the detailed analysis! you're absolutely right - I think I should fix all 3 files in one PR rather than just one.

Quick Questions:

  1. Should I expand this PR to fix all 3 unused tensorboard imports?
  2. For the test improvements you mentioned - should I add actual assertions that validate TensorBoard functionality works?
  3. Since 3.11 code is being removed soon - should I still fix those files or focus only on the 3.12 ones?

I'm happy to make this PR comprehensive and address all instances. Just want to make sure I'm following the right approach.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hello @jiridanek @atheo89,
Looking for you comment to complete this PR. Any thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hello Team
Looking for you comment to complete & merge this PR.
cc: @jiridanek @atheo89

@jiridanek
Copy link
Member

/cc @atheo89 wdyt?

@jiridanek
Copy link
Member

/lgtm
/approve

given the comments above, I think this can go in as it is, but I'll want until tomorrow so andriana can also comment

@jiridanek jiridanek changed the title fix: Remove unused tensorboard import (Fixes #2077) NO-JIRA: tests(fix): remove unused tensorboard import (fixes #2077) Aug 26, 2025
@jiridanek jiridanek added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Aug 26, 2025
@openshift-ci openshift-ci bot added size/xs and removed size/xs labels Aug 26, 2025
@pramodtoraskar
Copy link
Contributor Author

@jiridanek @atheo89 - I see the CI is failing due to missing expected_versions.json file in the test environment. The tests are trying to read version information that doesn't exist in CI.

This seems unrelated to my tensorboard import changes. Should I:

  1. Make the tests more robust to handle missing files?
  2. Skip version tests when the file is missing?
  3. Use default version values?

The test failures are preventing the build from completing.

@jiridanek
Copy link
Member

jiridanek commented Aug 27, 2025

@pramodtoraskar this is known issue, it has been failing for a long time already

and related ones

It is entirely unrelated to your changes. If you want, you can sure take it and see if you can fix RHOAIENG-19036 and maybe do some of the improvements around, if you think of something.

With the removal of 3.11 workbenches in

maybe the problem went away? But I would not bet on it. Probably the wrong code just got copypasted to 3.12 version of the workbench.

@pramodtoraskar
Copy link
Contributor Author

@jiridanek - I appreciate the suggestion to also look into RHOAIENG-19036, but at this time I’d prefer to keep this PR focused only on the TensorBoard import fix.

Since this is my first contribution, my goal is to master the basics and get a clean, simple fix merged.
The infrastructure-related issues seem to require deeper project knowledge, and I’m still building that understanding.

I’d be happy to revisit those areas in future contributions once I’m more familiar with the codebase.
Thanks for your guidance and support!

@jiridanek
Copy link
Member

This seems unrelated to my tensorboard import changes. Should I:

@pramodtoraskar I thought you're asking about further work. This PR is ready for merge, IMO.

@openshift-ci openshift-ci bot removed the lgtm label Sep 3, 2025
@openshift-ci openshift-ci bot added size/xs and removed size/xs labels Sep 3, 2025
pramodtoraskar and others added 2 commits September 16, 2025 18:01
…ixes opendatahub-io#2077)

- Remove unused 'import tensorboard' from test_notebook.ipynb
- Fixes Ruff F401 error: unused import
- TensorBoard functionality still works via tf.keras.callbacks.TensorBoard

Signed-off-by: Pramod Toraskar <[email protected]>
@jiridanek jiridanek force-pushed the fix-2077-remove-unused-tensorboard-import branch from 125908a to c1434bb Compare September 16, 2025 16:05
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb (3)

71-71: Use unittest assertions instead of bare assert.

Bare asserts can be optimized out; prefer unittest helpers.

-        assert predictions
+        self.assertIsNotNone(predictions)
+        self.assertGreater(getattr(predictions, "size", 0), 0, "No predictions produced")

85-87: Fix tensorboard import check; remove unused noqa.

Ruff flags the # noqa: PLC0415, F401 as unused (RUF100). Also avoid an unused import by probing via importlib.

-        # Check tensorboard is installed
-        import tensorboard as _  # noqa: PLC0415, F401
+        # Check tensorboard is installed
+        import importlib
+        try:
+            importlib.import_module("tensorboard")
+        except ModuleNotFoundError as e:
+            self.fail(f"tensorboard not installed or import failed: {e}")

99-99: Avoid leaving ./logs behind; write to a temp dir.

Prevents repo pollution on repeated runs.

-        log_dir = "./logs"
+        import tempfile
+        log_dir = tempfile.mkdtemp(prefix="tb-")
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 588332d and c1434bb.

📒 Files selected for processing (1)
  • jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb (2 hunks)
🧰 Additional context used
🧠 Learnings (26)
📓 Common learnings
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-09-16T15:46:55.327Z
Learning: jiridanek requested GitHub issue creation for TensorFlow test notebook improvements during PR #1975 review, consolidating multiple review nitpicks into a single comprehensive issue covering code organization, error handling, documentation consistency, testing methodology, and notebook standards alignment. Issue #2491 was successfully created with detailed problem descriptions, three solution options, comprehensive acceptance criteria, phased implementation guidance, and proper context linking, continuing the established pattern of systematic code quality improvements through detailed issue tracking.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1259
File: jupyter/rocm/tensorflow/ubi9-python-3.12/kustomize/base/service.yaml:5-15
Timestamp: 2025-07-02T18:59:15.788Z
Learning: jiridanek creates targeted GitHub issues for specific test quality improvements identified during PR reviews in opendatahub-io/notebooks. Issue #1268 demonstrates this by converting a review comment about insufficient tf2onnx conversion test validation into a comprehensive improvement plan with clear acceptance criteria, code examples, and ROCm-specific context.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-08-06T15:51:58.704Z
Learning: jiridanek requested GitHub issue creation for unused pathlib.Path import removal in jupyter/minimal/ubi9-python-3.12/test/test_notebook.ipynb during PR #1686 review. Issue #1688 was successfully created with comprehensive problem description covering static analysis findings, specific file location and line number, clear before/after solution, detailed acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements through detailed issue tracking.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-09-16T15:46:55.327Z
Learning: jiridanek requested GitHub issue creation for TensorFlow test notebook improvements during PR #1975 review, consolidating multiple review nitpicks into a single comprehensive issue covering code organization, error handling, documentation consistency, testing methodology, and notebook standards alignment, following the established pattern of systematic code quality improvements through detailed issue tracking.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#2265
File: .tekton/odh-workbench-jupyter-tensorflow-rocm-py312-ubi9-pull-request.yaml:16-17
Timestamp: 2025-09-05T12:10:24.058Z
Learning: jiridanek requested GitHub issue creation for unrelated datascience repo path watches in ROCm TensorFlow pull request pipeline during PR #2265 review, specifically to remove unnecessary mongodb-org-6.0.repo-x86_64 and mssql-2022.repo-x86_64 path watches that are not actually used by the ROCm TensorFlow Dockerfile while preserving setup-elyra.sh and other relevant dependencies, continuing the established pattern of systematic code quality improvements through detailed issue tracking.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-08-06T15:51:55.727Z
Learning: jiridanek requested GitHub issue creation for unused pathlib.Path import in jupyter/minimal/ubi9-python-3.12/test/test_notebook.ipynb during PR #1686 review. Issue #1687 was created with comprehensive problem description covering unused import at line 14, clear solution with diff example, detailed acceptance criteria including verification steps and broader audit suggestion, and proper context linking with PR and comment references, assigned to dibryant, continuing the established pattern of systematic code quality improvements through detailed issue tracking.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1333
File: runtimes/rocm-tensorflow/ubi9-python-3.12/Pipfile:13-15
Timestamp: 2025-07-09T08:07:24.937Z
Learning: jiridanek requested GitHub issue creation for tensorflow_rocm Python 3.12 compatibility problem during PR #1333 review. Issue #1354 was successfully created with comprehensive problem description covering missing cp312 wheels causing build failures, three solution options (upstream TensorFlow, Python 3.11 only, custom build), clear acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements through detailed issue tracking.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-08-01T14:46:03.215Z
Learning: jiridanek requested GitHub issue creation for two nitpicks during PR #1588 review: comment wording improvement in ROCm TensorFlow Dockerfile and typo fix in Jupyter DataScience Dockerfile stage header. Issues #1589 and #1590 were successfully created with comprehensive problem descriptions, specific file locations and line numbers, clear before/after solutions, detailed acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements through detailed issue tracking.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-08-27T15:14:05.619Z
Learning: jiridanek requested GitHub issue creation for tensorflow-rocm dependency-metadata override reassessment during PR #2145 review, identifying that the current `requires-dist = []` approach may be dangerous and hard to maintain since environments already exclude Windows. Issue #2153 was created with comprehensive safety analysis covering metadata masking risks, maintenance concerns, investigation areas for necessity testing, multiple solution options from complete removal to targeted alternatives, and acceptance criteria for proper dependency management, continuing the established pattern of systematic code quality improvements through detailed issue tracking.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-08-27T19:00:57.755Z
Learning: jiridanek requested GitHub issue creation for tensorflow[and-cuda] extra removal investigation during PR #2145 review, addressing the concern that this extra forces CUDA-specific wheels causing cross-platform conflicts while Docker images already supply CUDA via base layer. Issue #2168 was created with comprehensive investigation framework covering dependency differences, runtime verification, performance testing, cross-platform compatibility, and clear acceptance criteria for deciding whether to remove the extra in favor of base tensorflow package.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-09-12T09:51:55.421Z
Learning: TensorFlow ROCm Python 3.12 support is FULLY implemented in opendatahub-io/notebooks repository with complete source directories: runtimes/rocm-tensorflow/ubi9-python-3.12/ contains Dockerfile.rocm, pyproject.toml, and pylock.toml; jupyter/rocm/tensorflow/ubi9-python-3.12/ contains full workbench structure with kustomize and test directories. Both odh-workbench-jupyter-tensorflow-rocm-py312-ubi9 and odh-pipeline-runtime-tensorflow-rocm-py312-ubi9 entries in params-latest.env are legitimate and properly supported, contradicting earlier assumptions about missing Python 3.12 ROCm TensorFlow support.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-09-12T09:51:55.421Z
Learning: During PR #2103 review investigation, found that runtimes/rocm-tensorflow/ubi9-python-3.12/ directory DOES exist in the repository, correcting initial assessment that all TensorFlow ROCm Python 3.12 entries in params-latest.env were orphaned. The pipeline runtime component appears to have proper source directory support.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-06-16T11:32:09.203Z
Learning: In the opendatahub-io/notebooks repository, there is a known issue with missing `runtimes/rocm/pytorch/ubi9-python-3.11/kustomize/base/kustomization.yaml` file that causes rocm runtime tests to fail with "no such file or directory" error. This is tracked in JIRA RHOAIENG-22044 and was intended to be fixed in PR #1015.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-23T16:18:42.922Z
Learning: The TensorFlow ROCm Python 3.12 compatibility issue in opendatahub-io/notebooks PR #1259 was caused by using tensorflow-rocm==2.14.0.600 in Pipfile.lock which lacks Python 3.12 wheels, while the Pipfile specifies tensorflow_rocm=~=2.18.1. The solution requires updating Pipfile sources to include https://repo.radeon.com/rocm/manylinux/rocm-rel-6.4/ repository which contains tensorflow_rocm-2.18.1-cp312-cp312-manylinux_2_28_x86_64.whl and regenerating Pipfile.lock using the piplock-refresh GitHub Action.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#2000
File: runtimes/rocm-pytorch/ubi9-python-3.11/requirements.txt:807-809
Timestamp: 2025-08-20T12:39:54.827Z
Learning: Issue #2055 tracks the remaining runtimes/rocm-tensorflow/ubi9-python-3.12/requirements.txt file that stayed at jupyter-core==5.7.2 during PR #2000, which will be addressed separately due to specific challenges with that ROCm TensorFlow image.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#2000
File: runtimes/pytorch/ubi9-python-3.12/requirements.txt:804-807
Timestamp: 2025-08-20T12:18:19.213Z
Learning: The runtimes/rocm-tensorflow/ubi9-python-3.12/requirements.txt file remained at jupyter-core==5.7.2 while other runtime images were updated to 5.8.1 during PR #2000 to address CVE-2025-30167. jiridanek requested a separate GitHub issue to track this remaining update as the reason for the file being stuck at the old version was unclear.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#2000
File: runtimes/pytorch/ubi9-python-3.12/requirements.txt:804-807
Timestamp: 2025-08-20T12:18:19.213Z
Learning: The runtimes/rocm-tensorflow/ubi9-python-3.12/requirements.txt file remained at jupyter-core==5.7.2 while other runtime images were updated to 5.8.1 during PR #2000 to address CVE-2025-30167. jiridanek requested a separate GitHub issue (#2055) to track this remaining update as the reason for the file being stuck at the old version was unclear.
📚 Learning: 2025-07-02T18:59:15.788Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1259
File: jupyter/rocm/tensorflow/ubi9-python-3.12/kustomize/base/service.yaml:5-15
Timestamp: 2025-07-02T18:59:15.788Z
Learning: jiridanek creates targeted GitHub issues for specific test quality improvements identified during PR reviews in opendatahub-io/notebooks. Issue #1268 demonstrates this by converting a review comment about insufficient tf2onnx conversion test validation into a comprehensive improvement plan with clear acceptance criteria, code examples, and ROCm-specific context.

Applied to files:

  • jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb
📚 Learning: 2025-09-16T15:46:55.327Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-09-16T15:46:55.327Z
Learning: jiridanek requested GitHub issue creation for TensorFlow test notebook improvements during PR #1975 review, consolidating multiple review nitpicks into a single comprehensive issue covering code organization, error handling, documentation consistency, testing methodology, and notebook standards alignment, following the established pattern of systematic code quality improvements through detailed issue tracking.

Applied to files:

  • jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb
📚 Learning: 2025-08-06T15:51:55.727Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-08-06T15:51:55.727Z
Learning: jiridanek requested GitHub issue creation for unused pathlib.Path import in jupyter/minimal/ubi9-python-3.12/test/test_notebook.ipynb during PR #1686 review. Issue #1687 was created with comprehensive problem description covering unused import at line 14, clear solution with diff example, detailed acceptance criteria including verification steps and broader audit suggestion, and proper context linking with PR and comment references, assigned to dibryant, continuing the established pattern of systematic code quality improvements through detailed issue tracking.

Applied to files:

  • jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb
📚 Learning: 2025-08-06T15:51:58.704Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-08-06T15:51:58.704Z
Learning: jiridanek requested GitHub issue creation for unused pathlib.Path import removal in jupyter/minimal/ubi9-python-3.12/test/test_notebook.ipynb during PR #1686 review. Issue #1688 was successfully created with comprehensive problem description covering static analysis findings, specific file location and line number, clear before/after solution, detailed acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements through detailed issue tracking.

Applied to files:

  • jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb
📚 Learning: 2025-09-16T15:46:55.327Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-09-16T15:46:55.327Z
Learning: jiridanek requested GitHub issue creation for TensorFlow test notebook improvements during PR #1975 review, consolidating multiple review nitpicks into a single comprehensive issue covering code organization, error handling, documentation consistency, testing methodology, and notebook standards alignment. Issue #2491 was successfully created with detailed problem descriptions, three solution options, comprehensive acceptance criteria, phased implementation guidance, and proper context linking, continuing the established pattern of systematic code quality improvements through detailed issue tracking.

Applied to files:

  • jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb
📚 Learning: 2025-08-20T12:39:54.827Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#2000
File: runtimes/rocm-pytorch/ubi9-python-3.11/requirements.txt:807-809
Timestamp: 2025-08-20T12:39:54.827Z
Learning: Issue #2055 tracks the remaining runtimes/rocm-tensorflow/ubi9-python-3.12/requirements.txt file that stayed at jupyter-core==5.7.2 during PR #2000, which will be addressed separately due to specific challenges with that ROCm TensorFlow image.

Applied to files:

  • jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb
📚 Learning: 2025-07-09T08:07:24.937Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1333
File: runtimes/rocm-tensorflow/ubi9-python-3.12/Pipfile:13-15
Timestamp: 2025-07-09T08:07:24.937Z
Learning: jiridanek requested GitHub issue creation for tensorflow_rocm Python 3.12 compatibility problem during PR #1333 review. Issue #1354 was successfully created with comprehensive problem description covering missing cp312 wheels causing build failures, three solution options (upstream TensorFlow, Python 3.11 only, custom build), clear acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements through detailed issue tracking.

Applied to files:

  • jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb
📚 Learning: 2025-07-08T19:29:32.006Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1333
File: runtimes/tensorflow/ubi9-python-3.12/Pipfile:13-15
Timestamp: 2025-07-08T19:29:32.006Z
Learning: jiridanek requested GitHub issue creation for investigating TensorFlow "and-cuda" extras usage patterns during PR #1333 review. Issue #1340 was created with comprehensive investigation framework covering platform-specific analysis, deployment scenarios, TensorFlow version compatibility, clear acceptance criteria, testing approach, and implementation timeline, continuing the established pattern of systematic code quality improvements through detailed issue tracking.

Applied to files:

  • jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb
📚 Learning: 2025-07-08T19:29:32.006Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1333
File: runtimes/tensorflow/ubi9-python-3.12/Pipfile:13-15
Timestamp: 2025-07-08T19:29:32.006Z
Learning: jiridanek requested GitHub issue creation for investigating TensorFlow "and-cuda" extras usage patterns during PR #1333 review. Issue #1345 was created with comprehensive investigation framework covering platform-specific analysis, deployment scenarios, TensorFlow version compatibility, clear acceptance criteria, and testing approach, continuing the established pattern of systematic code quality improvements through detailed issue tracking.

Applied to files:

  • jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb
📚 Learning: 2025-07-08T13:21:09.150Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1306
File: jupyter/trustyai/ubi9-python-3.12/test/test_notebook.ipynb:112-126
Timestamp: 2025-07-08T13:21:09.150Z
Learning: jiridanek requested GitHub issue creation for notebook linting and formatting improvements during PR #1306 review, specifically to address inconsistent metadata across .ipynb files and implement systematic quality standards. This continues the established pattern of comprehensive issue creation for code quality improvements with detailed problem descriptions, multiple solution options, phased acceptance criteria, and proper context linking.

Applied to files:

  • jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb
📚 Learning: 2025-08-01T16:03:18.732Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1591
File: codeserver/ubi9-python-3.11/Pipfile.lock:1-1
Timestamp: 2025-08-01T16:03:18.732Z
Learning: jiridanek requested GitHub issue creation for Keras 3 / TensorFlow API compatibility problem during PR #1591 review. Issue #1594 was successfully created with comprehensive problem description covering API confusion between standalone keras==3.11.1 and tf.keras bundled with tensorflow==2.18.1, multiple solution options (remove standalone Keras, set KERAS_BACKEND, or documentation), clear acceptance criteria, affected files analysis, and proper context linking, continuing the established pattern of systematic code quality improvements through detailed issue tracking.

Applied to files:

  • jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb
📚 Learning: 2025-08-27T15:14:05.619Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-08-27T15:14:05.619Z
Learning: jiridanek requested GitHub issue creation for tensorflow-rocm dependency-metadata override reassessment during PR #2145 review, identifying that the current `requires-dist = []` approach may be dangerous and hard to maintain since environments already exclude Windows. Issue #2153 was created with comprehensive safety analysis covering metadata masking risks, maintenance concerns, investigation areas for necessity testing, multiple solution options from complete removal to targeted alternatives, and acceptance criteria for proper dependency management, continuing the established pattern of systematic code quality improvements through detailed issue tracking.

Applied to files:

  • jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb
📚 Learning: 2025-07-08T19:35:49.482Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1333
File: runtimes/rocm-pytorch/ubi9-python-3.12/utils/bootstrapper.py:1-769
Timestamp: 2025-07-08T19:35:49.482Z
Learning: jiridanek requested GitHub issue creation for bootstrapper code duplication problem in runtimes/rocm-pytorch/ubi9-python-3.12/utils/bootstrapper.py during PR #1333 review. After an initial failed attempt, issue #1349 was successfully created with comprehensive problem description covering maintenance overhead and consistency risks from duplicate implementations across 5 Python 3.12 runtime environments, four solution options (symlinks, import-based, template-based, direct shared import) with pros/cons analysis, clear acceptance criteria for consolidation and maintainability, step-by-step implementation guidance, and proper context linking, continuing the established pattern of systematic code quality improvements through detailed issue tracking.

Applied to files:

  • jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb
📚 Learning: 2025-09-05T12:10:24.058Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#2265
File: .tekton/odh-workbench-jupyter-tensorflow-rocm-py312-ubi9-pull-request.yaml:16-17
Timestamp: 2025-09-05T12:10:24.058Z
Learning: jiridanek requested GitHub issue creation for unrelated datascience repo path watches in ROCm TensorFlow pull request pipeline during PR #2265 review, specifically to remove unnecessary mongodb-org-6.0.repo-x86_64 and mssql-2022.repo-x86_64 path watches that are not actually used by the ROCm TensorFlow Dockerfile while preserving setup-elyra.sh and other relevant dependencies, continuing the established pattern of systematic code quality improvements through detailed issue tracking.

Applied to files:

  • jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb
📚 Learning: 2025-08-20T17:51:39.525Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1259
File: jupyter/rocm/tensorflow/ubi9-python-3.12/Pipfile:31-36
Timestamp: 2025-08-20T17:51:39.525Z
Learning: jiridanek consistently escalates point issues identified during PR reviews into systematic repository-wide improvements. When CodeRabbit flagged missing libxcrypt-compat in a single ROCm TensorFlow Python 3.12 image during PR #1259 review, jiridanek requested creation of issue #2075 for systematic review and fixing of all Python 3.12 UBI9 images, demonstrating his comprehensive approach to infrastructure consistency and code quality.

Applied to files:

  • jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb
📚 Learning: 2025-07-11T11:15:47.424Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1379
File: .tekton/odh-workbench-jupyter-datascience-cpu-py312-ubi9-push.yaml:14-17
Timestamp: 2025-07-11T11:15:47.424Z
Learning: jiridanek requested GitHub issue creation for CEL filter problem in datascience workbench Tekton pipelines during PR #1379 review. Issue #1383 was successfully created with comprehensive problem description covering both Python 3.11 and 3.12 pipelines incorrectly watching jupyter/minimal directories instead of jupyter/datascience directories, detailed impact analysis of pipeline execution failures, complete solution with before/after code examples, thorough acceptance criteria for path updates and pipeline triggering verification, implementation notes about repository structure alignment, and proper context linking, continuing the established pattern of systematic code quality improvements through detailed issue tracking.

Applied to files:

  • jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb
📚 Learning: 2025-07-08T19:09:48.746Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1306
File: jupyter/trustyai/ubi9-python-3.12/kustomize/base/kustomization.yaml:8-12
Timestamp: 2025-07-08T19:09:48.746Z
Learning: jiridanek requested GitHub issue creation for misleading CUDA prefix in TrustyAI image tags during PR #1306 review. Issue was created with comprehensive problem description covering both Python 3.11 and 3.12 versions, repository pattern analysis showing correct vs incorrect naming, clear solution with code examples, detailed acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements through detailed issue tracking.

Applied to files:

  • jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb
📚 Learning: 2025-07-08T19:09:48.746Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1306
File: jupyter/trustyai/ubi9-python-3.12/kustomize/base/kustomization.yaml:8-12
Timestamp: 2025-07-08T19:09:48.746Z
Learning: jiridanek requested GitHub issue creation for misleading CUDA prefix in TrustyAI image tags during PR #1306 review, affecting both Python 3.11 and 3.12 versions. Issue #1338 was created with comprehensive problem description covering both affected images, repository pattern analysis comparing correct vs incorrect naming conventions, clear solution with code examples, detailed acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements through detailed issue tracking.

Applied to files:

  • jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb
📚 Learning: 2025-08-20T12:19:34.523Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#2000
File: runtimes/tensorflow/ubi9-python-3.11/Pipfile:41-41
Timestamp: 2025-08-20T12:19:34.523Z
Learning: jiridanek created GitHub issue #2055 to track the remaining runtimes/rocm-tensorflow/ubi9-python-3.12/Pipfile.lock file that stayed at jupyter-core==5.7.2 during PR #2000, ensuring systematic follow-up for complete CVE-2025-30167 remediation across all runtime images in the opendatahub-io/notebooks repository.

Applied to files:

  • jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb
📚 Learning: 2025-08-01T14:46:03.215Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-08-01T14:46:03.215Z
Learning: jiridanek requested GitHub issue creation for two nitpicks during PR #1588 review: comment wording improvement in ROCm TensorFlow Dockerfile and typo fix in Jupyter DataScience Dockerfile stage header. Issues #1589 and #1590 were successfully created with comprehensive problem descriptions, specific file locations and line numbers, clear before/after solutions, detailed acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements through detailed issue tracking.

Applied to files:

  • jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb
📚 Learning: 2025-07-03T07:03:45.020Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1259
File: jupyter/rocm/tensorflow/ubi9-python-3.12/Pipfile:13-15
Timestamp: 2025-07-03T07:03:45.020Z
Learning: The Python 3.11 infrastructure for ROCm TensorFlow images in opendatahub-io/notebooks is already properly configured in the Makefile with both BASE_DIRS entries for Pipfile lock renewals and all-images targets for CI builds, requiring only commenting out the corresponding Python 3.12 entries when downgrading due to wheel availability issues.

Applied to files:

  • jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb
📚 Learning: 2025-07-03T16:18:59.234Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1306
File: jupyter/trustyai/ubi9-python-3.12/test/test_notebook.ipynb:44-50
Timestamp: 2025-07-03T16:18:59.234Z
Learning: In the opendatahub-io/notebooks repository, the expected_versions.json file referenced in test notebooks (like test_notebook.ipynb) is generated during test execution, not included as a static file in the PR. This is an established testing pattern that should not be flagged as a missing file issue. The pattern is actively managed through issues like #1243 "Improve error handling in get_expected_version() functions across test notebooks" and #1254 "Fix undefined variable error in ROCm PyTorch Python 3.12 test notebook".

Applied to files:

  • jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb
📚 Learning: 2025-08-08T08:38:32.988Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1760
File: jupyter/pytorch+llmcompressor/ubi9-python-3.11/Dockerfile.cuda:241-244
Timestamp: 2025-08-08T08:38:32.988Z
Learning: Policy: In opendatahub-io/notebooks, do not remove micropipenv from Python 3.11 images to avoid breaking existing users. Cleanups can deduplicate duplicate installs and remove unused uv, but micropipenv must remain present in 3.11 images.

Applied to files:

  • jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb
📚 Learning: 2025-08-27T07:37:13.713Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#2114
File: Makefile:22-24
Timestamp: 2025-08-27T07:37:13.713Z
Learning: jiridanek's approach to removing Python 3.11 workbenches involves handling different components incrementally across multiple PRs: Tekton pipeline cleanup in the current PR, pr-merge-image-delete.yml cleanup in a subsequent PR, while preserving historical context comments in workflow templates that don't require changes.

Applied to files:

  • jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb
📚 Learning: 2025-08-05T17:24:08.616Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-08-05T17:24:08.616Z
Learning: jiridanek requested PR review for #1521 covering s390x architecture support improvements, demonstrating continued focus on systematic multi-architecture compatibility enhancements in the opendatahub-io/notebooks repository through clean implementation with centralized configuration, proper CI integration, and architecture-aware testing patterns.

Applied to files:

  • jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb
🪛 Ruff (0.12.2)
jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb

78-78: Unused noqa directive (non-enabled: PLC0415, F401)

Remove unused noqa directive

(RUF100)

🔇 Additional comments (1)
jupyter/rocm/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb (1)

13-15: LGTM on non-functional tidy-ups.

Import tweaks, quoting/style changes, and minor whitespace look good.

Also applies to: 21-22, 25-31, 37-37, 41-41, 43-45, 48-50, 56-56, 66-66, 75-75, 77-77, 90-90, 94-94, 99-99, 104-104

@jiridanek
Copy link
Member

/ok-to-test

@openshift-ci openshift-ci bot added the lgtm label Sep 16, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 16, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jiridanek

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jiridanek
Copy link
Member

@coderabbitai suggest next steps

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 16, 2025

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

@jiridanek Based on the PR status and conversation, here are the suggested next steps:

Immediate Next Steps

  1. PR is Ready for Merge: The tensorboard import removal is approved and technically sound. The CI failures are unrelated to this change and stem from the known RHOAIENG-19036 issue.

  2. Merge Process: Since you've already applied /lgtm, /approve, and /ok-to-test, the PR appears ready. You may want to:

    • Wait for @atheo89's input as mentioned, or
    • Proceed with merge if no additional maintainer approval is required

Follow-up Opportunities

  1. CI Infrastructure Issues: While @pramodtoraskar correctly wants to keep this PR focused, the failing tests represent ongoing technical debt. Consider:

  2. Process Documentation: This interaction highlighted good practices for new contributors (focused PRs, understanding CI vs. code issues) that could benefit documentation.

Recommendation

Merge this PR now - it successfully addresses issue #2077 with a clean, focused fix. The CI failures shouldn't block this straightforward improvement.

The systematic approach shown here (focused PR scope, clear issue resolution) aligns well with the established patterns for code quality improvements in this repository.


🏁 Script executed:

#!/bin/bash
# Check the current PR status and recent activity
gh pr view 2111 --repo opendatahub-io/notebooks --json title,state,mergeable,statusCheckRollup,reviews,labels

Length of output: 43178


@jiridanek Based on the current PR status, here are the next steps:

Current Status

  • Approved and Ready: PR has lgtm, approved, and ok-to-test labels
  • Mergeable: No merge conflicts
  • CI Blocking: Several checks are failing, preventing merge

Immediate Issues to Address

  1. Code Static Analysis Failure: My recent review identified 3 nitpicks that may be causing the static analysis failure:

    • Ruff RUF100: Unused noqa directive on Line 78
    • Bare assert instead of unittest assertion on Line 71
    • Missing cleanup for temp directories
  2. Build Failures: The ROCm TensorFlow build failure is likely the known RHOAIENG-19036 issue you mentioned.

Recommended Next Steps

Option A - Quick Fix (Preferred):

  • Address the simple Ruff RUF100 error by removing the unused # noqa: PLC0415, F401 on Line 78
  • This should resolve the static analysis failure and allow merge

Option B - Comprehensive Approach:
Following your established pattern of systematic improvements, I could create a follow-up issue consolidating the test notebook improvements (similar to your previous requests for issues #2491, #1687, etc.) covering:

  • Proper unittest assertions instead of bare asserts
  • Better tensorboard import checking
  • Temporary directory cleanup
  • Test robustness improvements

My Recommendation

Fix the RUF100 error now to unblock this PR, then merge it. The core tensorboard import removal is sound and addresses issue #2077 successfully. The other nitpicks can be addressed systematically later if desired.

Would you like me to create a follow-up issue for the broader test improvements, following your established pattern?


🧠 Learnings used
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1259
File: jupyter/rocm/tensorflow/ubi9-python-3.12/kustomize/base/service.yaml:5-15
Timestamp: 2025-07-02T18:59:15.788Z
Learning: jiridanek creates targeted GitHub issues for specific test quality improvements identified during PR reviews in opendatahub-io/notebooks. Issue #1268 demonstrates this by converting a review comment about insufficient tf2onnx conversion test validation into a comprehensive improvement plan with clear acceptance criteria, code examples, and ROCm-specific context.

Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-09-16T15:46:55.327Z
Learning: jiridanek requested GitHub issue creation for TensorFlow test notebook improvements during PR #1975 review, consolidating multiple review nitpicks into a single comprehensive issue covering code organization, error handling, documentation consistency, testing methodology, and notebook standards alignment, following the established pattern of systematic code quality improvements through detailed issue tracking.

Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-09-16T15:46:55.327Z
Learning: jiridanek requested GitHub issue creation for TensorFlow test notebook improvements during PR #1975 review, consolidating multiple review nitpicks into a single comprehensive issue covering code organization, error handling, documentation consistency, testing methodology, and notebook standards alignment. Issue #2491 was successfully created with detailed problem descriptions, three solution options, comprehensive acceptance criteria, phased implementation guidance, and proper context linking, continuing the established pattern of systematic code quality improvements through detailed issue tracking.

Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-08-05T17:24:08.616Z
Learning: jiridanek requested PR review for #1521 covering s390x architecture support improvements, demonstrating continued focus on systematic multi-architecture compatibility enhancements in the opendatahub-io/notebooks repository through clean implementation with centralized configuration, proper CI integration, and architecture-aware testing patterns.

Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-11T11:16:05.131Z
Learning: jiridanek requested GitHub issue creation for RStudio py311 Tekton push pipelines during PR #1379 review. Issue #1384 was successfully created covering two RStudio variants (CPU and CUDA) found in manifests/base/params-latest.env, with comprehensive problem description, implementation requirements following the same pattern as other workbench pipelines, clear acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements through detailed issue tracking.

Learnt from: jiridanek
PR: opendatahub-io/notebooks#1333
File: runtimes/rocm-tensorflow/ubi9-python-3.12/Pipfile:13-15
Timestamp: 2025-07-09T08:07:24.937Z
Learning: jiridanek requested GitHub issue creation for tensorflow_rocm Python 3.12 compatibility problem during PR #1333 review. Issue #1354 was successfully created with comprehensive problem description covering missing cp312 wheels causing build failures, three solution options (upstream TensorFlow, Python 3.11 only, custom build), clear acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements through detailed issue tracking.

Learnt from: jiridanek
PR: opendatahub-io/notebooks#2265
File: .tekton/odh-workbench-jupyter-tensorflow-rocm-py312-ubi9-pull-request.yaml:16-17
Timestamp: 2025-09-05T12:10:24.058Z
Learning: jiridanek requested GitHub issue creation for unrelated datascience repo path watches in ROCm TensorFlow pull request pipeline during PR #2265 review, specifically to remove unnecessary mongodb-org-6.0.repo-x86_64 and mssql-2022.repo-x86_64 path watches that are not actually used by the ROCm TensorFlow Dockerfile while preserving setup-elyra.sh and other relevant dependencies, continuing the established pattern of systematic code quality improvements through detailed issue tracking.

Learnt from: jiridanek
PR: opendatahub-io/notebooks#2185
File: jupyter/pytorch/ubi9-python-3.12/Dockerfile.cuda:109-117
Timestamp: 2025-08-29T08:48:55.985Z
Learning: jiridanek prefers to implement systematic cleanup improvements through dedicated GitHub issues (like #2076) rather than applying individual point fixes during PR reviews, maintaining consistency with their established pattern of comprehensive code quality improvements.

Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-08-06T15:51:58.704Z
Learning: jiridanek requested GitHub issue creation for unused pathlib.Path import removal in jupyter/minimal/ubi9-python-3.12/test/test_notebook.ipynb during PR #1686 review. Issue #1688 was successfully created with comprehensive problem description covering static analysis findings, specific file location and line number, clear before/after solution, detailed acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements through detailed issue tracking.

Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-08-06T15:51:55.727Z
Learning: jiridanek requested GitHub issue creation for unused pathlib.Path import in jupyter/minimal/ubi9-python-3.12/test/test_notebook.ipynb during PR #1686 review. Issue #1687 was created with comprehensive problem description covering unused import at line 14, clear solution with diff example, detailed acceptance criteria including verification steps and broader audit suggestion, and proper context linking with PR and comment references, assigned to dibryant, continuing the established pattern of systematic code quality improvements through detailed issue tracking.

Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-08-01T14:46:03.215Z
Learning: jiridanek requested GitHub issue creation for two nitpicks during PR #1588 review: comment wording improvement in ROCm TensorFlow Dockerfile and typo fix in Jupyter DataScience Dockerfile stage header. Issues #1589 and #1590 were successfully created with comprehensive problem descriptions, specific file locations and line numbers, clear before/after solutions, detailed acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements through detailed issue tracking.

Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-08-27T15:14:05.619Z
Learning: jiridanek requested GitHub issue creation for tensorflow-rocm dependency-metadata override reassessment during PR #2145 review, identifying that the current `requires-dist = []` approach may be dangerous and hard to maintain since environments already exclude Windows. Issue #2153 was created with comprehensive safety analysis covering metadata masking risks, maintenance concerns, investigation areas for necessity testing, multiple solution options from complete removal to targeted alternatives, and acceptance criteria for proper dependency management, continuing the established pattern of systematic code quality improvements through detailed issue tracking.

Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-08-27T19:00:57.755Z
Learning: jiridanek requested GitHub issue creation for tensorflow[and-cuda] extra removal investigation during PR #2145 review, addressing the concern that this extra forces CUDA-specific wheels causing cross-platform conflicts while Docker images already supply CUDA via base layer. Issue #2168 was created with comprehensive investigation framework covering dependency differences, runtime verification, performance testing, cross-platform compatibility, and clear acceptance criteria for deciding whether to remove the extra in favor of base tensorflow package.

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 6a36d64 and 2 for PR HEAD c1434bb in total

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 16, 2025

@pramodtoraskar: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/images c1434bb link true /test images

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@jiridanek jiridanek merged commit 0be754e into opendatahub-io:main Sep 16, 2025
12 of 17 checks passed
@pramodtoraskar
Copy link
Contributor Author

Thank you @jiridanek, Truly appreciate moving to next issue and contribution to notebook.

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

Labels

approved lgtm ok-to-test review-requested GitHub Bot creates notification on #pr-review-ai-ide-team slack channel size/m tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove unused tensorboard import (actually, the import itself is a test, so maybe as _ import?)

4 participants