Requesting multiple metrics sometimes give different results to requesting them individually

Aperta
#924 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
python
Ambito
api, data

Direzione di ricerca

Inizia con la chiamata a get_metric_values ed esegui la riproduzione fornita su trial3 usando entrambe le configurazioni di metric_names. Confronta i valori restituiti per il timestamp condiviso; il lavoro è completato quando la richiesta di più metriche conserva lo stesso valore restituito quando la metrica interessata viene richiesta singolarmente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
Python
Stelle
4
Fork
1
Merge medio
5g 8h
PR unite (30g)
4

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di simvue-io/python-api

Tutte le issue di simvue-io/python-api

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.