rerun-catalog-queries
하는 일
이 스킬은 Python에서 Rerun 카탈로그의 데이터를 읽을 때의 성능 팁을 AI에게 제공합니다. 데이터셋 조회가 느리거나 여러 세그먼트를 조회하는 파이프라인을 만드는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓Python에서 Rerun 카탈로그 조회가 예상보다 느릴 때.
- ✓익숙하지 않은 데이터셋을 Rerun 카탈로그에서 살펴볼 때.
- ✓카탈로그를 여러 번 호출하는 에피소드별 파이프라인을 만드는 경우.
스킬 링크
https://github.com/rerun-io/rerun/blob/main/skills/rerun-catalog-queries/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“카탈로그에서 데이터를 읽는 제 Python 스크립트가 아주 느립니다. 어떻게 빠르게 만들 수 있을까요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 스킬은 각 읽기가 클라우드 왕복 한 번이라고 설명하고, 왕복 횟수와 되돌아오는 데이터 양을 줄이는 방법을 보여 줍니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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).
자주 묻는 질문
카탈로그에는 어떻게 연결하나요?
평범한 https 주소가 아니라 rerun:// 또는 rerun+https:// URL을 사용해야 합니다. 클라이언트는 REDAP_TOKEN 환경 변수에서 토큰을 읽을 수 있습니다.
DataFrame 작업은 어떤 라이브러리가 맡나요?
DataFrame과 SessionContext 세부 사항은 datafusion-python 스킬을 참고하도록 안내합니다.
조회가 느린 이유는 무엇인가요?
일반적인 왕복에는 몇 초가 걸리므로, 읽기 횟수가 가장 큰 영향을 준다고 이 스킬은 설명합니다.
상세 정보
작성자의 원본 설명
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
인기도
- GitHub 스타
- 12k
- 순위
- #11549
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
investigate-puffin
12k에이전트가 Puffin 프로파일러 기록(.puffin 파일)을 살펴보고, 느린 코드 구간을 찾고, 변경 전후의 추적 결과를 비교하도록 돕습니다.
rerun-blueprint
12k에이전트가 블루프린트를 작성해 Rerun 뷰어의 모습을 바꾸도록 가르칩니다. 레이아웃, 뷰, 숨긴 열을 포함합니다.
rerun-chunk-processing
12k에이전트에게 리더와 렌즈로 Rerun 데이터 파이프라인을 만드는 법을 가르칩니다. MCAP, Parquet, 비디오, RRD 파일을 녹화로 변환합니다.
rerun-data-model
12k에이전트가 로봇이나 멀티모달 데이터를 Rerun 데이터 모델에 대응시키도록 돕습니다. 엔티티, 컴포넌트, 정적 값 또는 시간 기반 값을 먼저 정합니다.
비슷한 스킬
discrawl
394k에이전트가 저장된 로컬 Discord 메시지 보관본을 검색하고 요약하며, 최신 상태를 확인하고 다이렉트 메시지를 읽도록 돕습니다.
clickhouse-io
280k에이전트가 ClickHouse 데이터베이스의 쿼리와 스키마를 최적화하도록 돕습니다. 고성능 분석 작업의 모범 사례를 적용합니다. 분석 쿼리가 느릴 때 씁니다.
scientific-db-pubmed-database
280k생의학 분야의 과학 논문을 에이전트가 검색하도록 돕습니다. 특정 의학 정보가 필요한 연구에 유용합니다.