PathmindAI/policy-server

LPoC Demo

Closed this issue · 4 comments

Hi @maxpumperla, quick question. How can we load the LPoC Streamlit demo with all the bells and whistles (e.g. GUI, toggles, etc.)?

@ejunprung that only works within the factory-puzzle project, in which we have a separate app. The reason is that you need to have the full RL environment (and the visualisation thereof) to pull this off. And the basic idea of policy serving is to just extract the smart decision making, precisely by cutting all ties to the simulation in the first place and only keeping the model itself. But of course, I see why you'd want this all in one place. We'll have to discuss this separately in terms of general strategy. My hunch is that for pure Python models it's no issue to keep the env around while serving the model, while you might not want to have a big, fat jar in the AnyLogic case.

In any case, check out streamlit run tuple_app.py on master of https://github.com/SkymindIO/factory-solver

Hi @maxpumperla, do I need to clear something out btw?

Failed to set SIGTERM handler, processes might not be cleaned up properly on exit.

Screen Shot 2020-09-04 at 11 57 21 AM

@ejunprung sorry for this obscure error message. it boils down to a new pickle protocol ("5") introduced in python 3.8 with which the params.pkl of the underlying model has been created. Unfortunately this is backward incompatible, so you'll have to upgrade to python 3.8.

p.s. the SIGTERM handler message is more of a warning in this context. It's due to streamlit and ray stepping onto each others toes. I don't have a fix for it currently, but it seems to be benign.