finetuner.labeler.executor module

class finetuner.labeler.executor.FTExecutor(dam_path, metric='cosine', loss='SiameseLoss', **kwargs)[source]

Bases: jina.executors.BaseExecutor

metas and requests are always auto-filled with values from YAML config.

Parameters
  • metas – a dict of metas fields

  • requests – a dict of endpoint-function mapping

  • runtime_args – a dict of arguments injected from Runtime during runtime

  • kwargs – additional extra keyword arguments to avoid failing when extra params ara passed that are not expected

abstract get_embed_model()[source]
abstract get_preprocess_fn()[source]
abstract get_collate_fn()[source]
abstract get_stop_event()[source]
embed(docs, parameters, **kwargs)[source]
fit(docs, parameters, **kwargs)[source]
save(parameters, **kwargs)[source]
terminate(**kwargs)[source]
requests = {'/fit': <function FTExecutor.fit>, '/next': <function FTExecutor.embed>, '/save': <function FTExecutor.save>, '/terminate': <function FTExecutor.terminate>}
class finetuner.labeler.executor.DataIterator(dam_path, labeled_dam_path=None, clear_labels_on_start=False, **kwargs)[source]

Bases: jina.executors.BaseExecutor

metas and requests are always auto-filled with values from YAML config.

Parameters
  • metas – a dict of metas fields

  • requests – a dict of endpoint-function mapping

  • runtime_args – a dict of arguments injected from Runtime during runtime

  • kwargs – additional extra keyword arguments to avoid failing when extra params ara passed that are not expected

store_data(docs, **kwargs)[source]
take_batch(parameters, **kwargs)[source]
add_fit_data(docs, **kwargs)[source]
requests = {'/feed': <function DataIterator.store_data>, '/fit': <function DataIterator.add_fit_data>, '/next': <function DataIterator.take_batch>}