code: def test_evaluate_from_args(self):
      kebab_args = [
          "evaluate",
          unicode(
              self.FIXTURES_ROOT
              / "bidaf"
              / "serialization"
              / "model.tar.gz"
          ),
          unicode(self.FIXTURES_ROOT / "data" / "squad.json"),
          "--cuda-device",
          "-1",
      ]
  
      args = self.parser.parse_args(kebab_args)
      metrics = evaluate_from_args(args)
      assert list(metrics.keys()) == set(
          ["span_acc", "end_acc", "start_acc", "em", "f1"]
      )
  
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 2 for calling the TestEvaluate obj's underlying member method code with example usage: obj.test_evaluate_from_args() without return types