跳到正文
cccskills
免费在 GitHub 公开

query-finelog

Investigate Finelog logs and runtime measurements for Iris tasks, training, and vLLM. Discover available fields, write time-bounded SQL, summarize resource usage, compare central and regional records, and interpret counters correctly.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Query Finelog logs and telemetry for Iris tasks, workers, profiles, training, vLLM, and cross-cluster forwarding. Use for schema discovery, SQL, memory or CPU summaries, hub-versus-regional comparisons, counter semantics, and query-performance diagnosis.

查看安装方法

适用场景

  • Summarizing Iris task memory and CPU usage
  • Comparing central and regional logs for forwarding delays
  • Aggregating vLLM counters with reset handling
  • Discovering schemas and diagnosing slow queries

包含的文件(1)

  • SKILL.md4.5 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Query Finelog

Read lib/finelog/OPS.md for access and query behavior. Read lib/iris/OPS.md under Stats Namespaces for Iris namespace meanings.

Discover before querying; do not assert remembered columns:

uv run finelog namespaces <deployment>
uv run finelog schema <deployment> <namespace>
uv run finelog query <deployment> --format table <<'SQL'
<bounded SQL using schema-confirmed columns>
SQL

finelog query reads SQL from stdin when the positional SQL argument is omitted.

Use marin for the federated view and a regional deployment for peer-local truth or recent rows that may not have forwarded. Preserve cluster and full process/label identity until after per-series delta calculations.

Bound the native time key. Keep telemetry_v1.timestamp_ms predicates numeric. Treat current snapshots as values, imported Prometheus counters as cumulative snapshots with LAG and reset handling, and native Rigging counters as deltas to SUM directly.

Never reset or change a shared namespace during diagnosis. Return the deployment, namespace, time window, query, series semantics, and any forwarding or retention caveat.

Examples

Confirm every schema before adapting an example. Angle-bracket values are placeholders.

Iris task memory by half-hour

Adapted from Echo wiki 230. The dashboard task ID includes the final task index. Select or group by attempt_id after retries.

SELECT date_bin(INTERVAL '30 minutes', ts,
                TIMESTAMP '1970-01-01 00:00:00') AS bucket_start_utc,
       count(*) AS samples,
       round(min(memory_mb) / 1024.0, 1) AS min_gib,
       round(median(memory_mb) / 1024.0, 1) AS median_gib,
       round(max(memory_mb) / 1024.0, 1) AS max_gib,
       round(max(memory_peak_mb) / 1024.0, 1) AS attempt_peak_gib
FROM "iris.task"
WHERE task_id = '/user/job/task'
  AND attempt_id = 0
GROUP BY bucket_start_utc
ORDER BY bucket_start_utc

memory_mb is sampled current memory; memory_peak_mb is the attempt's cumulative peak. Values are MiB despite the names. count(*) exposes partial buckets and gaps. Query the regional deployment if recent hub rows appear incomplete.

Missing federated logs

Use the exact attempt-suffixed log key on both stores:

-- marin hub
SELECT seq, epoch_ms, source, data, cluster
FROM "log"
WHERE key = '/user/job/task:0' AND cluster = 'cw-us-east-08a'
ORDER BY seq;

-- cw-us-east-08a regional deployment
SELECT seq, epoch_ms, source, data
FROM "log"
WHERE key = '/user/job/task:0'
ORDER BY seq;

Regional rows with a missing or shorter hub result mean forwarding delay. Runtime task logs with no regional rows point to shipper or regional ingest. Iris job describe remains the liveness source.

Native delta counter

Native rigging.telemetry.counter(...).add(...) rows are already increments:

SELECT sum(value)
FROM "telemetry_v1.<semantic_scope>"
WHERE name = 'requests_completed'
  AND timestamp_ms >= <start_ms>
  AND timestamp_ms < <end_ms>

Imported cumulative counter

