umami.tests.unit.tf_tools package#

Submodules#

umami.tests.unit.tf_tools.test_generators module#

Unit test script for the generator functions of tf_tools.

class umami.tests.unit.tf_tools.test_generators.BaseGeneratorTest(methodName='runTest')#

Bases: TestCase

Base generator test class of the tf_tools.

setUp() None#

Download a test training file

class umami.tests.unit.tf_tools.test_generators.TestCadsGenerator(methodName='runTest')#

Bases: BaseGeneratorTest

Test CADS Generator class of the tf_tools.

test_call()#

Test the call of the generator.

class umami.tests.unit.tf_tools.test_generators.TestDL1Generator(methodName='runTest')#

Bases: BaseGeneratorTest

Test DL1 Generator class of the tf_tools.

test_call()#

Test the call of the generator.

test_call_without_weights()#

Test the call of the generator.

class umami.tests.unit.tf_tools.test_generators.TestDipsGenerator(methodName='runTest')#

Bases: BaseGeneratorTest

Test DIPS Generator class of the tf_tools.

test_call()#

Test the call of the generator.

test_call_without_weights()#

Test the call of the generator.

class umami.tests.unit.tf_tools.test_generators.TestModelGenerator(methodName='runTest')#

Bases: BaseGeneratorTest

Test Generator base class of the tf_tools.

test_init()#

Test the init from the base class

test_init_no_n_jets_no_x_given()#

Test case for init without n_jets given without X.

test_init_no_n_jets_x_name_given()#

Test case for init without n_jets given with X_Name.

test_init_no_n_jets_x_trk_name_given()#

Test case for init without n_jets given with X_trk_Name.

test_load_in_memory()#

Test the basic load_in_memory function.

test_load_in_memory_x_name_error()#

Test the error when trying to load jets without X_Name given.

test_load_in_memory_x_trk_name_error()#

Test the error when trying to load tracks without X_trk_Name given.

class umami.tests.unit.tf_tools.test_generators.TestUmamiCondAttGenerator(methodName='runTest')#

Bases: BaseGeneratorTest

Test Umami Cond Att Generator class of the tf_tools.

test_call()#

Test the call of the generator.

class umami.tests.unit.tf_tools.test_generators.TestUmamiGenerator(methodName='runTest')#

Bases: BaseGeneratorTest

Test Umami Cond Att Generator class of the tf_tools.

test_call()#

Test the call of the generator.

umami.tests.unit.tf_tools.test_tddgenerators module#

Unit test script for the generator functions of tf_tools.

class umami.tests.unit.tf_tools.test_tddgenerators.TestTDDGenerator(methodName='runTest')#

Bases: TestCase

Test the TDDGenerator class.

setUp() None#

Hook method for setting up the test fixture before exercising it.

tearDown() None#

Hook method for deconstructing the test fixture after testing it.

test_circular_modelgen_eq_tddgen()#

Test that the TrainSampleWriter+ModelGenerator and TDDGenerator retrieve the same data.

test_circular_modelgen_eq_tddgen_old_scaling()#

Test that the TrainSampleWriter+ModelGenerator and TDDGenerator retrieve the same data.

test_circular_with_excluded_var()#

Test that the TrainSampleWriter+ModelGenerator and TDDGenerator retrieve the same data and manage excluded variables

test_circular_with_weights_in_tdd()#

Test that the TrainSampleWriter+ModelGenerator and TDDGenerator retrieve the same data and weights

test_get_generator()#

Test that the get_generator function returns the correct generator.

umami.tests.unit.tf_tools.test_tf_tools module#

Unit test script for the functions of tf_tools.

class umami.tests.unit.tf_tools.test_tf_tools.AttentionTestCase(methodName='runTest')#

Bases: TensorFlowTestCase

Test class for the attention layer.

setUp()#

Setting up the Attention network

test_call()#

Test the call function.

test_call_assertion_error()#

Test call functions assertion error.

test_call_no_softmax()#

Test the call function with no softmax applied.

test_call_with_mask()#

The the call function with given masking.

test_compute_mask()#

Test computing of the masking.

test_compute_mask_errors()#

Test error of the masking.

test_get_config()#

Test the returning of the config values.

class umami.tests.unit.tf_tools.test_tf_tools.ConditionalDeepSetTestCase(methodName='runTest')#

Bases: TensorFlowTestCase

Test class for the DeepSet.

setUp()#

Setting up the DeepSet network

test_call()#

Test call function.

test_compute_mask_no_mask()#

Test compute_mask function.

test_get_config()#

Test the returning of the config values.

class umami.tests.unit.tf_tools.test_tf_tools.ConfigObject#

Bases: object

Object class with attributes.

class umami.tests.unit.tf_tools.test_tf_tools.DeepSetTestCase(methodName='runTest')#

Bases: TensorFlowTestCase

Test class for the DeepSet.

setUp()#

Setting up the DeepSet network

test_call()#

Test call function.

test_call_assertion_error()#

Test call functions assertion error.

test_call_no_batch_norm()#

Test call function with no batch normalisation.

test_call_with_mask()#

Test call function with given mask.

test_compute_mask()#

Test compute_mask function.

test_get_config()#

Test the returning of the config values.

class umami.tests.unit.tf_tools.test_tf_tools.DenseNetTestCase(methodName='runTest')#

Bases: TensorFlowTestCase

The class for the DenseNet

setUp()#

Setting up the DenseNet

test_call()#

Test the call function.

test_get_config()#

Test returning the config values

class umami.tests.unit.tf_tools.test_tf_tools.PrepareModelTestCase(methodName='runTest')#

Bases: TestCase

Test the prepare_model function.

setUp() None#

Hook method for setting up the test fixture before exercising it.

test_init_fresh_model()#

Test fresh model init.

test_init_fresh_model_no_load_optimiser_given()#

Test fresh model init with no load_optimiser given.

test_load_model_with_continue_training()#

Test loading of a model without continuation.

test_load_model_without_continue_training()#

Test loading of a model without continuation.

test_load_optimiser_value_rrror()#

Test load optimiser error.

umami.tests.unit.tf_tools.test_tf_tools_convert_to_record module#

Unit test script for the convert to tfrecord functions of tf_tools.

class umami.tests.unit.tf_tools.test_tf_tools_convert_to_record.ConvertTest(methodName='runTest')#

Bases: TestCase

Unit test the functions inside the Convert_to_Record class.

setUp()#

Hook method for setting up the test fixture before exercising it.

test_faulty_setup()#

Test raising of an error for a faulty setup.

test_save_parameters()#

Test the saving of the parameters for the tfrecord conversion.

test_save_parameters_nadd_vars()#

Test the saving of the parameters for the tfrecord conversion with conditional info added.

Module contents#