How to use the rsmtool.reporter.Reporter function in rsmtool

To help you get started, we’ve selected a few rsmtool examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github EducationalTestingService / rsmtool / rsmtool / rsmsummarize.py View on Github external
special_report_sections = configuration['special_sections']

    # get any custom sections and locate them to make sure
    # that they exist, otherwise raise an exception
    custom_report_section_paths = configuration['custom_sections']
    if custom_report_section_paths:
        logger.info('Locating custom report sections')
        custom_report_sections = Reporter.locate_custom_sections(custom_report_section_paths,
                                                                 configuration.configdir)
    else:
        custom_report_sections = []

    section_order = configuration['section_order']

    # Initialize reporter
    reporter = Reporter()

    # check all sections values and order and get the
    # ordered list of notebook files
    chosen_notebook_files = reporter.get_ordered_notebook_files(general_report_sections,
                                                                special_report_sections,
                                                                custom_report_sections,
                                                                section_order,
                                                                subgroups,
                                                                model_type=None,
                                                                context='rsmsummarize')

    # add chosen notebook files to configuration
    configuration['chosen_notebook_files'] = chosen_notebook_files

    # now generate the comparison report
    logger.info('Starting report generation')
github EducationalTestingService / rsmtool / rsmtool / preprocessor.py View on Github external
# what about the special or custom sections?
        special_report_sections = config_obj['special_sections']

        custom_report_section_paths = config_obj['custom_sections']

        if custom_report_section_paths and configdir is not None:
            logging.info('Locating custom report sections')
            custom_report_sections = Reporter.locate_custom_sections(custom_report_section_paths,
                                                                     configdir)
        else:
            custom_report_sections = []

        section_order = config_obj['section_order']

        chosen_notebook_files = Reporter().get_ordered_notebook_files(general_report_sections,
                                                                      special_report_sections,
                                                                      custom_report_sections,
                                                                      section_order,
                                                                      subgroups,
                                                                      model_type=model_type,
                                                                      context='rsmtool')

        # Location of feature file
        feature_field = config_obj['features']

        feature_subset_field = config_obj['feature_subset']

        # if the user requested feature_subset file and feature subset,
        # read the file and check its format
        if feature_subset is not None and feature_subset_field:
            FeatureSubsetProcessor.check_feature_subset_file(feature_subset)
github EducationalTestingService / rsmtool / rsmtool / rsmsummarize.py View on Github external
special_report_sections = configuration['special_sections']

    # get any custom sections and locate them to make sure
    # that they exist, otherwise raise an exception
    custom_report_section_paths = configuration['custom_sections']
    if custom_report_section_paths:
        logger.info('Locating custom report sections')
        custom_report_sections = Reporter.locate_custom_sections(custom_report_section_paths,
                                                                 configuration.configdir)
    else:
        custom_report_sections = []

    section_order = configuration['section_order']

    # Initialize reporter
    reporter = Reporter()

    # check all sections values and order and get the
    # ordered list of notebook files
    chosen_notebook_files = reporter.get_ordered_notebook_files(general_report_sections,
                                                                special_report_sections,
                                                                custom_report_sections,
                                                                section_order,
                                                                subgroups,
                                                                model_type=None,
                                                                context='rsmsummarize')

    # add chosen notebook files to configuration
    configuration['chosen_notebook_files'] = chosen_notebook_files

    # now generate the comparison report
    logger.info('Starting report generation')
github EducationalTestingService / rsmtool / rsmtool / rsmtool.py View on Github external
# Add processed data_container frames to pred_data_container
    new_pred_data_container = pred_data_container + processed_container

    logger.info('Running prediction analyses.')
    (pred_analysis_config,
     pred_analysis_data_container) = analyzer.run_prediction_analyses(new_pred_data_container,
                                                                      pred_config)

    # Write out files
    writer.write_experiment_output(csvdir,
                                   pred_analysis_data_container,
                                   reset_index=True,
                                   file_format=file_format)
    # Initialize reporter
    reporter = Reporter()

    # generate the report
    logger.info('Starting report generation.')
    reporter.create_report(pred_analysis_config,
                           csvdir,
                           figdir)
github EducationalTestingService / rsmtool / rsmtool / utils / commandline.py View on Github external
def _get_all_general_section_names(self):

        reporter = Reporter()
        default_general_sections_value = DEFAULTS.get('general_sections', '')
        default_special_sections_value = DEFAULTS.get('special_sections', '')
        default_custom_sections_value = DEFAULTS.get('custom_sections', '')

        # if we are told ot use subgroups then just make up a dummy subgroup
        # value so that the subgroup-based sections will be included in the
        # section list. This value is not actually used in configuration file.
        subgroups_value = ['GROUP'] if self.use_subgroups else DEFAULTS.get('subgroups', '')
        return reporter.determine_chosen_sections(default_general_sections_value,
                                                  default_special_sections_value,
                                                  default_custom_sections_value,
                                                  subgroups_value,
                                                  context=self.context)