rerun-catalog-queries
Qué hace
Esta skill da a tu IA consejos de rendimiento para leer datos de un catálogo de Rerun en Python. Es para desarrolladores cuyas consultas son lentas o que crean flujos que consultan muchos segmentos.
Cuándo usarla
- ✓Cuando una consulta a un catálogo de Rerun desde Python tarda más de lo esperado.
- ✓Cuando estás explorando un conjunto de datos desconocido en un catálogo de Rerun.
- ✓Cuando estás creando un flujo por episodio que llama al catálogo muchas veces.
Link de la skill
https://github.com/rerun-io/rerun/blob/main/skills/rerun-catalog-queries/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Mi script de Python que lee del catálogo de Rerun es muy lento. ¿Cómo puedo acelerarlo?”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
La skill explica que cada lectura es un viaje de ida y vuelta a la nube, y muestra cómo reducir el número de viajes y la cantidad de datos que se devuelven.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
Rerun catalog queries
Practical performance patterns for querying a Rerun catalog
from Python (rerun.catalog.CatalogClient →
dataset.reader(...) → DataFusion DataFrame). The DataFusion side of
the stack is covered by the datafusion-python skill — load that
for DataFrame / SessionContext / expression-API references. This
skill focuses on catalog-specific behaviors and the round-trip costs
that catch teams off guard.
Connect with a rerun:// URL
from rerun.catalog import CatalogClient
client = CatalogClient("rerun+https://api.example.cloud.rerun.io:443")
dataset = client.get_dataset(id=dataset_id)
CatalogClient takes a rerun:// or rerun+https:// URL, or
rerun+http:// for a local server. Do not pass a plain https:// URL.
A segment URL such as
rerun://host:443/dataset/<dataset-id>?segment_id=<segment-id> gives
the server, the dataset id and the segment id.
The client reads the token from REDAP_TOKEN, or from the stored
credentials of rerun auth login, so token= is usually not needed.
The query cost model in one sentence
Every materialization of a dataset.reader(...) DataFrame is one
cloud round-trip, with most of the cost being the network/decode
pair, not the compute. Plan for round-trip count and payload bytes, in
that order.
A typical catalog round-trip is a few seconds even for a tiny result. So:
- 30 segments × 1 query each ≈ 90s. (Naive per-segment loop.)
- 30 segments × 4 queries each ≈ 6 minutes. (A splitter that runs
count+collect_columnfor both starts and stops.) - 1 query covering all 30 segments ≈ 3s.
The same fan-out happens along the entity axis: 10 entities ×
1 filter_contents([one_entity]).reader() each ≈ 30s, vs one
filter_contents([all_entities]).reader() ≈ 3s. Push as much as you
can into one round-trip — across segments and across entities.
Always apply filter_contents and time-window filters before .reader(...)
The single biggest lever:
filter_contents([entity_globs])restricts which entity-path columns the reader produces. Without it, every entity in the dataset is read.- Time-window filters push down to storage and dramatically reduce
bytes scanned when they compare the bare index column with a literal:
df.filter(col(index) >= lit(start)).filter(col(index) <= lit(end)). Integer, timestamp and duration literals of any unit work. Acastor arithmetic on the index column is not pushed down.
Combined: dataset.filter_segments(seg).filter_contents(entities).reader(...) .filter(in_window).select(...).
df.cache() is your friend for repeated probes
When the same materialization gets used by multiple downstream
filter/count/collect calls, materialize once with DataFrame.cache()
and operate on the cached frame:
cached = (
dataset
.filter_segments(seg)
.filter_contents([entity])
.reader(index=index_col)
.select(col(index_col).cast(pa.int64()).alias(index_col), value.alias("v"))
.cache() # one network round-trip, materializes into in-memory batches
)
starts = cached.filter(col("v") == start_val).collect_column(index_col)
stops = cached.filter(stop_pred(col("v"))).collect_column(index_col)
Without cache(), each count() / collect_column() re-executes the
whole reader chain.
When NOT to cache. cache() forces materialization into Arrow
batches, breaking laziness. If downstream code keeps composing more
DataFusion ops on top (joins, windows, further filters) and only
materializes once at the end, caching mid-pipeline turns one execution
into two and pre-empts whatever physical-plan optimizations the engine
could have done across the boundary. Reach for cache() when the
consumers are terminal (count(), collect_column(), to_arrow_table()),
not when they're another lazy DataFrame.
Cross-segment batching: drop filter_segments, group by rerun_segment_id
For pipelines that need the same query on many segments, omit
filter_segments(...) entirely and pull a single cross-segment table.
Every reader row carries a rerun_segment_id column — group locally:
df = dataset.filter_contents(entities).reader(index=index_col)
cached = df.select(
"rerun_segment_id",
col(index_col).cast(pa.int64()).alias(index_col),
value.alias("v"),
).cache()
# Now N filter/aggregate calls are local, not network.
starts = cached.filter(col("v") == start_val).select("rerun_segment_id", index_col).
Preguntas frecuentes
¿Cómo debo conectarme al catálogo?
Usa una URL rerun:// o rerun+https://, no una dirección https normal. El cliente puede leer el token de REDAP_TOKEN.
¿Qué biblioteca maneja el trabajo con DataFrame?
La skill remite a la skill datafusion-python para detalles sobre DataFrame y SessionContext.
¿Por qué son lentas las consultas?
La skill indica que un viaje de ida y vuelta típico tarda unos segundos, así que lo que más importa es el número de lecturas.
Detalles
Descripción original del autor
Performance patterns and gotchas for querying a Rerun catalog from Python. Reach for this when exploring an unfamiliar dataset, when a CatalogClient/dataset query is unexpectedly slow, or when shaping a per-segment / per-episode pipeline that hits the catalog from many places.
repo: rerun-io/rerun
Popularidad
- Estrellas en GitHub
- 12 mil
- Posición en el ranking
- #11549
- Licencia
- Apache-2.0
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
investigate-puffin
12 milPermite que tu agente investigue grabaciones del perfilador Puffin (.puffin), encuentre el código lento y compare trazas de antes y después de un cambio.
rerun-blueprint
12 milEnseña a tu agente a cambiar el aspecto del visor de Rerun escribiendo un blueprint para una grabación o tabla, con diseño, vistas y columnas ocultas.
rerun-chunk-processing
12 milEnseña a tu agente a crear flujos de datos de Rerun con lectores y lentes que convierten archivos MCAP, Parquet, video o RRD en grabaciones.
rerun-data-model
12 milAyuda a tu agente a relacionar datos de robots o multimodales con el modelo de datos de Rerun, decidiendo primero entidades, componentes y valores estáticos o temporales.
Skills parecidas
discrawl
394 milPermite que tu agente busque y resuma un archivo local guardado de mensajes de Discord, revise qué tan actual es y lea mensajes directos.
clickhouse-io
280 milAyuda a tu agente a optimizar consultas y esquemas en ClickHouse con buenas prácticas para cargas analíticas de alto rendimiento. Úsalo si las consultas son muy lentas.
scientific-db-pubmed-database
280 milAyuda a tu agente a buscar artículos científicos del ámbito biomédico. Es útil para investigaciones que necesitan información médica específica.