repro.commands.util#

repro.commands.util.load_dataset_reader(name, kwargs=None)#

Loads a DatasetReader given the registered name of the reader and any arguments which will be passed to the constructor as kwargs. args should be a dictionary or a json-serialized dictionary in which the keys correspond to constructor parameters.

Parameters
  • name (str) – The name of the dataset reader to load

  • kwargs (Union[str, Dict[str, Any]]) – The kwargs to be passed to the dataset reader’s constructor

Returns

The dataset reader

Return type

DatasetReader

repro.commands.util.load_model(name, kwargs=None)#

Loads a Model given the registered name of the model and any arguments which will be passed to the constructor as kwargs. args should be a dictionary or a json-serialized dictionary in which the keys correspond to constructor parameters.

Parameters
  • name (str) – The name of the model to load

  • kwargs (Union[str, Dict[str, Any]]) – The kwargs to be passed to the model’s constructor

Returns

The model

Return type

Model

repro.commands.util.load_output_writer(name, kwargs=None)#

Loads an OutputWriter given the registered name of the reader and any arguments which will be passed to the constructor as kwargs. args should be a dictionary or a json-serialized dictionary in which the keys correspond to constructor parameters.

Parameters
  • name (str) – The name of the output writer to load

  • kwargs (Union[str, Dict[str, Any]]) – The kwargs to be passed to the output writer’s constructor

Returns

The output writer

Return type

OutputWriter