Assign per-instance TensorBoard ports from session_state registry#280
Merged
Assign per-instance TensorBoard ports from session_state registry#280
Conversation
Each panel instance now reads COMET_PANEL_INSTANCE_ID and uses a shared session_state dict to claim a unique port in the range 6000-6009, rather than all instances hardcoding port 6007. Raises RuntimeError if all 10 ports are exhausted. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…e experiment objects Streamlit deepcopies session state when registering widgets, which fails when experiment objects contain thread locks. Replace direct selectbox usage with a select_experiment() helper that stores only a picklable integer index and looks up the experiment by position. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
COMET_PANEL_INSTANCE_IDand claims a unique port (6000–6009) from a sharedsession_statedict instead of all instances hardcoding port 6007get_instance_port()helper handles port assignment — returns an existing port if the instance has been seen before, or allocates the next available oneRuntimeErrorif all 10 ports are exhaustedFiles changed
panels/TensorboardProfileViewer.pypanels/TensorboardProfileViewer/TensorboardProfileViewer.pypanels/TensorboardGroupViewer.pypanels/TensorboardGroupViewer/TensorboardGroupViewer.pypanels/TensorboardTorchProfilerViewer/TensorboardTorchProfilerViewer.pyTest plan
🤖 Generated with Claude Code