Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Currently, a DML print statement results in a System.out.println call in the JVM. For Python, this output will not be routed back as Python standard out, and thus it will not be visible in some environments, such as a Jupyter notebook. In a Python repl, the output will be visible, but only because the JVM will be printing to the same terminal as the Python process is running from, and thus the user will see the output. Since a large amount of ML work is performed within a notebook using Python, we should figure out how to route this output back to the Python std out.
Relevant:
- https://www.py4j.org/py4j_java_gateway.html#py4j.java_gateway.launch_gateway
- https://github.com/apache/spark/blob/a36a76ac43c36a3b897a748bd9f138b629dbc684/python/pyspark/java_gateway.py#L36
- https://github.com/bartdag/py4j/blob/262a20477a8a302cae0ede597c93b953a3fc2702/py4j-python/src/py4j/java_gateway.py#L320
- https://github.com/bartdag/py4j/blob/262a20477a8a302cae0ede597c93b953a3fc2702/py4j-python/src/py4j/java_gateway.py#L596
- https://github.com/bartdag/py4j/blob/262a20477a8a302cae0ede597c93b953a3fc2702/py4j-python/src/py4j/java_gateway.py#L312
- https://github.com/apache/spark/blob/a36a76ac43c36a3b897a748bd9f138b629dbc684/python/pyspark/java_gateway.py#L77