ENH: make pytensor-cache list pipeable (one record per line)

Đang mở
#2,533 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
64/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
cli

Hướng nghiên cứu

Find the pytensor-cache list command and read the related change in #2532, along with the convention in #2531. Update the output so each compiled module has one tab-separated line with its path first, directory size, and age; check whether aggregate output belongs on stderr or behind --summary. Done means the listed records can be consumed uniformly by tools such as grep, awk, and fzf.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Description

The current list output is a multi-section aligned report. Facts from a real cache (323 modules, 68 MB):

  • The compile-time column is nans for every module: it is computed from mod.c and .so mtimes, which cache-hit entries do not both have.
  • Sizes shown are key.pkl sizes only; the .so files, which hold the actual bulk, have no size column.
  • Module age is not shown.
  • The multiple-ops case goes to a separate table, so lines cannot be uniformly consumed by grep/awk/fzf.
Proposal

One line per compiled module, tab-separated, path first:

<key_dir_path>\t<ops>\t<dir_size>\t<age>
  • Path first so column 1 feeds fzf, xargs rm -rf, awk '{print $1}'.
  • Dir size (not just key size) and age answer "what is this, how big, how old".
  • Compile time is dropped unless it can be computed reliably.
  • Aggregate views (op-class counts, big-key report, 0-op summary) move to stderr, per the convention of #2531, or behind --summary.

Use cases: pytensor-cache list | fzf --preview 'ls -la {1}', ... | grep Elemwise, bloat hunting with sort. Builds on #2532; a --json flag could be a follow-up.

Ngôn ngữ chính
Python
Star
654
Fork
258
Merge trung bình
3 ngày 41 phút
Pull request đã merge (30 ngày)
42

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của pymc-devs/pytensor

Tất cả issue của pymc-devs/pytensor

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.