b4984bf716560a3f5e71c0d5e35cf6b9bd99c211,opennmt/tests/model_test.py,ModelTest,testSequenceToSequenceServing,#ModelTest#,194

Before Change


  @test_util.run_tf1_only
  def testSequenceToSequenceServing(self):
    // Test that serving features can be forwarded into the model.
    model = catalog.NMTSmall()
    _, _, data_config = self._makeToyEnDeData()
    features = model.serving_input_fn(data_config)().features
    with tf.variable_scope(model.name):
      _, predictions = model(
          features, None, model.auto_config()["params"], tf.estimator.ModeKeys.PREDICT)
      self.assertIsInstance(predictions, dict)

  @parameterized.expand([

After Change


  def testSequenceToSequenceServing(self):
    // Test that serving features can be forwarded into the model.
    _, _, data_config = self._makeToyEnDeData()
    model, params = _seq2seq_model()
    model.initialize(data_config)
    with tf.Graph().as_default():
      features = estimator.make_serving_input_fn(model)().features
      _, predictions = model(
          features, None, params, tf.estimator.ModeKeys.PREDICT)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: OpenNMT/OpenNMT-tf
Commit Name: b4984bf716560a3f5e71c0d5e35cf6b9bd99c211
Time: 2019-04-01
Author: guillaume.klein@systrangroup.com
File Name: opennmt/tests/model_test.py
Class Name: ModelTest
Method Name: testSequenceToSequenceServing


Project Name: OpenNMT/OpenNMT-tf
Commit Name: b4984bf716560a3f5e71c0d5e35cf6b9bd99c211
Time: 2019-04-01
Author: guillaume.klein@systrangroup.com
File Name: opennmt/tests/model_test.py
Class Name: ModelTest
Method Name: testSequenceToSequenceWithReplaceUnknownTarget


Project Name: cornellius-gp/gpytorch
Commit Name: dcc171086d167a736efbdc2ce7f0c25fc2a4f42e
Time: 2019-01-29
Author: kaw293@cornell.edu
File Name: gpytorch/module.py
Class Name: Module
Method Name: initialize