class_docstr: Tests reading and writing of training options
class_docstr_tok: ["Tests","reading","and","writing","of","training","options"]
code: def test_read_write(self):
      saved_opts = training_utils.TrainOptions(
          model_class=self.model_class, model_params=self.model_params
      )
      saved_opts.dump(self.model_dir)
  
      loaded_opt = training_utils.TrainOptions.load(
          model_dir=self.model_dir
      )
  
      self.assertEqual(saved_opts.model_params, loaded_opt.model_params)
      self.assertEqual(saved_opts.model_class, loaded_opt.model_class)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import tempfile
  import tensorflow
  import numpy
  from seq2seq.contrib import rnn_cell
  from seq2seq.data import input_pipeline
  from seq2seq.test import utils
  from seq2seq.training import utils
label_desc: Use image node_id 2 for calling the TestTrainOptions obj's underlying member method code with example usage: obj.test_read_write() without return types