EKO `xgrid_reshape` manipulation leaves them in an unusable state

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

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
backend, databases

Direzione di ricerca

Start by reproducing the two EKO.edit passes in the issue with the attached archive, then read eko.io.manipulate.xgrid_reshape and the metadata and operator writing code it uses. Check whether the reshaped operator's stored shape agrees with the metadata after closing and reopening the EKO. Done means repeated edits either preserve readable metadata and data or reject an incompatible reshape clearly.

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

Descrizione

bug
from eko import EKO
from eko.interpolation import XGrid
from eko.io import manipulate
from pathlib import Path
new_xgrid = XGrid([0.05, 0.5, 1.0])
target = Path("to_test.tar")
eko_op = EKO.edit(target)
for i, elem in eko_op.items():
     eko_op[i] = manipulate.xgrid_reshape(elem, eko_op.xgrid, 2, targetgrid=new_xgrid, inputgrid=new_xgrid)
eko_op.close()
eko_op = EKO.edit(target)
for i, elem in eko_op.items():
    eko_op[i] = manipulate.xgrid_reshape(elem, eko_op.xgrid, 2, targetgrid=new_xgrid, inputgrid=new_xgrid)

This is related to https://github.com/NNPDF/nnpdf/pull/2181#issuecomment-2747212997 I didn't realize that they were also going to be written down with a shape that is no longer reflected by the metadata.

(not sure whether ths is a bug or a feature that I didn't know I wanted :P but I think eko should not writed down no-longer-readable ekos?)

to_test.tar.zip

Lingua principale
Python
Stelle
13
Fork
9
Merge medio
6g 16h
PR unite (30g)
3

Preparare l'ambiente

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 NNPDF/eko

Tutte le issue di NNPDF/eko

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.