Conversation
Enables trackio.Table to contain trackio.Image objects which are displayed as markdown thumbnails in the UI. Images are properly serialized and saved to the filesystem before table storage. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
🪼 branch checks and previews
|
Contributor
🦄 change detectedThis Pull Request includes changes to the following packages.
✅ Changeset approved by @abidlabs
|
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Images in tables now use /gradio_api/file= format for proper display instead of broken relative paths. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Set datatype="markdown" for the whole table instead of per-column when images are present. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Refactors table media processing to keep related functionality together: - Renames _process_media_in_dataframe to _serialize_media - Adds Table.to_display_format() static method for UI rendering - Removes duplicate UI processing function - Adds _has_media_objects() helper method - Includes comprehensive tests for new methods This reduces coupling between Table serialization and UI display logic. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Removes unnecessary has_images detection and always sets datatype="markdown" for tables. This simplifies the API and code without any functional loss since markdown works fine for regular text content too. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Major simplification that removes the need for _original_dataframe by: - Always storing dataframe directly in self.data during __init__ - Using _process_data() method that checks for media objects on-demand - Fast path for tables without media objects - Unified processing logic in _to_dict() This eliminates duplicate dataframe storage and complex initialization logic while maintaining the same functionality. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Final improvements to the Table class: - Always store data as DataFrame internally (unified representation) - Make _to_dict project/run parameters required for explicit media handling - Add fast path optimization to to_display_format for tables without images - Update all tests to work with the new unified approach This eliminates all type checking complexity and provides optimal performance. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Saba9
approved these changes
Nov 4, 2025
Collaborator
Saba9
left a comment
There was a problem hiding this comment.
This is great! It might be worthwhile to update the docs for Table to mention image support.
Member
Author
Done, thanks @Saba9! |
Merged
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.
Adds support for trackio.Image objects in trackio.Table columns. Images are properly serialized and displayed as markdown thumbnails in the dashboard UI. Closes: #327
Test with:
examples/table/table-with-images.py