results_save

class aitoolbox.cloud.AWS.results_save.AbstractResultsSaver[source]

Bases: abc.ABC

abstract save_experiment_results(result_package, training_history, project_name, experiment_name, experiment_timestamp=None, save_true_pred_labels=False, separate_files=False, protect_existing_folder=True)[source]
Parameters
Returns

results_file_s3_path, experiment_timestamp

Return type

(str, str)

class aitoolbox.cloud.AWS.results_save.BaseResultsSaver(bucket_name='model-result', cloud_dir_prefix='')[source]

Bases: aitoolbox.cloud.AWS.data_access.BaseDataSaver

Base experiment results saving to AWS S3 functionality

Parameters
  • bucket_name (str) – S3 bucket into which the files will be saved

  • cloud_dir_prefix (str) – destination folder path inside selected bucket

create_experiment_cloud_storage_folder_structure(project_name, experiment_name, experiment_timestamp)[source]
Parameters
  • project_name (str) – root name of the project

  • experiment_name (str) – name of the particular experiment

  • experiment_timestamp (str) – time stamp at the start of training

Returns

experiment cloud path

Return type

str

class aitoolbox.cloud.AWS.results_save.S3ResultsSaver(bucket_name='model-result', cloud_dir_prefix='', local_model_result_folder_path='~/project/model_result')[source]

Bases: aitoolbox.cloud.AWS.results_save.AbstractResultsSaver, aitoolbox.cloud.AWS.results_save.BaseResultsSaver

AWS S3 results saver

It first saves the results files to local drive and then uploads them to S3

Parameters
  • bucket_name (str) – name of the bucket in the S3 to which the results files will be saved

  • cloud_dir_prefix (str) – destination folder path inside selected bucket

  • local_model_result_folder_path (str) – root local path where project folder will be created

save_experiment_results(result_package, training_history, project_name, experiment_name, experiment_timestamp=None, save_true_pred_labels=False, separate_files=False, protect_existing_folder=True)[source]
Save produced experiment results recorded in the result package to the results file on local drive and upload

them to S3

Parameters
  • result_package (aitoolbox.experiment.result_package.abstract_result_packages.AbstractResultPackage) –

  • training_history (aitoolbox.experiment.training_history.TrainingHistory) –

  • project_name (str) – root name of the project

  • experiment_name (str) – name of the particular experiment

  • experiment_timestamp (str or None) – time stamp at the start of training

  • save_true_pred_labels (bool) – should ground truth labels also be saved

  • separate_files (bool) – should the results be saved in separate pickle files or should all of the results be batched together in a single results file

  • protect_existing_folder (bool) – can override potentially already existing folder or not

Returns

results file path on S3, experiment timestamp

Return type

(str, str)