kazu.training.modelling_utils

Functions

chunks(lst, n)

Yield successive n-sized chunks from lst.

create_wrapper(cfg, label_list)

doc_yielder(path)

get_label_list(path)

get_label_list_from_model(model_config_path)

test_doc_yielder()

Classes

class kazu.training.modelling_utils.LSManagerViewWrapper[source]

Bases: object

__init__(view, ls_manager)[source]
Parameters:
get_gold_ents_for_side_by_side_view(docs)[source]
Parameters:

docs (list[Document])

Return type:

list[list[Document]]

update(docs, global_step, has_gs=True)[source]
Parameters:
Return type:

None

kazu.training.modelling_utils.chunks(lst, n)[source]

Yield successive n-sized chunks from lst.

Parameters:
Return type:

Iterable[list[Any]]

kazu.training.modelling_utils.create_wrapper(cfg, label_list)[source]
Parameters:
  • cfg (DictConfig)

  • label_list (list[str])

Return type:

LSManagerViewWrapper | None

kazu.training.modelling_utils.doc_yielder(path)[source]
Parameters:

path (str | Path)

Return type:

Iterable[Document]

kazu.training.modelling_utils.get_label_list(path)[source]
Parameters:

path (str | Path)

Return type:

list[str]

kazu.training.modelling_utils.get_label_list_from_model(model_config_path)[source]
Parameters:

model_config_path (str | Path)

Return type:

list[str]

kazu.training.modelling_utils.test_doc_yielder()[source]
Return type:

Iterable[Document]