How to use the rsmtool.configuration_parser.ConfigurationParser.validate_config 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 / tests / test_configuration_parser.py View on Github external
def test_validate_config_experiment_id_7(self):
        data = {'comparison_id': 'this_is_a_really_really_really_'
                'really_really_really_really_really_really_really_'
                'really_really_really_really_really_really_really_'
                'really_really_really_really_really_really_really_'
                'really_really_really_long_id',
                'experiment_id_old': 'old_experiment',
                'experiment_dir_old': 'data/old',
                'experiment_id_new': 'new_experiment',
                'experiment_dir_new': 'data/new'}

        _ = ConfigurationParser.validate_config(data, context='rsmcompare')
github EducationalTestingService / rsmtool / tests / test_configuration_parser.py View on Github external
def test_validate_config_min_n_without_subgroups(self):
        data = {'experiment_id': 'experiment_1',
                'train_file': 'data/rsmtool_smTrain.csv',
                'test_file': 'data/rsmtool_smEval.csv',
                'model': 'LinearRegression',
                'min_n_per_group': {"L1": 100,
                                    "L2": 50}}

        _ = ConfigurationParser.validate_config(data)
github EducationalTestingService / rsmtool / tests / test_configuration_parser.py View on Github external
def test_invalid_skll_objective(self):
        data = {'experiment_id': 'experiment_1',
                'train_file': 'data/rsmtool_smTrain.csv',
                'test_file': 'data/rsmtool_smEval.csv',
                'description': 'Test',
                'model': 'LinearSVR',
                'skll_objective': 'squared_error'}

        _ = ConfigurationParser.validate_config(data)
github EducationalTestingService / rsmtool / tests / test_configuration_parser.py View on Github external
def test_validate_config_too_many_experiment_names(self):
        data = {'summary_id': 'summary',
                'experiment_dirs': ["dir1", "dir2", "dir3"],
                'experiment_names': ['exp1', 'exp2', 'exp3', 'exp4']}

        _ = ConfigurationParser.validate_config(data, context='rsmsummarize')
github EducationalTestingService / rsmtool / tests / test_configuration_parser.py View on Github external
def test_validate_config_experiment_id_9(self):
        data = {'summary_id': 'this_is_a_really_really_really_'
                'really_really_really_really_really_really_really_'
                'really_really_really_really_really_really_really_'
                'really_really_really_really_really_really_really_'
                'really_really_really_long_id',
                'experiment_dirs': []}

        _ = ConfigurationParser.validate_config(data, context='rsmsummarize')
github EducationalTestingService / rsmtool / tests / test_configuration_parser.py View on Github external
def test_validate_config_experiment_id_5(self):
        data = {'experiment_id': 'this_is_a_really_really_really_'
                'really_really_really_really_really_really_really_'
                'really_really_really_really_really_really_really_'
                'really_really_really_really_really_really_really_'
                'really_really_really_long_id',
                'train_file': 'data/rsmtool_smTrain.csv',
                'test_file': 'data/rsmtool_smEval.csv',
                'model': 'LinearRegression'}

        _ = ConfigurationParser.validate_config(data)
github EducationalTestingService / rsmtool / tests / test_configuration_parser.py View on Github external
def test_validate_config_experiment_id_3(self):
        data = {'comparison_id': 'old vs new',
                'experiment_id_old': 'old_experiment',
                'experiment_dir_old': 'data/old',
                'experiment_id_new': 'new_experiment',
                'experiment_dir_new': 'data/new'}

        _ = ConfigurationParser.validate_config(data, context='rsmcompare')
github EducationalTestingService / rsmtool / tests / test_configuration_parser.py View on Github external
def test_validate_config_numeric_subgroup_threshold(self):
        data = {'experiment_id': 'experiment_1',
                'train_file': 'data/rsmtool_smTrain.csv',
                'test_file': 'data/rsmtool_smEval.csv',
                'model': 'LinearRegression',
                'subgroups': ['L2', 'L1'],
                'min_n_per_group': 100}

        newdata = ConfigurationParser.validate_config(data)
        eq_(type(newdata['min_n_per_group']), dict)
        assert_equal(newdata['min_n_per_group']['L1'], 100)
        assert_equal(newdata['min_n_per_group']['L2'], 100)
github EducationalTestingService / rsmtool / tests / test_configuration_parser.py View on Github external
def test_validate_config_experiment_id_6(self):
        data = {'experiment_id': 'this_is_a_really_really_really_'
                'really_really_really_really_really_really_really_'
                'really_really_really_really_really_really_really_'
                'really_really_really_really_really_really_really_'
                'really_really_really_long_id',
                'predictions_file': 'data/foo',
                'system_score_column': 'h1',
                'trim_min': 1,
                'trim_max': 5}

        _ = ConfigurationParser.validate_config(data, context='rsmeval')
github EducationalTestingService / rsmtool / tests / test_configuration_parser.py View on Github external
def test_validate_config_dictionary_subgroup_threshold(self):
        data = {'experiment_id': 'experiment_1',
                'train_file': 'data/rsmtool_smTrain.csv',
                'test_file': 'data/rsmtool_smEval.csv',
                'model': 'LinearRegression',
                'subgroups': ['L2', 'L1'],
                'min_n_per_group': {"L1": 100,
                                    "L2": 200}}

        newdata = ConfigurationParser.validate_config(data)
        eq_(type(newdata['min_n_per_group']), dict)
        assert_equal(newdata['min_n_per_group']['L1'], 100)
        assert_equal(newdata['min_n_per_group']['L2'], 200)