'Dumps the options to a file in the model directory.
Args:
model_dir: Path to the model directory. The options will be
dumped into a file in this directory.'

def dump(self, model_dir):

    gfile.MakeDirs(model_dir)
    options_dict = {u'model_class': self.model_class, u'model_params': self.model_params}
    with gfile.GFile(TrainOptions.path(model_dir), u'wb') as file:
        file.write(json.dumps(options_dict).encode(u'utf-8'))
