Skip to content

Commit

Permalink
Add note about returning current results (#147)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

---------

Co-authored-by: Thomas Wiecki <[email protected]>
  • Loading branch information
AlexAndorra and twiecki authored Aug 28, 2024
1 parent cc34b58 commit d94472d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ sampler.pause()
sampler.resume()

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

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

0 comments on commit d94472d

Please sign in to comment.