Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was an error in tensor indexing in the
stats.SampledObs
calculations of the global sums. Estimation of mean, variance etc. worked only if the leading dimension ofobservations
andweights
was equal to 1. Otherwise, forTestStats.test_sampled_obs
test with the leading dimension of the input array equal tojVMC.global_defs.device_count()
greater than 1 an error occurred:This made it impossible to run SR, minSR etc with multiple devices.
It is easy to reproduce these errors without many physical devices by setting the following environment variables before running the test to fake multiple devices:
In this pull request I fixed the indexing in
stats.SampledObs
and slightly modified the test for stats.I am not sure if
SampledObs.subset
should also be changed.