Imported vLLM counters carry source_temporality = 'cumulative_snapshot'. Scan one 60-second scrape before the visible window, preserve the complete series identity, and discard reset intervals.

WITH base AS (
  SELECT COALESCE(NULLIF(cluster, ''), 'local') AS origin_cluster,
         service, name, resource_attributes_json, attributes_json,
         timestamp_ms, seq, value
  FROM "telemetry_v1.vllm"
  WHERE service = 'vllm'
    AND name = 'generation_tokens_total'
    AND json_get(attributes_json, 'source_temporality') = 'cumulative_snapshot'
    AND timestamp_ms >= <start_ms - 60000>
    AND timestamp_ms < <end_ms>
), samples AS (
  SELECT *, lag(value) OVER (
    PARTITION BY origin_cluster, service, name,
                 resource_attributes_json, attributes_json
    ORDER BY timestamp_ms, seq) AS previous_value
  FROM base
), deltas AS (
  SELECT *, CASE WHEN previous_value IS NULL OR value < previous_value
                 THEN NULL ELSE value - previous_value END AS delta
  FROM samples
)
SELECT date_bin(INTERVAL '5 minutes', to_timestamp_millis(timestamp_ms)) AS bucket,
       sum(delta) AS generated_tokens
FROM deltas
WHERE timestamp_ms >= <start_ms>
GROUP BY bucket
ORDER BY bucket

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Compare Zephyr changes using the same prepared dataset and matching execution settings. Analyze Finelog metrics for each processing stage to distinguish CPU efficiency, elapsed time, and peak memory changes, then report improvements, regressions, or tradeoffs.

中文简介正在准备中。当前显示英语简介。

  • Compare Zephyr performance before and after a PR
  • Assess speed gains against additional CPU usage
  • Check peak memory and out-of-memory regressions
marin-community/marin40062026年10月23日 更新

Register Hugging Face datasets for Marin by inspecting their structure without downloading the full dataset. Identify text fields, configurations, and data splits, then add a dataset module and validate the mapping with a sample.

中文简介正在准备中。当前显示英语简介。

  • Registering a Hugging Face dataset for Marin
  • Inspecting text fields without a full dataset download
  • Checking configurations and data splits
marin-community/marin40062026年10月23日 更新

add-grant

免费

Turn a specified GCP access request into a reviewable Pulumi change and pull request. Select the narrowest suitable role and encrypt personal email identities, covering resource permissions and Cloud Run viewer access through IAP, an access gateway.

中文简介正在准备中。当前显示英语简介。

  • Prepare a request for GCS bucket read access
  • Add a viewer to a Cloud Run service protected by IAP
  • Prepare service account impersonation permissions
marin-community/marin40062026年10月23日 更新

Add or update Pallas/Mosaic kernels, specialized computation routines for JAX. The skill covers reference implementations, output and gradient checks, public wrappers, fallback behavior, performance benchmarks, and hardware-specific tuning when requested.

中文简介正在准备中。当前显示英语简介。

  • Adding a Pallas kernel for a JAX computation
  • Checking outputs and gradients against a reference
  • Maintaining backend selection and fallback behavior
marin-community/marin40062026年10月23日 更新

Try model or training changes in a copied Grug or Grugformer experiment, document the differences, and bring successful changes back into the base template while removing superseded experiment code and checking behavior.

中文简介正在准备中。当前显示英语简介。

  • Try changes to attention or masking
  • Experiment with optimizers or training loops
  • Bring successful changes into the base template
marin-community/marin40062026年10月23日 更新

Organize Marin experiment reports into a maintained index, or archive explicitly named older experiments using lasting tags and issue references. Existing conclusions and canonical links are preserved so experiment records remain traceable.

中文简介正在准备中。当前显示英语简介。

  • Organizing an index of experiment reports
  • Consolidating canonical report entries
  • Archiving named legacy experiments
marin-community/marin40062026年10月23日 更新

查看 marin-community 的全部技能

报告此技能的问题