code: def test_output_file_evaluate_from_args(self):
      output_file = unicode(self.TEST_DIR / "metrics.json")
      kebab_args = [
          "evaluate",
          unicode(
              self.FIXTURES_ROOT
              / "bidaf"
              / "serialization"
              / "model.tar.gz"
          ),
          unicode(self.FIXTURES_ROOT / "data" / "squad.json"),
          "--cuda-device",
          "-1",
          "--output-file",
          output_file,
      ]
      args = self.parser.parse_args(kebab_args)
      computed_metrics = evaluate_from_args(args)
      with open(output_file, "r") as file:
          saved_metrics = json.load(file)
      assert computed_metrics == saved_metrics
  
file_path: magnitude/pymagnitude/third_party/allennlp/tests/commands/evaluate_test.py
imports: from __future__ import with_statement
  from __future__ import division
  from __future__ import absolute_import
  import argparse
  import json
  from flaky import flaky
  from allennlp.commands.evaluate import evaluate_from_args, Evaluate
  from allennlp.common.testing import AllenNlpTestCase
  from io import open
label_desc: Use image node_id 3 for calling the TestEvaluate obj's underlying member method code with example usage: obj.test_output_file_evaluate_from_args() without return types