tugraz-isds / systemds

An open source ML system for the end-to-end data science lifecycle
Apache License 2.0
37 stars 20 forks source link

Context Manager for Python Bindings #127

Open corepointer opened 4 years ago

corepointer commented 4 years ago

I would prefer some other way to shutdown the server than shutdown. Fist of all a check is missing since we only start a subprocess if no SystemDS instance is running yet, secondly if we need a explicit shutdown it makes sense to also have an explicit start. As I have already suggested in my PR it would make sense to use a ContextManager (See https://book.pythontips.com/en/latest/context_managers.html). We should make sure that we are happy with our decision since it will likely stay for longer, I hoped that we find a way to automatically shutdown the java server process on exit of the python program, but a ContextManager would also be a good idea.

Originally posted by @kev-inn in https://github.com/tugraz-isds/systemds/pull/125#issuecomment-602271159

corepointer commented 4 years ago

A context manager sounds like a good idea. For now, the manual shutdown makes the python tests run, so we leave this here as an open issue.