sgnlp.models.span_extraction.train.train_model

train_model(cfg: sgnlp.models.span_extraction.data_class.RecconSpanExtractionArguments)[source]

Method for training RecconSpanExtractionModel.

Parameters

config (RecconSpanExtractionArguments) – RecconSpanExtractionArguments config load from config file.

Example:

import json
from sgnlp.models.span_extraction import train
from sgnlp.models.span_extraction.utils import parse_args_and_load_config

cfg = parse_args_and_load_config('config/span_extraction_config.json')
train(cfg)