Imported from https://github.com/neuroailab/flex-ml-agents