Skip to content

Commit d94472d

Browse files
AlexAndorratwiecki
andauthored
Add note about returning current results (#147)
* Add note about returning returns Making sure the API is clearer in the README for users who want to get the results from the background sampler * Update README.md * Make description clearer Co-authored-by: Thomas Wiecki <thomas.wiecki@gmail.com> --------- Co-authored-by: Thomas Wiecki <thomas.wiecki@gmail.com>
1 parent cc34b58 commit d94472d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,10 @@ sampler.pause()
105105
sampler.resume()
106106

107107
# Wait for the sampler to finish (up to timeout seconds)
108-
# sampler.wait(timeout=0.1)
108+
sampler.wait(timeout=0.1)
109+
# Note that not passing any timeout to `wait` will
110+
# wait until the sampler finishes, then return the InferenceData object:
111+
idata = sampler.wait()
109112

110113
# or we can also abort the sampler (and return the incomplete trace)
111114
incomplete_trace = sampler.abort()

0 commit comments

Comments
 (0)