umami.tests.unit.train_tools package#
Submodules#
umami.tests.unit.train_tools.test_nn_tools module#
Unit test script for the NN_tools functions.
- class umami.tests.unit.train_tools.test_nn_tools.CallbackBaseTestCase(methodName='runTest')#
Bases:
TestCase
Unit tests for the callback base class
- setUp() None #
Hook method for setting up the test fixture before exercising it.
- test_init_no_continue()#
Test init without continue training.
- test_init_no_val_data()#
Test init without valdidation data.
- test_init_with_continue_new_file_init()#
Test init with continue training.
- test_init_with_continue_no_file_init()#
Test init with continue training but no file given.
- class umami.tests.unit.train_tools.test_nn_tools.ConfigObject#
Bases:
object
Object class with attributes.
- class umami.tests.unit.train_tools.test_nn_tools.ConfigurationTestCase(methodName='runTest')#
Bases:
TestCase
Test the implementation of the Configuration class.
- setUp()#
Set a example config file.
- test_cads_config()#
Test call of CADS configuration file.
- test_cads_without_cond_info()#
Test cads without conditions error.
- test_dips_att_with_cond_info()#
Test dips attention with conditions error.
- test_dips_config()#
Test call of DIPS configuration file.
- test_double_defined_b_jets()#
Test double defined bjets error.
- test_double_defined_c_jets()#
Test double defined cjets error.
- test_double_label_value()#
Test double label error.
- test_missing_key_error()#
Test missing key error.
- test_no_batch_size()#
Test no batch size given error.
- test_no_eval_batch_size()#
Test the no evaluation batch size given case.
- test_no_val_batch_size()#
Test the no validation batch size given case.
- test_no_val_no_eval_batch_size()#
Test the no validation and no evaluation batch size given case.
- test_umami_config()#
Test call of Umami configuration file.
- class umami.tests.unit.train_tools.test_nn_tools.CreateMetadataFolderTestCase(methodName='runTest')#
Bases:
TestCase
Test class for the create_metadata_folder function.
- setUp()#
Hook method for setting up the test fixture before exercising it.
- test_create_metadata_folder()#
Test the nominal behaviour.
- test_create_metadata_folder_overwrite()#
Test the overwrite behaviour.
- class umami.tests.unit.train_tools.test_nn_tools.GetDropoutRatesTestCase(methodName='runTest')#
Bases:
TestCase
Test class for the helper function get_dropout_rates.
- setUp() None #
Hook method for setting up the test fixture before exercising it.
- test_correct_config_dips()#
Test the case for DIPS
- test_wrong_length()#
Test if error is raised if dropout rate is not defined for each layer.
- class umami.tests.unit.train_tools.test_nn_tools.GetEpochFromStringTestCase(methodName='runTest')#
Bases:
TestCase
Test class for the get_epoch_from_string function.
- setUp()#
Hook method for setting up the test fixture before exercising it.
- test_get_epoch_from_string()#
Test nominal behaviour.
- class umami.tests.unit.train_tools.test_nn_tools.GetJetFeatureIndicesTestCase(methodName='runTest')#
Bases:
TestCase
Test the jet features indices slicing.
- setUp()#
Hook method for setting up the test fixture before exercising it.
- test_exclude_in_header()#
Test exclude in header option.
- test_get_jet_feature_indices()#
Test nominal behaviour.
- class umami.tests.unit.train_tools.test_nn_tools.GetJetFeaturePositionTestCase(methodName='runTest')#
Bases:
TestCase
Test the jet features indices finding.
- setUp()#
Hook method for setting up the test fixture before exercising it.
- test_get_jet_feature_position()#
Test nominal behaviour.
- test_get_jet_feature_position_value_error()#
Test raise of ValueError.
- class umami.tests.unit.train_tools.test_nn_tools.GetMetricsFileNameTestCase(methodName='runTest')#
Bases:
TestCase
Test class for get_metrics_file_name function.
- setUp()#
Hook method for setting up the test fixture before exercising it.
- test_get_dict_name()#
Test nominal behaviour.
- test_get_dict_name_without_val_dict_path()#
Test name retrieval without validation dict.
- test_get_parameters()#
Test the nominal behaviour of the get_parameters_from_validation_dict_name function.
- test_get_parameters_exception()#
Test execption if wrong parameter is extracted.
- class umami.tests.unit.train_tools.test_nn_tools.GetModelPathTestCase(methodName='runTest')#
Bases:
TestCase
Test class for the get_model_path function.
- setUp()#
Hook method for setting up the test fixture before exercising it.
- test_get_model_path()#
Test nominal behaviour.
- class umami.tests.unit.train_tools.test_nn_tools.GetSamplesTestCase(methodName='runTest')#
Bases:
TestCase
Test all functions that uses the GetSamples functions
- setUp()#
Hook method for setting up the test fixture before exercising it.
- test_get_test_file()#
Test nominal behaviour.
- test_get_test_sample()#
Test nominal behaviour of get_test_sample
- test_get_test_sample_errors()#
Test errors risen by get_test_sample.
- test_get_test_sample_extended_labeling()#
Test get test sample for the extended labelling.
- test_get_test_sample_trks()#
Test nominal behaviour.
- test_get_test_sample_trks_extended_labeling()#
Test get test sample trks for extended labelling.
- test_load_validation_data()#
Test the loading of the validation data for umami.
- test_load_validation_data_no_var_cuts()#
Test the loading of the validation data for umami with no variable cuts.
- test_load_validation_data_unsupported_tagger()#
Test behaviour when not supported tagger is provided.
- class umami.tests.unit.train_tools.test_nn_tools.GetUniqueIdentifiersTestCase(methodName='runTest')#
Bases:
TestCase
Test class for the unique identifiers.
- setUp() None #
Hook method for setting up the test fixture before exercising it.
- test_hardcoded_dict()#
Test the hardcoded dicts.
- class umami.tests.unit.train_tools.test_nn_tools.MinimalPreprocessingConfig(scale_dict: str)#
Bases:
object
Init a object with the scale dict as attribute
- class umami.tests.unit.train_tools.test_nn_tools.MyCallbackTestCase(methodName='runTest')#
Bases:
TestCase
Test the Callback implementation for DIPS
- setUp()#
Hook method for setting up the test fixture before exercising it.
- test_my_callback()#
Test the MyCallback class
- class umami.tests.unit.train_tools.test_nn_tools.MyCallbackUmamiTestCase(methodName='runTest')#
Bases:
TestCase
Test the Callback implementation for UMAMI
- setUp()#
Hook method for setting up the test fixture before exercising it.
- test_my_callback_umami()#
Test the MyCallbackUmami class
- class umami.tests.unit.train_tools.test_nn_tools.SetupOutputDirectoryTestCase(methodName='runTest')#
Bases:
TestCase
Test class for the setup_output_directory function.
- setUp()#
Hook method for setting up the test fixture before exercising it.
- test_setup_output_directory()#
Test nominal behaviour.
- test_setup_output_directory_clean()#
Test nominal behaviour with a clean fresh start.
- test_setup_output_directory_continue()#
Test nominal behaviour with a continuation of the training.
- test_setup_output_directory_error()#
Test error behaviour if file already exists.