trw.callbacks.callback_reporting_export_samples

Module Contents

Classes

CallbackReportingExportSamples

Defines a callback function that may be called before training, during training, after training

Functions

expand_classification_mapping(batch, loss_term_name, loss_term, classification_mappings, suffix='_str')

Expand as string the class name for the classification outputs

select_all(batch, loss_terms)

callbacks_per_loss_term(dataset_name, split_name, batch, loss_terms, root, datasets_infos, loss_terms_inclusion, feature_exclusions, dataset_exclusions, split_exclusions, exported_cases, max_samples, epoch, sql_table, format, select_fn, **kwargs)

Attributes

logger

trw.callbacks.callback_reporting_export_samples.logger
trw.callbacks.callback_reporting_export_samples.expand_classification_mapping(batch, loss_term_name, loss_term, classification_mappings, suffix='_str')

Expand as string the class name for the classification outputs

Parameters
  • batch

  • loss_term

  • classification_mappings

    classification_mappings: a nested dict recording the class name/value associated with a set of output_name

    {output_name:

    {‘mapping’: {name, value}}, {‘mappinginv’: {value, name}}

    }

  • suffix – the suffix appended to output or target name

trw.callbacks.callback_reporting_export_samples.select_all(batch, loss_terms)
trw.callbacks.callback_reporting_export_samples.callbacks_per_loss_term(dataset_name, split_name, batch, loss_terms, root, datasets_infos, loss_terms_inclusion, feature_exclusions, dataset_exclusions, split_exclusions, exported_cases, max_samples, epoch, sql_table, format, select_fn, **kwargs)
class trw.callbacks.callback_reporting_export_samples.CallbackReportingExportSamples(max_samples=50, table_name='samples', loss_terms_inclusion=None, feature_exclusions=None, dataset_exclusions=None, split_exclusions=None, clear_previously_exported_samples=True, format='{dataset_name}_{split_name}_s{id}_e{epoch}', reporting_config_keep_last_n_rows=None, reporting_config_subsampling_factor=1.0, reporting_scatter_x='split_name', reporting_scatter_y='dataset_name', reporting_color_by=None, reporting_display_with=None, reporting_binning_x_axis=None, reporting_binning_selection=None, select_sample_to_export=select_all)

Bases: trw.callbacks.callback.Callback

Defines a callback function that may be called before training, during training, after training

__call__(self, options, history, model, losses, outputs, datasets, datasets_infos, callbacks_per_batch, **kwargs)