local_results_save
- class aitoolbox.experiment.local_save.local_results_save.AbstractLocalResultsSaver[source]
Bases:
ABC
- abstract save_experiment_results(result_package, training_history, project_name, experiment_name, experiment_timestamp=None, save_true_pred_labels=False, protect_existing_folder=True)[source]
Single file results saving method which all the result savers have to implement to give an expected API
- Parameters:
result_package (aitoolbox.experiment.result_package.abstract_result_packages.AbstractResultPackage) – evaluated result package
training_history (aitoolbox.experiment.training_history.TrainingHistory) – train loop’s training history
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
protect_existing_folder (bool) – can override potentially already existing folder or not
- Returns:
list of list with this format: [[results_file_name, results_file_local_path], … [ , ]] Each file should be a new list specifying the file name and its full path
The first file path should be pointing to the main experiment results file.
- Return type:
- abstract save_experiment_results_separate_files(result_package, training_history, project_name, experiment_name, experiment_timestamp, save_true_pred_labels=False, protect_existing_folder=True)[source]
Separate file results saving method which all the result savers have to implement to give an expected API
- Parameters:
result_package (aitoolbox.experiment.result_package.abstract_result_packages.AbstractResultPackage) – evaluated result package
training_history (aitoolbox.experiment.training_history.TrainingHistory) – train loop’s training history
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
protect_existing_folder (bool) – can override potentially already existing folder or not
- Returns:
list of list with this format: [[results_file_name, results_file_local_path], … [ , ]] Each file should be a new list specifying the file name and its full path
The first file path should be pointing to the main experiment results file.
- Return type:
- class aitoolbox.experiment.local_save.local_results_save.BaseLocalResultsSaver(local_model_result_folder_path='~/project/model_result', file_format='pickle')[source]
Bases:
object
Base functionality for all the local results savers
- Parameters:
- create_experiment_local_folder_structure(project_name, experiment_name, experiment_timestamp)[source]
Creates experiment local results folder hierarchy
- static create_experiment_local_results_folder(project_name, experiment_name, experiment_timestamp, local_model_result_folder_path)[source]
Creates experiment local results folder hierarchy
- Parameters:
- Returns:
experiment results folder path (inside the experiment folder)
- Return type:
- static get_experiment_local_results_folder_paths(project_name, experiment_name, experiment_timestamp, local_model_result_folder_path)[source]
Generates experiment local results folder hierarchy paths
- Parameters:
- Returns:
project_dir_path, experiment_dir_path, experiment_results_dir_path
- Return type:
- class aitoolbox.experiment.local_save.local_results_save.LocalResultsSaver(local_model_result_folder_path='~/project/model_result', file_format='pickle')[source]
Bases:
AbstractLocalResultsSaver
,BaseLocalResultsSaver
Local model training results saver to local drive
- Parameters:
- save_experiment_results(result_package, training_history, project_name, experiment_name, experiment_timestamp=None, save_true_pred_labels=False, protect_existing_folder=True)[source]
Saves all the experiment results into single local file
- Parameters:
result_package (aitoolbox.experiment.result_package.abstract_result_packages.AbstractResultPackage) – evaluated result package
training_history (aitoolbox.experiment.training_history.TrainingHistory) – train loop’s training history
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
protect_existing_folder (bool) – can override potentially already existing folder or not
- Returns:
- list of list with this format: [[results_file_path_inside_results_dir, results_file_local_path], … [ , ]]
Each file should be a new list specifying the file name and its full path.
The first file path should be pointing to the main experiment results file.
- Return type:
- save_experiment_results_separate_files(result_package, training_history, project_name, experiment_name, experiment_timestamp=None, save_true_pred_labels=False, protect_existing_folder=True)[source]
Saves the experiment results into separate local files
- Parameters:
result_package (aitoolbox.experiment.result_package.abstract_result_packages.AbstractResultPackage) – evaluated result package
training_history (aitoolbox.experiment.training_history.TrainingHistory) – train loop’s training history
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
protect_existing_folder (bool) – can override potentially already existing folder or not
- Returns:
list of list with this format: [[results_file_path_inside_results_dir, results_file_local_path], … [ , ]] Each file should be a new list specifying the file name and its full path.
The first file path should be pointing to the main experiment results file.
- Return type: