rerun-catalog-queries
यह क्या करती है
यह स्किल आपके AI को Python से Rerun कैटलॉग का डेटा पढ़ने के लिए परफ़ॉर्मेंस सुझाव देती है। यह उन डेवलपर्स के लिए है जिनकी डेटासेट क्वेरी धीमी लगती है या जो कई सेगमेंट पर क्वेरी चलाने वाली पाइपलाइन बनाते हैं।
कब इस्तेमाल करें
- ✓जब Python से Rerun कैटलॉग पर क्वेरी उम्मीद से धीमी चलती है।
- ✓जब आप Rerun कैटलॉग में किसी अनजान डेटासेट को समझ रहे हैं।
- ✓जब आप एपिसोड-दर-एपिसोड पाइपलाइन बना रहे हैं जो कैटलॉग को कई बार कॉल करती है।
Skill का लिंक
https://github.com/rerun-io/rerun/blob/main/skills/rerun-catalog-queries/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरी Python स्क्रिप्ट जो Rerun कैटलॉग से डेटा पढ़ती है, बहुत धीमी है। इसे कैसे तेज़ किया जा सकता है?”
हर हफ़्ते 5 नई skills, 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
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
investigate-puffin
12kयह आपके एजेंट को Puffin प्रोफ़ाइलर रिकॉर्डिंग जाँचने, धीमे कोड भाग ढूँढने और बदलाव से पहले-बाद के ट्रेस की तुलना करने में मदद करती है।
rerun-blueprint
12kआपके एजेंट को ब्लूप्रिंट लिखकर Rerun व्यूअर का लेआउट, व्यू और छिपे कॉलम बदलना सिखाती है।
rerun-chunk-processing
12kआपके एजेंट को Rerun डेटा पाइपलाइन बनाना सिखाती है, जो रीडर और लेंस से MCAP, Parquet, वीडियो या RRD फ़ाइलों को रिकॉर्डिंग में बदलती है।
rerun-data-model
12kयह आपके एजेंट को रोबोट या मल्टीमोडल डेटा को Rerun के डेटा मॉडल में रखने में मदद करती है: एंटिटी, कंपोनेंट और स्टैटिक मान तय करके।
मिलती-जुलती skills
discrawl
394kयह आपके एजेंट को Discord संदेशों के सेव किए गए स्थानीय आर्काइव में खोजने, उसका सारांश बनाने और उसकी ताज़गी जांचने में मदद करती है।
clickhouse-io
280kआपके एजेंट को ClickHouse databases में queries और schemas optimize करने में मदद करता है। high-performance analytical workloads के लिए best practices लागू करता है। जब analytical queries बहुत धीमी हों, तब इसका उपयोग करें।
scientific-db-pubmed-database
280kआपके एजेंट को बायोमेडिकल क्षेत्र के वैज्ञानिक लेख खोजने में मदद करता है। जिस रिसर्च में खास मेडिकल जानकारी चाहिए, उसके लिए यह काम का है।