rerun-catalog-queries
O que ela faz
Esta skill dá à sua IA dicas de desempenho para ler dados de um catálogo Rerun em Python. Ela é para desenvolvedores cujas consultas a conjuntos de dados parecem lentas ou que criam pipelines que consultam muitos segmentos.
Quando usar
- ✓Quando uma consulta a um catálogo Rerun em Python é mais lenta do que o esperado.
- ✓Quando você está explorando um conjunto de dados desconhecido em um catálogo Rerun.
- ✓Quando você está criando um pipeline por episódio que chama o catálogo muitas vezes.
Link da skill
https://github.com/rerun-io/rerun/blob/main/skills/rerun-catalog-queries/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“O meu script em Python que lê do catálogo Rerun está muito lento. Como posso acelerá-lo?”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
A skill explica que cada leitura é uma ida e volta à nuvem e mostra como reduzir o número dessas idas e voltas e a quantidade de dados enviados de volta.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do 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).
Perguntas frequentes
Como devo me conectar ao catálogo?
Use uma URL rerun:// ou rerun+https://, e não um endereço https comum. O cliente pode ler o token da variável REDAP_TOKEN.
Qual biblioteca cuida do trabalho com DataFrames?
A skill indica a skill datafusion-python para detalhes sobre DataFrame e SessionContext.
Por que as consultas são lentas?
A skill diz que uma ida e volta típica leva alguns segundos, então o número de leituras é o que mais importa.
Detalhes
Descrição original do 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
Popularidade
- Estrelas no GitHub
- 12 mil
- Posição no ranking
- #11549
- Licença
- Apache-2.0
- Atualizada em
- 02/11/2026
Comentários
- …
Mais skills deste repositório
investigate-puffin
12 milPermite que seu agente investigue gravações do profiler Puffin (arquivos .puffin), encontre trechos de código lentos e compare traces de antes e depois de uma mudança.
rerun-blueprint
12 milEnsina seu agente a mudar a aparência do visualizador Rerun escrevendo um blueprint para uma gravação ou tabela, incluindo layout, views e colunas ocultas.
rerun-chunk-processing
12 milEnsina seu agente a criar pipelines de dados Rerun com leitores e lentes que convertem arquivos MCAP, Parquet, vídeo ou RRD em gravações.
rerun-data-model
12 milAjuda seu agente a mapear dados de robôs ou multimodais para o modelo de dados do Rerun, decidindo primeiro as entidades, os componentes e os valores estáticos ou baseados em tempo.
Skills parecidas
discrawl
394 milPermite que seu agente pesquise e resuma um arquivo local salvo de mensagens do Discord, verifique quão atualizado ele está e leia mensagens diretas.
clickhouse-io
280 milAjuda seu agente a otimizar consultas e esquemas no ClickHouse com boas práticas de alta performance. Use quando consultas analíticas forem lentas.
scientific-db-pubmed-database
280 milAjuda seu agente a buscar artigos científicos na área biomédica. É útil para pesquisas que precisam de informações médicas específicas.