* trainer auto wait pserver port ready * add file * fix docstring * add option to not wait * update api spec * clean * fix test hang