-
Notifications
You must be signed in to change notification settings - Fork 24
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
fix python hierarchy so jupyter kernel restart is not required #526
Comments
There's a PR for this |
Will investigate |
H5 persistenceThis notebook aims to check to what extent re-reading a h5 file that has changed really read the file or keep old data. import h5py as h5
import numpy as np #from ipython import add_h5_weak_ref def read_data():
f = h5.File("test.h5", "r")
datas = []
for k in f.keys():
print("k = {}".format(k))
datas += [ f[k] ]
return datas
!cat datasets.py
We simulate the creation of data !python datasets.py create !h5dump test.h5
class Hierarchy:
def __init__(self):
self.data = read_data()
#f.close() h = Hierarchy()
h.data
!python datasets.py replace h = Hierarchy()
h.data
|
the above code (from a notebook) mimics the creation, reading, update and re-reading of an hdf5 file, as if the simulation had progressed since last hierarchy construction and the data file was replaced by a newer version then re-read. I propose to keep this is issue open but assign lower priority and "still needed" tag in case we see the described behavior in the future. And if not we could close. |
On jupyter :
so far if the h5 file is loaded, changes and is reloaded (via GetRun and thus via hierarchy_from), reloading has no effect and the hierarchy still contains data before the file has changed. only kernel restart makes reload effective.
The goal of this issue is to change that
The text was updated successfully, but these errors were encountered: