BaseSummary¶
- class BaseSummary(sum_op)[source]
Abstract base class for summary contents. Should not be instantiated.
- Parameters:
sum_op (BaseOp) – Operation corresponding to this summary.
Methods
Attributes
|
|
|
- abstract BaseSummary.get_details_dict(summary_info)[source]¶
Return the summary-specific information.
- Parameters:
summary_info (object) – Summary to return info from
- Returns:
dictionary with the results.
- Return type:
dict
Notes
Abstract method be implemented by each individual summary.
Notes
The expected return value is a dictionary of the form:
{“Name”: “”, “Total events”: 0, “Total files”: 0, “Files”: [], “Specifics”: {}}”
- BaseSummary.get_summary(individual_summaries='separate')[source]¶
Return a summary dictionary with the information.
- Parameters:
individual_summaries (str) – “separate”, “consolidated”, or “none”
- Returns:
dict - dictionary with “Dataset” and “Individual files” keys.
- Notes: The individual_summaries value is processed as follows
“separate” individual summaries are to be in separate files
“consolidated” means that the individual summaries are in same file as overall summary
“none” means that only the overall summary is produced.
- BaseSummary.get_summary_details(include_individual=True)[source]¶
Return a dictionary with the details for individual files and the overall dataset.
- Parameters:
include_individual (bool) – If True, summaries for individual files are included.
- Returns:
dict - a dictionary with ‘Dataset’ and ‘Individual files’ keys.
Notes
The ‘Dataset’ value is either a string or a dictionary with the overall summary.
- The ‘Individual files’ value is dictionary whose keys are file names and values are
their corresponding summaries.
Users are expected to provide merge_all_info and get_details_dict to support this.
- abstract BaseSummary.merge_all_info()[source]¶
Return merged information.
- Returns:
Consolidated summary of information.
- Return type:
object
Notes
Abstract method be implemented by each individual summary.
- BaseSummary.save(save_dir, file_formats=['.txt'], individual_summaries='separate', task_name='')[source]¶
- abstract BaseSummary.update_summary(summary_dict)[source]¶
Method to update summary for a given tabular input.
- Parameters:
summary_dict (dict) –
- BaseSummary.DISPLAY_INDENT = ' '¶
- BaseSummary.INDIVIDUAL_SUMMARIES_PATH = 'individual_summaries'¶