results

class NumericResult(*args, **kwargs)[source]

Bases: pimlico.datatypes.base.PimlicoDatatype

Simple datatype to contain a numeric value and a label, representing the result of some process, such as evaluation of a model on a task.

Write using writer.write(label, value). The label must be a string, identifying what the result is, e.g. “f-score”. The value can be any JSON-serializable type, e.g. int or float.

For example, allows results to be plotted by passing them into a graph plotting module.

datatype_name = 'numeric_result'
datatype_supports_python2 = True
class Reader(datatype, setup, pipeline, module=None)[source]

Bases: pimlico.datatypes.base.Reader

Reader class for NumericResult

class Setup(datatype, data_paths)[source]

Bases: pimlico.datatypes.base.Setup

Setup class for NumericResult.Reader

get_required_paths()[source]

May be overridden by subclasses to provide a list of paths (absolute, or relative to the data dir) that must exist for the data to be considered ready.

reader_type

alias of NumericResult.Reader

data
label
value
class Writer(datatype, base_dir, pipeline, module=None, **kwargs)[source]

Bases: pimlico.datatypes.base.Writer

Writer class for NumericResult

required_tasks = ['data']
write(label, value)[source]
metadata_defaults = {}
writer_param_defaults = {}