Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import logging
import _jsonnet
import json
from datetime import datetime
from allennlp.common.params import Params, parse_overrides, with_fallback
from allennlp.commands.train import train_model
from allennlp.common.util import import_submodules
from tuna.runners import Runner
from typing import Optional
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
class AllenNlpRunner(Runner):
name = "AllenNLP"
def get_argument_parser(self) -> Optional[argparse.ArgumentParser]:
parser = argparse.ArgumentParser()
parser.add_argument(
"--parameter-file",
required=True,
type=os.path.abspath,
help="path to parameter file describing the model to be trained",
)
parser.add_argument(
"--include-package",
type=str,
action="append",
default=[],