-
Notifications
You must be signed in to change notification settings - Fork 0
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
Realtime printing #28
Conversation
Thank you! Very excited about this.
I think so? That is, I don't think we're explicitly enforcing this, so it's probably theoretically possible to get out of order (unless we get some guarantees from TCP somehow), but seems very unlikely? @fjetter might know better since he added this feature.
Probably yes, since that's what |
Cool, let's give this a try! Thanks for the input and pointing me to the I have another question: do you know of any alternatives to using If out-of-order print statements become an issue, we can use the timestamps to ensure they're displayed in the correct order. |
afar/_core.py
Outdated
pretty_repr = repr_afar(results.return_value, magic_func._repr_methods) | ||
if pretty_repr is not None: | ||
try: | ||
worker.log_event(channel, (unique_key, "display_expr", pretty_repr)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to rework this. worker.log_event
doesn't raise here--it raises an exception on the client instead. It also doesn't provide a return value that can be used to determine whether the log was successful or not.
I think the solution for afar
is to not display the rich repr of objects that use _ipython_display_
or find some other workaround.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't provide a return value that can be used to determine whether the log was successful or not.
if that's helpful, we can change it
Yes
no strong opinion ¯_(ツ)_/¯ |
Closes #13.
distributed
release to send print statements back to the client in realtime.Q1: is it safe to assume that events sent from a single task will be received in correct order (FIFO)? This appears to be the case.
Q2: should we also print on the worker?
CC @gjoseph92