Actor not printing when launched in jupyter
See original GitHub issueSystem information
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 16.04
- Ray installed from (source or binary): pip3 install ray
- Ray version: 0.6.1
- Python version: 3.5.2
- Exact command to reproduce: run following code from inside a Jupyter notebook or from a vanilla python file
Describe the problem
Printing inside actors should show up in the stdout/stdrr or at least in logs when launched from inside a Jupyter notebook. For the moment, nothing is visible.
Source code / logs
import ray
ray.init()
@ray.remote
class Counter(object):
def __init__(self):
self.value = 0
def increment(self):
self.value += 1
print(self.value)
return self.value
c = Counter.remote()
print(ray.get(c.increment.remote()))
Give 1
then 1
when python3 test.py
but only 1
inside notebook.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
why there is no printout when using #[derive(Debug)] for rust ...
I am new in rusting studying. when i am trying to execute some codes written by Rust in jupyter-notebook. I can not get...
Read more >Bluehive jupyter
Formed as an exhibit and design firm focused on revamping and revitalizing the exhibit world, BlueHive transitioned from merely creating static spaces to ......
Read more >What to do when things go wrong - The Jupyter Notebook
If you're using a menu shortcut or Anaconda launcher to start it, try opening a terminal or command prompt and running the command...
Read more >Is it bad practice to start with Jupyter Notebooks? - Reddit
You wrap that in the function, replace the print with return if needed, add the missing attributes to the def, and test it...
Read more >Working with Jupyter Notebooks & JupyterLab — Ray 2.2.0
This causes Ray to pin the objects even though you application may not actually be using them. Therefore, explicitly calling print or repr...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Interesting, I can reproduce it. The actor print statements seem to be redirected to my terminal where I ran
jupyter-notebook
(also it wasn’t flushed immediately).I can reproduce it even more easily in a Jupyter notebook just by running
That will show up in the terminal where you started the
jupyter-notebook
and not in the notebook itself.Still not working for me. Using ray 1.1.0
OS: centos 7
The weird thing is that I see the expected output when I use the jupyter-lab interface but not when using the old jupyter notebook interface. So switching to the new interface fixes the issue. To be specific: new interface is the lab URL (animation when launching), old interface is the tree URL.