-
Notifications
You must be signed in to change notification settings - Fork 122
NO-JIRA: tests(fix): remove unused tensorboard import (fixes #2077) #2111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
jiridanek
merged 2 commits into
opendatahub-io:main
from
pramodtoraskar:fix-2077-remove-unused-tensorboard-import
Sep 16, 2025
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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:
Alternative approaches to consider:
Questions for the team:
test_tensorboard()method?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.
There was a problem hiding this comment.
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 tensorboardline 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?
There was a problem hiding this comment.
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:
Length of output: 1025
🏁 Script executed:
Length of output: 5077
@jiridanek Excellent intuition! Your suspicion was correct. I found exactly 3 files with unused
import tensorboardstatements:Files with unused tensorboard imports:
jupyter/rocm/tensorflow/ubi9-python-3.11/test/test_notebook.ipynb:15jupyter/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb:15jupyter/tensorflow/ubi9-python-3.11/test/test_notebook.ipynb:15Analysis:
tensorboard.anywheretf.keras.callbacks.TensorBoard()insteadCurrent situation:
Recommendation:
Rather than having separate PRs for each file, I recommend expanding this PR to address all 3 instances comprehensively. This would:
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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:
I'm happy to make this PR comprehensive and address all instances. Just want to make sure I'm following the right approach.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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