[Bug]: [Python] HistogramResult.p95 raises AttributeError because Histogram has no p95()
メンテナーはふだん 2 日以内に返信
評価
調査の方向性
The issue identifies sdks/python/apache_beam/metrics/cells.py and apache_beam.utils.histogram.Histogram. Read the percentile properties and the existing p50(), p90() and p99() methods, then run the relevant Python histogram and metrics tests. Done when HistogramResult.p95 returns the interpolated 95th percentile and the tests cover it; pull request #41710 is already open.
索引モデルが issue の本文から書いたものです。
説明
What happened?
HistogramResult.p95 in sdks/python/apache_beam/metrics/cells.py returns self.data.histogram.p95(), but apache_beam.utils.histogram.Histogram only defines p50(), p90() and p99(). Reading .p95 on a histogram metric result therefore raises AttributeError, while .p90 and .p99 work.
Reproduction
from apache_beam.metrics.cells import HistogramData, HistogramResult
from apache_beam.utils.histogram import Histogram, LinearBucket
histogram = Histogram(LinearBucket(0, 1, 100))
histogram.record(*range(100))
result = HistogramResult(HistogramData(histogram))
print(result.p90, result.p99) # 90.0 99.0
print(result.p95)
# AttributeError: 'Histogram' object has no attribute 'p95'. Did you mean: 'p90'?
Seen on master (f168ee3f6def2e8cf325d40337c3796375366806), Python 3.12.
Expected
result.p95 returns the linearly interpolated 95th percentile, like p90/p99 (95.0 here).
Issue Priority
Priority: 2 (default / most bugs should be filed as P2)
Issue Components
- Component: Python SDK
- 主要言語
- Java
- スター
- 8.7k
- フォーク
- 4.8k
- 平均マージ
- 3日 16時間
- マージ済み PR(30日)
- 445
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/beam のほかの issue
-
awaiting triage java new feature P2
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
[Bug]: [Python] BigTableEnrichmentHandler coerces None lookup keys to literal b'None' and formats blank key name on KeyError対応中かも @shikhabhadoria が 6 日前に担当しました。 オープンio P2 python
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
apache/beam#41346 · コメント 4 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
Release notes links wrong対応中かも @schizophrenicmaniac が 20 日前に担当しました。 オープンbug P3
難易度 1/5 1時間未満 初心者へのやさしさ 67/100
apache/beam#41197 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
apache/beam#39624 · リアクション 2 件 ·
メンテナーはふだん 2 日以内に返信
-
[Bug]: PubsubIO used in batch incorrect batch cutoff size対応中かも @1fanwang が 98 日前に担当しました。 オープンbug io P3 pinned pubsub
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/beam#28011 · コメント 4 件 ·
メンテナーはふだん 2 日以内に返信
似ている issue
-
`ovsx verify` fails for a version older than the 100 newest of an extension対応中かも @trivikr が今日担当しました。 オープンcli
難易度 2/5 1〜3時間 初心者へのやさしさ 81/100
eclipse-openvsx/openvsx#2482 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
Magic-team-jvav/confluence#281 ·
-
area/dependencies area/dependencies/js backport/26.6 backport/26.8 kind/cve severity/medium source/scan-dependencies status/triage
難易度 1/5 1時間未満 初心者へのやさしさ 67/100
メンテナーはふだん 2 日以内に返信
-
[DEFECT] AsciiDoc builders write a stray ## before every schema member when the namespace prefixes file binds the schema's own namespace対応中かも @Beehtrix が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
cimug-org/CIMTool#427 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
userRaised
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
eclipse-openj9/openj9#25285 ·
メンテナーはふだん 1 日以内に返信