Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Requesting multiple metrics sometimes give different results to requesting them individually

未關閉
#924 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
45/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
停滯
技術堆疊
python
領域
api, data

研究方向

從 get_metric_values 呼叫開始,使用兩種 metric_names 設定對 trial3 執行提供的重現。比較共用時間戳記的回傳值;當要求多個指標時保留與個別要求受影響指標時回傳的相同值,即表示完成。

由索引模型根據 Issue 內容生成。

描述

bug python

Description of Bug

Sometimes, when a single metric is requested with get_metric_values, it returns a value for a particular time. But if both that metric and another are requested simultaneously, even if they both have a value at the same time, the value returned for the first metric is None.

Steps To Reproduce

Run this, noting that the run is on trial3. then comment out line 7, uncomment line 8, and run it again:

import simvue

run_id = "AZPKJLrtwr3ZerLi4QNnu8"

client = simvue.Client()

metric_names = ["soot_visibility.z.7_0.avg", "soot_visibility.z.37_0.avg"]
#metric_names = ["soot_visibility.z.7_0.avg"]

all_metric_values = client.get_metric_values(metric_names, 'time', run_ids=[run_id])

for (metric_name, single_metric_values) in all_metric_values.items():
    print(f"{metric_name}: {list(single_metric_values.items())[-1]}")

Output:

soot_visibility.z.37_0.avg: ((1731.6583251953125, 'AZPKJLrtwr3ZerLi4QNnu8'), 29.584584259066062)
soot_visibility.z.7_0.avg: ((1731.6583251953125, 'AZPKJLrtwr3ZerLi4QNnu8'), None)

Output with line 8 instead of 7:

soot_visibility.z.7_0.avg: ((1731.6583251953125, 'AZPKJLrtwr3ZerLi4QNnu8'), 19.169060055914873)

Setup

  • OS: Ubuntu
  • python-api version v2.3.5
主要語言
Python
星號
4
分支
1
平均合併
3 天 5 小時
30 天內合併 PR
7

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

simvue-io/python-api 的其他 Issue

查看 simvue-io/python-api 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。