Replies: 5 comments 2 replies
-
Thanks for bringing this up. I just had a brief discussion with @nden about this and other asdf diff changes. I'm going to try converting this to a "discussion" (in part to see how that works) but also to solicit input from @perrygreenfield and @eslavich on what verbose output might look like. It sounds like the changes so far are (and I might update this portion of this comment as the discussion continues):
|
Beta Was this translation helpful? Give feedback.
-
Digging into this more... I'll be more verbose tomorrow, but using asdf.commands.diff(...) has more issues for Roman:
|
Beta Was this translation helpful? Give feedback.
-
Thanks. Yes, your PR is where I started this particular issue. I don't want to merge that now until we've fixed more of the issues it reveals. Yes, the highest priority is to get True / False if the files differ "meaningfully." I've been running the regression tests locally where I can do the inspection you describe. So far, I've found three cases:
The most useful bit to report is to say which fields have differences. Currently I just get "contents differ" for each ndarray it looks at, without naming the ndarray. Then I know where to look to see what has changed. There are other things like min / max absolute and fractional difference and the number of differing elements that would also have some value, at much lower priority. You've probably already done something more sensible, but FWIW, this is what I put together to find the first set of not NaN cases:
|
Beta Was this translation helpful? Give feedback.
-
To summarize the conversation/work so far. Romancal is considering transitioning away from using |
Beta Was this translation helpful? Give feedback.
-
Just as an additional data point I use the command |
Beta Was this translation helpful? Give feedback.
-
I think we want asdf.commands.diff to not report differences when comparing two identical arrays which both contain NaNs in the same positions. This comparison
https://github.com/asdf-format/asdf/blob/main/asdf/commands/diff.py#L268-L269
needs to have the equal_nan=True argument for that to occur. Otherwise arrays including NaNs will always report differences here.
Only vaguely related to this issue, but I was also hoping for more verbose output from asdf.commands.diff. In the particular file I'm looking at:
I get only "ndarrays differ by contents." I would have appreciated being told something more like 'tree['roman']['data'] ndarrays differ by contents' so that I knew more than just some array somewhere in the file differed.
Beta Was this translation helpful? Give feedback.
All reactions