-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Expose callback during sampling #166
Comments
There isn't currently any mechanism to call a function for each draw. The progress callback is called once every 50ms or so. Either option wouldn't be too difficult to add though. |
That would do the trick! Yeah, no need to slow it down. So I'm hearing that the progressbar html is updated every 50ms or so. Is there much overhead in that?
Can you point me to what would be possible to get? Are there some objects already that could be used? |
If we want to push progress info to mlflow, I think once every second or so would probably be enough? We don't want to spam the poor thing. |
Thanks for sharing that link. Totally. Would that be up to the user though? Something that could be defined in the callback: def create_callback(update_frequency):
# Psuedo code
step = None
def callback(state):
if step is None:
step = time.time()
if time.time() - step > update_frequency:
step = time.time()
# do something with state
return callback |
I want to be able to run a python callback on each sample. The signature would be different than this:
https://github.com/wd60622/nutpie/blob/5b881638d658fb8236d4b627209d7f034ee02050/python/nutpie/sample.py#L361-L363
The text was updated successfully, but these errors were encountered: