コンテンツにスキップ

TrainingTracer / Logger / DataFilter

タスク名を冠しない、目的別の共有入口です。マルチヘッドモデル(heads= を定義した ModelSpec)は head ごとに異なるタスクを持ち得るため、この 3 つがその入口になります。 単一ヘッドのモデルもそのまま受け付け、定義(または自動判定)されたタスクのクラスへ 解決されます。

マルチヘッドモデルの定義と使い方は heads=(マルチヘッドモデル) を参照してください。

from ml_debugger import TrainingTracer, Logger, DataFilter

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

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

引数:

名前 タイプ デスクリプション デフォルト

*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.

{}

戻り値:

タイプ デスクリプション
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.

発生:

タイプ デスクリプション
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.

引数:

名前 タイプ デスクリプション デフォルト

*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.

{}

戻り値:

タイプ デスクリプション
Any

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

Any

inference it makes.

発生:

タイプ デスクリプション
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.

引数:

名前 タイプ デスクリプション デフォルト

*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.

{}

戻り値:

タイプ デスクリプション
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.

発生:

タイプ デスクリプション
ValueError

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