-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Iterate readIterations/read_iterations Multiple Times #1418
Comments
Work-around is to use the traditional API: series = io.Series(filename, io.Access_Type.read_only)
# ...
for k_i, i in series.iterations.items():
pass
for k_i, i in series.iterations.items():
pass |
I would say that this currently has the status of a feature request, rather than a bug ;) If anything, it was a bug that this workflow did somehow function in 0.14. |
@s-sajid-ali just checking: I remember you wrote the file with HDF5. When you wrote the file, did you use for iterations the groupBased encoding, the fileBased encoding? |
@s-sajid-ali just checking where you found |
I used
Likely from this example: https://openpmd-api.readthedocs.io/en/0.15.1/usage/parallel.html#id2 or from inspecting the available methods for a |
I see, yes the comment # In parallel contexts, it's important to explicitly open iterations.
# This is done automatically when using `Series.write_iterations()`,
# or in read mode `Series.read_iterations()`. is misleading, we need to update that. |
#1592 brings a first step in this direction. It supports re-opening closed Iterations and going back to earlier Iterations in |
Describe the bug
Currently,
read_iterations()
cannot be looped multiple times.Error message:
This is a bit unusual, since it should start over on the same open series, at least in regular/random access mode (non-streaming.)
To Reproduce
Python:
Expected behavior
Usually in Python on generators/iterators, one should start iterations over when reading files that way.
Software Environment
Additional context
First seen by @s-sajid-ali.
https://github.com/fnalacceleratormodeling/synergia2/blob/231d3dff97c0a2bb64db49584c626ec15f7b24b4/src/analysis_tools/diag_plot_openpmd.py
The text was updated successfully, but these errors were encountered: