traveltimes_prediction.configs package

Submodules

traveltimes_prediction.configs.db_settings module

Module db_settings.

Contains the settings of database connections.

Connections used for data sources are following:

  • For DET1s, BCKs - connection_string_data_bs3
  • For DET2 - connection_string_data_bs2
  • For referential TTs - connection_string_tt_real

Connections used as data storages:

  • Predictions` results - connection_string_results
  • Trained models - connection_string_models

traveltimes_prediction.configs.general_settings module

Module general_settings.

Contain settings about the prediction & training intervals, paths to dumped data, calculator.

traveltimes_prediction.configs.general_settings.all_models = {<class 'traveltimes_prediction.models.cluster_model.ClusterModel'>, <class 'traveltimes_prediction.models.combined_model.CombinedModel'>, <class 'traveltimes_prediction.models.time_domain_model.TimeDomainModel'>}

Allowed models to be used by prediction system

traveltimes_prediction.configs.general_settings.dumped_features_path = ''

Path to dumped features` folder - folder, where the dumped features are stored - to avoid frequent heavy DB queries

traveltimes_prediction.configs.general_settings.max_traveltime = 7200

Max allowed traveltime predicted - used for coercing nonsense values produced by models

traveltimes_prediction.configs.general_settings.prediction_first_run_offset = 120

Offset in seconds from start of the first training, when prediction will be run for the first time

traveltimes_prediction.configs.general_settings.prediction_interval_seconds = 60

Prediction interval in seconds

traveltimes_prediction.configs.general_settings.real_tt_calculator_path = ''

Path to calculator of real traveltimes - it is used for the calculation of the ground truth necessary for the training

traveltimes_prediction.configs.general_settings.training_data_interval = 30

Data to be retrieved for training in days

traveltimes_prediction.configs.general_settings.training_interval_seconds = 86400

Training interval in seconds

traveltimes_prediction.configs.sections_settings module

Module section_settings.

Contains settings for all used sections, list of sections which should be maintained and definitions of sensors.

Settings of sections are in sections_settings constant. For each section, multiple attributes has to be specified as follows:

  • Input sensors - list of sensors, which are at the beginning of the section.
  • Output sensors - list of sensors that are at the end of the section.
  • Inner sensors - list of sensor groups, which are between Input and Output. Each group of sensors is located at one slice.
  • Forbidden models - set of model classes, that are not used for creation of the models of section.
  • Models` config - configurations of the models (dicts)
  • Sensor types - types of sensors that are used on this section.
  • Timezone - timezone of section -> e.g. ‘Europe/Prague’, ‘Europe/London’ and others.

Sensors` names per each SENSOR_TYPE are defined in constant sensors.

class traveltimes_prediction.configs.sections_settings.SENSOR_TYPE[source]

Bases: object

Class that defines the sensors` types.

SENSOR_DET1 = 'det1'
SENSOR_DET2 = 'det2'
traveltimes_prediction.configs.sections_settings.sections_to_maintain = ['TEST-TEST']

List of sections that should be maintained

Module contents