Skip to content

TrainingTracer / Logger / DataFilter

The entry points that do not name a task — one per purpose. A multi-head model (a ModelSpec declaring heads=) can carry heads of different tasks, so these are the entry points that serve it; they accept single-head models just as well and resolve to the declared (or auto-detected) task's own class.

For how to declare and use a multi-head model, see heads= (Multi-Head Models).

from ml_debugger import TrainingTracer, Logger, DataFilter

ml_debugger.entry.TrainingTracer(*args, **kwargs)

Record a training run of a model, whatever it predicts.

Parameters:

Name Type Description Default

*args

Any

model, model_name and version_name, positionally or by keyword.

()

**kwargs

Any

spec= -- required for a model declaring several heads -- plus the keywords the task's own tracer takes.

{}

Returns:

Type Description
Any

The tracer for this model: call it in place of the model to record what it

Any

predicted, then wait_for_save() to send it.

Raises:

Type Description
ValueError

If the declaration cannot be served -- a head name that composes a model name the service will not accept, or a model whose task cannot be determined without a Spec.


ml_debugger.entry.Logger(*args, **kwargs)

Monitor a model in production, whatever it predicts.

Parameters:

Name Type Description Default

*args

Any

model, model_name and version_name, positionally or by keyword.

()

**kwargs

Any

spec= -- required for a model declaring several heads -- plus the keywords the task's own logger takes.

{}

Returns:

Type Description
Any

The logger for this model: call it in place of the model to record every

Any

inference it makes.

Raises:

Type Description
ValueError

If the declaration cannot be served (see :func:TrainingTracer).


ml_debugger.entry.DataFilter(*args, **kwargs)

Select the data worth collecting from a model, whatever it predicts.

On a model declaring several heads, filter_config is given per head -- a decision is made on what THAT head predicted -- and the decisions come back per head.

Parameters:

Name Type Description Default

*args

Any

model, model_name and version_name, positionally or by keyword.

()

**kwargs

Any

spec= -- required for a model declaring several heads -- plus the keywords the task's own data filter takes.

{}

Returns:

Type Description
Any

The data filter for this model: call it in place of the model to get back what it

Any

predicted together with the filtering decisions.

Raises:

Type Description
ValueError

If the declaration cannot be served (see :func:TrainingTracer), or if a model declaring several heads is given one shared filter_config.