Make it compatible for custom functions to be run with with train.py

1 job for rllib-IL in 2 minutes and 53 seconds (queued for 18 seconds)