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

Allow overriding the function a MCState is sampled from #1770

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

inailuig
Copy link
Collaborator

Useful for e.g. implementing a importance sampled state as a subclass.

@PhilipVinc
Copy link
Member

In the long run I'm not sure that's the best way forward but I'm fine with those changes and keeping them as internal changes (so not exposed)

I'd suggest adding a simple test for those properties or even that if you inherit MCState to declare a different sampler state it samples that one, just because if not it might break in the future.

Also add a comment somewhere in the file saying this is an internal way to override the distribution that is sampled.

@PhilipVinc
Copy link
Member

@inailuig Do you want to add a test for better resiliency or should I merge as is?

@inailuig
Copy link
Collaborator Author

@inailuig Do you want to add a test for better resiliency or should I merge as is?

I think you can merge it as is, It will be tested once I add the importance sampling class.

@PhilipVinc PhilipVinc merged commit 49ca287 into netket:master Apr 23, 2024
9 of 11 checks passed
jwnys pushed a commit to jwnys/netket that referenced this pull request Apr 23, 2024
Useful for e.g. implementing a importance sampled state as a subclass.
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