peal.adaptors.projection_adaptor.ProjectionAdaptorConfig

class peal.adaptors.projection_adaptor.ProjectionAdaptorConfig[source]

Bases: AdaptorConfig

Config of ProjectionAdaptor.

Parameters:
  • adaptor_type (str) – Fixed to "ProjectionAdaptor"; used by get_adaptor for dispatch.

  • category (str) – Fixed to "adaptor".

  • base_model_config (PredictorConfig or dict or str) – Predictor config (or yaml path) of the classifier to repair; its model_path must contain model.cpl.

  • base_dir (str) – Output directory; created on construction.

  • data (DataConfig or dict or None) – test_data (if given) replaces the predictor’s data config so the evaluation runs on a different dataset; data is currently unused.

  • test_data (DataConfig or dict or None) – test_data (if given) replaces the predictor’s data config so the evaluation runs on a different dataset; data is currently unused.

  • sparse_dictionary (SparseDictionaryConfig or dict or None) – Config passed to get_sparse_dictionary; its get_components() provides the candidate directions.

  • projected_component_index_list (list of int) – Indices of the dictionary components whose span is projected out.

  • partition (int) – Which dataloader to evaluate on: 0 train, 1 validation, 2 test.

Methods

Attributes

adaptor_type

The type of adaptor that shall be used.

category

The category of the config.

partition

projected_component_index_list

sparse_dictionary

base_model_config

base_dir

data

test_data

adaptor_type: str = 'ProjectionAdaptor'

The type of adaptor that shall be used. This is necessary to know which pydantic class to use when loading from yaml.

category: str = 'adaptor'

The category of the config. Can not be changed for adaptor. This is also necessary to identify which pydantic class to use when loading from yaml.

base_model_config: PredictorConfig | dict | str
base_dir: str
data: DataConfig | dict | None
test_data: DataConfig | dict | None
sparse_dictionary: SparseDictionaryConfig | dict | None = None
projected_component_index_list: list = []
partition: int = 2