deepcave.plugins.hyperparameter.ablation_paths

# Ablation Paths

This module provides a plugin for the visualization of the ablation paths.

Provided utilities include getting input and output layout (filtered or non-filtered), processing the data and loading the outputs.

## Classes
  • Ablation_Paths: This class provides a plugin for the visualization of the ablation paths.

Classes

AblationPaths()

Provide a plugin for the visualization of the ablation paths.

class deepcave.plugins.hyperparameter.ablation_paths.AblationPaths[source]

Bases: StaticPlugin

Provide a plugin for the visualization of the ablation paths.

Provided utilities include getting input/output layout, data processing and loading outputs.

static get_filter_layout(register)[source]

Get the layout for the filter block.

Parameters:

register (Callable) – Method to register (user) variables. The register_input function is located in the Plugin superclass.

Returns:

Layout for the filter block.

Return type:

List[dbc.Row]

static get_input_layout(register)[source]

Get the layout for the input block.

Parameters:

register (Callable) – Method to register (user) variables. The register_input function is located in the Plugin superclass.

Returns:

Layout for the input block.

Return type:

List[Any]

static get_output_layout(register)[source]

Get the layout for the output block.

Parameters:

register (Callable) – Method to register outputs. The register_input function is located in the Plugin superclass.

Returns:

Layout for the output block.

Return type:

List[dcc.Graph]

load_dependency_inputs(run, _, inputs)[source]

Works like ‘load_inputs’ but called after inputs have changed.

Note

Only the changes have to be returned. The returned dictionary will be merged with the inputs.

Parameters:
  • run – The selected run.

  • inputs (Dict[str, Any]) – Current content of the inputs.

Returns:

A dictionary with the changes.

Return type:

Dict[str, Any]

load_inputs()[source]

Load the content for the defined inputs in ‘get_input_layout’ and ‘get_filter_layout’.

This method is necessary to pre-load contents for the inputs. If the plugin is called for the first time, or there are no results in the cache, the plugin gets its content from this method.

Returns:

Content to be filled.

Return type:

Dict[str, Dict[str, Any]]

static load_outputs(run, inputs, outputs)[source]

Read in raw data and prepare for layout.

Note

The passed inputs are cleaned and therefore differ compared to ‘load_inputs’ or ‘load_dependency_inputs’. Please see ‘_clean_inputs’ for more information.

Parameters:
  • run – The selected run.

  • inputs – Input and filter values from the user.

  • outputs – Raw output from the run.

Returns:

The figures of the ablation paths.

Return type:

return [figure1, figure2]

static load_outputs_mo(run, inputs, outputs)[source]

Multi-objective case for read in raw data and prepare for layout.

Note

The passed inputs are cleaned and therefore differ compared to ‘load_inputs’ or ‘load_dependency_inputs’. Please see ‘_clean_inputs’ for more information.

Parameters:
  • run – The selected run.

  • inputs – Input and filter values from the user.

  • outputs – Raw output from the run.

Returns:

The figure of the ablation paths.

Return type:

return [figure1, None]

static process(run, inputs)[source]

Return raw data based on the run and input data.

Warning

The returned data must be JSON serializable.

Note

The passed inputs are cleaned and therefore differ compared to ‘load_inputs’ or ‘load_dependency_inputs’. Please see ‘_clean_inputs’ for more information.

Parameters:
  • run (AbstractRun) – The run to process.

  • inputs (Dict[str, Any]) – The input data.

Returns:

A serialized dictionary.

Return type:

Dict[str, Any]

Raises:

RuntimeError – If the number of trees is not specified.