Baunsgaard commented on a change in pull request #874: Add SystemDSContext for systemds operations URL: https://github.com/apache/systemml/pull/874#discussion_r403496508
########## File path: src/main/python/docs/source/matrix.rst ########## @@ -23,6 +23,23 @@ Matrix API ========== +SystemDSContext +--------------- + +Since we always need a java instance running which will can execute operations in SystemDS, we +need to start this connection at some point. We do this with ``SystemDSContext``. A ``SystemDSContext`` +object has to be created and once we are finished ``.close()`` has to be called on it, or +we can use it by doing ``with SystemDSContext() as context:``, which will automatically close +the context if an error occurs or we are finished with our operations. Creating an context is +an expensive procedure, because we might have to start a subprocess running java, therefore +try to do this only once for your program, or always leave at least one context open. + +Our SystemDS operations always start with an call on a ``SystemDSContext``, most likely to generate +a matrix on which we can operate. Review comment: Maybe not needed comment? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services