https://github.com/dsblank/datagrid
DataGrid for Python mixed-media tables
https://github.com/dsblank/datagrid
Last synced: 6 months ago
JSON representation
DataGrid for Python mixed-media tables
- Host: GitHub
- URL: https://github.com/dsblank/datagrid
- Owner: dsblank
- License: apache-2.0
- Created: 2024-11-30T13:05:36.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-27T14:25:05.000Z (over 1 year ago)
- Last Synced: 2025-12-30T03:34:06.399Z (7 months ago)
- Language: Python
- Size: 1.89 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# datagrid
Create a datagrid of mixed-media items, and log to comet.com.
## Installation
```
pip install datagrid
```
## Example
The following demo program will log 100 random images, scores, and categories:
```python
from comet_ml import start
from datagrid import DataGrid, Image
import random
from PIL import Image as PImage
import requests
experiment = start(project_name="datagrids")
categories = ["sunset", "landscape", "water", "tree", "city"]
dg = DataGrid(
columns=["Image", "Score", "Category"],
name="Demo"
)
url = "https://picsum.photos/200/300"
for i in range(100):
im = PImage.open(requests.get(url, stream=True).raw)
category = random.choice(categories)
score = random.random()
image = Image(im, metadata={"category": category, "score": score})
dg.append([image, score, category])
dg.log(experiment)
experiment.end()
```
## Visualization

Log into comet.com to see results.