pe.callback.common package

Submodules

pe.callback.common.compute_fid module

class pe.callback.common.compute_fid.ComputeFID(priv_data, embedding)[source]

Bases: Callback

The callback that computes the Frechet Inception Distance (FID) between the private and synthetic data.

__call__(syn_data)[source]

This function is called after each PE iteration that computes the FID between the private and synthetic data.

Parameters:

syn_data (pe.data.data.Data) – The synthetic data

Returns:

The FID between the private and synthetic data

Return type:

list[pe.metric_item.FloatMetricItem]

__init__(priv_data, embedding)[source]

Constructor.

Parameters:

pe.callback.common.save_checkpoints module

class pe.callback.common.save_checkpoints.SaveCheckpoints(output_folder, iteration_format='09d')[source]

Bases: Callback

The callback that saves checkpoints of the synthetic data.

__call__(syn_data)[source]

This function is called after each PE iteration that saves checkpoints of the synthetic data.

Parameters:

syn_data (pe.data.data.Data) – The synthetic data

__init__(output_folder, iteration_format='09d')[source]

Constructor.

Parameters:
  • output_folder (str) – The output folder that will be used to save the checkpoints

  • iteration_format (str, optional) – The format of the iteration number, defaults to “09d”

_get_checkpoint_path(iteration)[source]

Get the checkpoint path.

Parameters:

iteration (int) – The PE iteration number

Returns:

The checkpoint path

Return type:

str