composer.datasets.evaluator#
composer.datasets.evaluator
Functions
Returns the same class as was passed in, with dunder methods added based on the fields defined in the class. |
|
|
composer.datasets.dataset_registry.get_dataset_registry |
Classes
The minimal interface needed to use a model with |
|
Wrapper for a dataloader to include metrics that apply to a specific dataset. |
|
Base class for all metrics present in the Metrics API. |
|
|
MetricCollection class can be used to chain metrics that have the same call pattern into one single class. |
Hparams
These classes are used with yahp
for YAML
-based configuration.
Hyperparameters to initialize a |
|
Abstract base class for hyperparameters to initialize a dataset. |
|
Params for the |
Attributes
List
Optional
annotations
log
- class composer.datasets.evaluator.EvaluatorHparams(label, eval_dataset, metric_names=None)[source]#
Bases:
yahp.hparams.Hparams
Params for the
Evaluator
.See the documentation for the
Evaluator
.- initialize_object(model, batch_size, dataloader_hparams)[source]#
Initialize an
Evaluator
If the Evaluatormetric_names is empty or None is provided, the function returns a copy of all the modelโs default evaluation metrics.
- Parameters
model (ComposerModel) โ The model, which is used to retrieve metric names
batch_size (int) โ The device batch size to use for the evaluation dataset
dataloader_hparams (DataloaderHparams) โ The hparams to use to construct a dataloader for the evaluation dataset
- Returns
Evaluator โ The evaluator