def __init__(self, env, model_directory: str, save_directory: str, **usercfg) -> None:
        super(ModelRunner, self).__init__()
        self.env = env
        self.model_directory = model_directory
        self.save_directory = save_directory
        self.config = dict(
            episode_max_length=self.env.spec.tags.get('wrapper_config.TimeLimit.max_episode_steps'),
            repeat_n_actions=1
        )
        self.config.update(usercfg)

        self.session = tf.Session()
        self.saver = tf.train.import_meta_graph(os.path.join(self.model_directory, "model.meta"))
        self.saver.restore(self.session, os.path.join(self.model_directory, "model"))

        self.action = tf.get_collection("action")[0]
        self.states = tf.get_collection("states")[0]