alibi_detect.saving.saving module

alibi_detect.saving.saving.save_detector(detector, filepath, legacy=False)[source]

Save outlier, drift or adversarial detector.

Parameters:
  • detector (Union[Detector, ConfigurableDetector]) – Detector object.

  • filepath (Union[str, PathLike]) – Save directory.

  • legacy (bool) – Whether to save in the legacy .dill format instead of via a config.toml file. Default is False. This option will be removed in a future version.

Return type:

None

alibi_detect.saving.saving.write_config(cfg, filepath)[source]

Save an unresolved detector config dict to a TOML file.

Parameters:
  • cfg (dict) – Unresolved detector config dict.

  • filepath (Union[str, PathLike]) – Filepath to directory to save ‘config.toml’ file in.