Skip to content
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

improve linemin restarts - load configs and skip warmup #367

Merged
merged 1 commit into from
Dec 13, 2022

Conversation

willwheelera
Copy link
Collaborator

No description provided.

with h5py.File(hdf_file, "r") as hdf:
if "wf" in hdf.keys():
grp = hdf["wf"]
for k in grp.keys():
wf.parameters[k] = gpu.cp.asarray(grp[k])
if "iteration" in hdf.keys():
iteration_offset = np.max(hdf["iteration"][...]) + 1
coords.load_hdf(hdf)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens here if the number of configurations changes? It looks like it will just silently change:

        """Note that the number of configurations will change to reflect the number in the hdf file."""
        # The ... seems to be necessary to avoid changing the dtype and screwing up
        # pyscf's calls.
        self.configs[...] = np.array(hdf["configs"])

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From will: self.configs[...] = hdf["configs"][()] should error out if the shape of the array is different, because of the …

@lkwagner lkwagner merged commit a8f2641 into WagnerGroup:master Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants