csle_common.metastore package

Submodules

csle_common.metastore.metastore_facade module

class csle_common.metastore.metastore_facade.MetastoreFacade[source]

Bases: object

Facade for the metastore, contains methods for querying the metastore

static delete_all(table: str) None[source]

Deletes all rows in the metastore from a given table

Parameters

table – the table to delete from

Returns

None

static get_alpha_vec_policy(id: int) Union[None, AlphaVectorsPolicy][source]

Function for fetching a AlphaVec policy with a given id from the metastore

Parameters

id – the id of the AlphaVec policy

Returns

The AlphaVec policy or None if it could not be found

static get_config(id: int) Union[None, Config][source]

Function for fetching the config with a given id from the metastore

Parameters

id – the id of the config

Returns

The config or None if it could not be found

static get_data_collection_job_config(id: int) Union[None, DataCollectionJobConfig][source]

Function for fetching a data collection job config with a given id from the metastore

Parameters

id – the id of the data collection job config

Returns

The data collection job config or None if it could not be found

static get_dqn_policy(id: int) Union[None, DQNPolicy][source]

Function for fetching a DQN policy with a given id from the metastore

Parameters

id – the id of the DQN policy

Returns

The DQN policy or None if it could not be found

static get_empirical_system_model_config(id: int) Union[None, EmpiricalSystemModel][source]

Function for fetching an empirical system model config with a given id from the metastore

Parameters

id – the id of the empirical system model config

Returns

The empirical system model config or None if it could not be found

static get_emulation(id: int) Union[None, EmulationEnvConfig][source]

Function for extracting the metadata of an emulation with a id

Parameters

id – the id of the emulation

Returns

The emulation config or None if the emulation was not found

static get_emulation_by_name(name: str) Union[None, EmulationEnvConfig][source]

Function for extracting the metadata of an emulation with a given name

Parameters

name – the name of the emulation

Returns

The emulation config or None if the emulation was not found

static get_emulation_execution(ip_first_octet: int, emulation_name: str) Union[None, EmulationExecution][source]

Function for fetching a emulation execution with a given id from the metastore

Parameters
  • ip_first_octet – the id of the emulation execution

  • emulation_name – the name of the emulation

Returns

The emulation execution or None if it could not be found

static get_emulation_image(emulation_name: str) Union[None, Tuple[str, bytes]][source]

Function for fetching the image of a given emulation

Parameters

emulation_name – the name of the emulatin to fetch the image for

Returns

The simulation trace or None if it could not be found

static get_emulation_simulation_trace(id: int) Union[None, EmulationSimulationTrace][source]

Function for fetching a simulation trace with a given id from the metastore

Parameters

id – the id of the emulation-simulation trace

Returns

The emulation-simulation trace or None if it could not be found

static get_emulation_statistic(id: int) Union[None, EmulationStatistics][source]

Function for fetching an emulation satistic with a given id from the metastore

Parameters

id – the id of the statistics

Returns

The emulation statistic or None if it could not be found

static get_emulation_trace(id: int) Union[None, EmulationTrace][source]

Function for fetching an emulation trace with a given id from the metastore

Parameters

id – the id of the emulation trace

Returns

The emulation trace or None if it could not be found

static get_experiment_execution(id: int) Union[None, ExperimentExecution][source]

Function for fetching an experiment execution with a given id from the metastore

Parameters

id – the id of the emulation trace

Returns

The emulation trace or None if it could not be found

static get_fnn_w_softmax_policy(id: int) Union[None, FNNWithSoftmaxPolicy][source]

Function for fetching a FNN with softmax policy with a given id from the metastore

Parameters

id – the id of the FNN with softmax policy

Returns

The FNN with softmax policy or None if it could not be found

static get_gaussian_mixture_system_model_config(id: int) Union[None, GaussianMixtureSystemModel][source]

Function for fetching a gaussian mixture system model config with a given id from the metastore

Parameters

id – the id of the gaussian mixture system model config

Returns

The gaussian mixture system model config or None if it could not be found

static get_gp_system_model_config(id: int) Union[None, GPSystemModel][source]

Function for fetching a gp system model config with a given id from the metastore

Parameters

id – the id of the gp system model config

Returns

The gp system model config or None if it could not be found

static get_linear_threshold_stopping_policy(id: int) Union[None, LinearThresholdStoppingPolicy][source]

Function for fetching a mult-threshold policy with a given id from the metastore

Parameters

id – the id of the linear-threshold policy

Returns

The mult-threshold policy or None if it could not be found

static get_management_user_by_username(username: str) Union[None, ManagementUser][source]

Function for extracting a management user account based on the username

Parameters

username – the username of the user

Returns

The management user or None if no user with the given username was found

static get_management_user_config(id: int) Union[None, ManagementUser][source]

Function for fetching a management user with a given id from the metastore

Parameters

id – the id of the management user

Returns

The management user or None if it could not be found

static get_mcmc_system_model_config(id: int) Union[None, MCMCSystemModel][source]

Function for fetching a mcmc system model config with a given id from the metastore

Parameters

id – the id of the mcmc system model config

Returns

The mcmc system model config or None if it could not be found

static get_multi_threshold_stopping_policy(id: int) Union[None, MultiThresholdStoppingPolicy][source]

Function for fetching a mult-threshold policy with a given id from the metastore

Parameters

id – the id of the multi-threshold policy

Returns

The mult-threshold policy or None if it could not be found

static get_ppo_policy(id: int) Union[None, PPOPolicy][source]

Function for fetching a PPO policy with a given id from the metastore

Parameters

id – the id of the PPO policy

Returns

The PPO policy or None if it could not be found

static get_session_token_by_username(username: str) Union[None, SessionToken][source]

Function for extracting a session token account based on the username

Parameters

username – the username of the user

Returns

The session token or None if no user with the given username was found

static get_session_token_metadata(token: str) Union[None, SessionToken][source]

Function for fetching the metadata of a given session token

Parameters

token – the token to lookup the metadata dor

Returns

The session token and its metadata or None if it could not be found

static get_simulation(id: int) Union[None, SimulationEnvConfig][source]

Function for extracting the metadata of a simulation with a given id

Parameters

id – the id of the simulation

Returns

The simulation config or None if the simulation was not found

static get_simulation_by_name(name: str) Union[None, SimulationEnvConfig][source]

Function for extracting the metadata of a simulation with a given name

Parameters

name – the name of the simulation

Returns

The simulation config or None if the simulation was not found

static get_simulation_image(simulation_name: str) Union[None, Tuple[str, bytes]][source]

Function for fetching the image of a given simulation

Parameters

simulation_name – the name of the simulation to fetch the image for

Returns

The simulation trace or None if it could not be found

static get_simulation_trace(id: int) Union[None, SimulationTrace][source]

Function for fetching a simulation trace with a given id from the metastore

Parameters

id – the id of the simulation trace

Returns

The simulation trace or None if it could not be found

static get_statistics_dataset_metadata(id: int) Union[None, StatisticsDataset][source]

Function for fetching the metadata of a given dataset name

Parameters

id – the id of the dataset to get the metadata of

Returns

The statistics dataset and its metadata or None if it could not be found

static get_statistics_dataset_metadata_by_name(dataset_name: str) Union[None, StatisticsDataset][source]

Function for fetching the metadata of a given dataset name

Parameters

dataset_name – the dataset name to lookup the metadata for

Returns

The statistics dataset and its metadata or None if it could not be found

static get_system_identification_job_config(id: int) Union[None, SystemIdentificationJobConfig][source]

Function for fetching a system identification job config with a given id from the metastore

Parameters

id – the id of the system identification job config

Returns

The system identification job config or None if it could not be found

static get_tabular_policy(id: int) Union[None, TabularPolicy][source]

Function for fetching a Tabular policy with a given id from the metastore

Parameters

id – the id of the Tabular policy

Returns

The Tabular policy or None if it could not be found

static get_traces_dataset_metadata(id: int) Union[None, TracesDataset][source]

Function for fetching the metadata of a given dataset name

Parameters

id – the id of the dataset to get the metadata of

Returns

The traces dataset and its metadata or None if it could not be found

static get_traces_dataset_metadata_by_name(dataset_name: str) Union[None, TracesDataset][source]

Function for fetching the metadata of a given dataset name

Parameters

dataset_name – the dataset name to lookup the metadata for

Returns

The traces dataset and its metadata or None if it could not be found

static get_training_job_config(id: int) Union[None, TrainingJobConfig][source]

Function for fetching a training job config with a given id from the metastore

Parameters

id – the id of the training job config

Returns

The trainign job config or None if it could not be found

static get_vector_policy(id: int) Union[None, VectorPolicy][source]

Function for fetching a vector policy with a given id from the metastore

Parameters

id – the id of the vector policy

Returns

The vector policy or None if it could not be found

static install_emulation(config: EmulationEnvConfig) Optional[int][source]

Installs the emulation configuration in the metastore

Parameters

config – the config to install

Returns

id of the created row or None if the installation failed

static install_simulation(config: SimulationEnvConfig) Union[None, int][source]

Installs the simulation configuration in the metastore

Parameters

config – the config to install

Returns

id of the created row

static list_alpha_vec_policies() List[AlphaVectorsPolicy][source]
Returns

A list of AlphaVec policies in the metastore

static list_alpha_vec_policies_ids() List[Tuple[int, str]][source]
Returns

A list of AlphaVec policies ids in the metastore

static list_config_ids() List[int][source]
Returns

A list of config ids in the metastore

static list_configs() List[Config][source]
Returns

A list of configs in the metastore

static list_data_collection_jobs() List[DataCollectionJobConfig][source]
Returns

A list of data collection jobs in the metastore

static list_data_collection_jobs_ids() List[Tuple[int, str, int]][source]
Returns

A list of data collection job ids in the metastore

static list_dqn_policies() List[DQNPolicy][source]
Returns

A list of DQN policies in the metastore

static list_dqn_policies_ids() List[Tuple[int, str]][source]
Returns

A list of DQN policies ids in the metastore

static list_empirical_system_models() List[EmpiricalSystemModel][source]
Returns

A list of empirical system models in the metastore

static list_empirical_system_models_ids() List[Tuple[int, str, int]][source]
Returns

A list of empirical system model ids in the metastore

static list_emulation_execution_ids() List[Tuple[int, str]][source]
Returns

A list of emulation executions in the metastore

static list_emulation_executions() List[EmulationExecution][source]
Returns

A list of emulation executions in the metastore

static list_emulation_executions_by_id(id: int) List[EmulationExecution][source]
Parameters

id – the first IP octet of the execution

Returns

A list of emulation executions in the metastore for a given emulation

static list_emulation_executions_for_a_given_emulation(emulation_name: str) List[EmulationExecution][source]
Parameters

emulation_name – the name of the emulation

Returns

A list of emulation executions in the metastore for a given emulation

static list_emulation_images() List[Tuple[str, bytes]][source]
Returns

A list of emulation names and images in the metastore

static list_emulation_simulation_traces() List[EmulationSimulationTrace][source]
Returns

A list of emulation-simulation traces in the metastore

static list_emulation_simulation_traces_ids() List[int][source]
Returns

A list of emulation-simulation traces ids in the metastore

static list_emulation_statistics() List[EmulationStatistics][source]
Returns

A list of emulation statistics in the metastore

static list_emulation_statistics_ids() List[Tuple[int, str]][source]
Returns

A list of emulation statistics ids in the metastore

static list_emulation_traces() List[EmulationTrace][source]
Returns

A list of emulation traces in the metastore

static list_emulation_traces_ids() List[Tuple[int, str]][source]
Returns

A list of emulation traces ids in the metastore

static list_emulations() List[EmulationEnvConfig][source]
Returns

A list of emulations in the metastore

static list_emulations_ids() List[Tuple[int, str]][source]
Returns

A list of emulation ids and names in the metastore

static list_experiment_executions() List[ExperimentExecution][source]
Returns

A list of emulation traces in the metastore

static list_experiment_executions_ids() List[Tuple[int, str, str]][source]
Returns

A list of experiment execution ids in the metastore

static list_fnn_w_softmax_policies() List[FNNWithSoftmaxPolicy][source]
Returns

A list of FNN with softmax policies in the metastore

static list_fnn_w_softmax_policies_ids() List[Tuple[int, str]][source]
Returns

A list of FNN with softmax policies ids in the metastore

static list_gaussian_mixture_system_models() List[GaussianMixtureSystemModel][source]
Returns

A list of gaussian mixture system models in the metastore

static list_gaussian_mixture_system_models_ids() List[Tuple[int, str, int]][source]
Returns

A list of gaussian mixture system model ids in the metastore

static list_gp_system_models() List[GPSystemModel][source]
Returns

A list of gp system models in the metastore

static list_gp_system_models_ids() List[Tuple[int, str, int]][source]
Returns

A list of gp system model ids in the metastore

static list_linear_threshold_stopping_policies() List[LinearThresholdStoppingPolicy][source]
Returns

A list of Linear-threshold stopping policies in the metastore

static list_linear_threshold_stopping_policies_ids() List[Tuple[int, str]][source]
Returns

A list of Linear-threshold stopping policies ids in the metastore

static list_management_users() List[ManagementUser][source]
Returns

A list of management users in the metastore

static list_management_users_ids() List[int][source]
Returns

A list of management user ids in the metastore

static list_mcmc_system_models() List[MCMCSystemModel][source]
Returns

A list of MCMC system models in the metastore

static list_mcmc_system_models_ids() List[Tuple[int, str, int]][source]
Returns

A list of MCMC system model ids in the metastore

static list_multi_threshold_stopping_policies() List[MultiThresholdStoppingPolicy][source]
Returns

A list of Multi-threshold stopping policies in the metastore

static list_multi_threshold_stopping_policies_ids() List[Tuple[int, str]][source]
Returns

A list of Multi-threshold stopping policies ids in the metastore

static list_ppo_policies() List[PPOPolicy][source]
Returns

A list of PPO policies in the metastore

static list_ppo_policies_ids() List[Tuple[int, str]][source]
Returns

A list of PPO policies ids in the metastore

static list_session_tokens() List[SessionToken][source]
Returns

A list of session tokens in the metastore

static list_simulation_ids() List[Tuple[int, str]][source]
Returns

A list of simulation ids and names in the metastore

static list_simulation_images() List[Tuple[str, bytes]][source]
Returns

A list of simulation names and images in the metastore

static list_simulation_traces() List[SimulationTrace][source]
Returns

A list of simulation traces in the metastore

static list_simulation_traces_ids() List[Tuple[int, str]][source]
Returns

A list of simulation traces ids in the metastore

static list_simulations() List[SimulationEnvConfig][source]
Returns

A list of simulations in the metastore

static list_statistics_datasets() List[StatisticsDataset][source]
Returns

A list of statistics datasets in the metastore

static list_statistics_datasets_ids() List[Tuple[int, str]][source]
Returns

A list of statistics datasets ids in the metastore

static list_system_identification_jobs() List[SystemIdentificationJobConfig][source]
Returns

A list of system identification jobs in the metastore

static list_system_identification_jobs_ids() List[Tuple[int, str, int]][source]
Returns

A list of system identification job ids in the metastore

static list_tabular_policies() List[TabularPolicy][source]
Returns

A list of Tabular policies in the metastore

static list_tabular_policies_ids() List[Tuple[int, str]][source]
Returns

A list of Tabular policies ids in the metastore

static list_traces_datasets() List[TracesDataset][source]
Returns

A list of traces datasets in the metastore

static list_traces_datasets_ids() List[Tuple[int, str]][source]
Returns

A list of traces datasets ids in the metastore

static list_training_jobs() List[TrainingJobConfig][source]
Returns

A list of training jobs in the metastore

static list_training_jobs_ids() List[Tuple[int, str, str, int]][source]
Returns

A list of training job ids in the metastore

static list_vector_policies() List[VectorPolicy][source]
Returns

A list of vector policies in the metastore

static list_vector_policies_ids() List[Tuple[int, str]][source]
Returns

A list of vector policies ids in the metastore

static remove_alpha_vec_policy(alpha_vec_policy: AlphaVectorsPolicy) None[source]

Removes a AlphaVec policy from the metastore

Parameters

alpha_vec_policy – the policy to remove

Returns

None

static remove_config(config: Config) None[source]

Removes a config from the metastore

Parameters

config – the config to remove

Returns

None

static remove_data_collection_job(data_collection_job: DataCollectionJobConfig) None[source]

Removes a data collection job from the metastore

Parameters

config – the config to uninstall

Returns

None

static remove_dqn_policy(dqn_policy: DQNPolicy) None[source]

Removes a DQN policy from the metastore

Parameters

dqn_policy – the policy to remove

Returns

None

static remove_empirical_system_model(empirical_system_model: EmpiricalSystemModel) None[source]

Removes a empirical system model from the metastore

Parameters

empirical_system_model – the to remove

Returns

None

static remove_emulation_execution(emulation_execution: EmulationExecution) None[source]

Removes a emulation execution from the metastore

Parameters

emulation_execution – the policy to remove

Returns

None

static remove_emulation_simulation_trace(emulation_simulation_trace: EmulationSimulationTrace) None[source]

Removes an emulation-simulation trace from the metastore

Parameters

emulation_simulation_trace – the emulation-simulation trace to remove

Returns

None

static remove_emulation_statistic(emulation_statistic: EmulationStatistics) None[source]

Removes an emulation statistic from the metastore

Parameters

emulation_statistic – the emulation statistic to remove

Returns

None

static remove_emulation_trace(emulation_trace: EmulationTrace) None[source]

Removes an emulation trace from the metastore

Parameters

emulation_trace – the emulation trace to remove

Returns

None

static remove_experiment_execution(experiment_execution: ExperimentExecution) None[source]

Removes an experiment execution from the metastore

Parameters

experiment_execution – the experiment execution to remove

Returns

None

static remove_fnn_w_softmax_policy(fnn_w_softmax_policy: FNNWithSoftmaxPolicy) None[source]

Removes a FNN with softmax policy from the metastore

Parameters

fnn_w_softmax_policy – the policy to remove

Returns

None

static remove_gaussian_mixture_system_model(gaussian_mixture_system_model: GaussianMixtureSystemModel) None[source]

Removes a gaussian mixture system model from the metastore

Parameters

gaussian_mixture_system_model – the to remove

Returns

None

static remove_gp_system_model(gp_system_model: GPSystemModel) None[source]

Removes a gp system model from the metastore

Parameters

gp_system_model – the model to remove

Returns

None

static remove_linear_threshold_stopping_policy(linear_threshold_stopping_policy: LinearThresholdStoppingPolicy) None[source]

Removes a linear-threshold stopping policy from the metastore

Parameters

linear_threshold_stopping_policy – the policy to remove

Returns

None

static remove_management_user(management_user: ManagementUser) None[source]

Removes a management user from the metastore

Parameters

management_user – the user to remove

Returns

None

static remove_mcmc_system_model(mcmc_system_model: MCMCSystemModel) None[source]

Removes a MCMC system model from the metastore

Parameters

mcmc_system_model – the system model to remove

Returns

None

static remove_multi_threshold_stopping_policy(multi_threshold_stopping_policy: MultiThresholdStoppingPolicy) None[source]

Removes a multi-threshold stopping policy from the metastore

Parameters

multi_threshold_stopping_policy – the policy to remove

Returns

None

static remove_ppo_policy(ppo_policy: PPOPolicy) None[source]

Removes a PPO policy from the metastore

Parameters

ppo_policy – the policy to remove

Returns

None

static remove_session_token(session_token: SessionToken) None[source]

Removes a session token from the metastore

Parameters

session_token – the session token to remove

Returns

None

static remove_simulation_trace(simulation_trace: SimulationTrace) None[source]

Removes a simulation trace from the metastore

Parameters

simulation_trace – the simulation trace to remove

Returns

None

static remove_statistics_dataset(statistics_dataset: StatisticsDataset) None[source]

Removes a statistics dataset from the metastore

Parameters

statistics_dataset – the statistic dataset to remove

Returns

None

static remove_system_identification_job(system_identification_job: SystemIdentificationJobConfig) None[source]

Removes a system identification job from the metastore

Parameters

system_identification_job – the job to remove

Returns

None

static remove_tabular_policy(tabular_policy: TabularPolicy) None[source]

Removes a Tabular policy from the metastore

Parameters

tabular_policy – the policy to remove

Returns

None

static remove_traces_dataset(traces_dataset: TracesDataset) None[source]

Removes a traces dataset from the metastore

Parameters

traces_dataset – the traces dataset to remove

Returns

None

static remove_training_job(training_job: TrainingJobConfig) None[source]

Removes a training job from the metastore

Parameters

config – the config to uninstall

Returns

None

static remove_vector_policy(vector_policy: VectorPolicy) None[source]

Removes a vector policy from the metastore

Parameters

vector_policy – the policy to remove

Returns

None

static save_alpha_vec_policy(alpha_vec_policy: AlphaVectorsPolicy) Union[Any, int][source]

Saves a AlphaVec policy to the metastore

Parameters

alpha_vec_policy – the policy to save

Returns

id of the created record

static save_config(config: Config) Union[Any, int][source]

Saves a config to the metastore

Parameters

config – the config to save

Returns

id of the config

static save_data_collection_job(data_collection_job: DataCollectionJobConfig) Union[Any, int][source]

Saves a data collection job to the metastore

Parameters

data_collection_job – the data collection job to save

Returns

id of the created record

static save_dqn_policy(dqn_policy: DQNPolicy) Union[Any, int][source]

Saves a DQN policy to the metastore

Parameters

dqn_policy – the policy to save

Returns

id of the created record

static save_empirical_system_model(empirical_system_model: EmpiricalSystemModel) Union[Any, int][source]

Saves a empirical system model to the metastore

Parameters

empirical_system_model – the empirical system model to save

Returns

id of the created record

static save_emulation_execution(emulation_execution: EmulationExecution) Union[Any, int][source]

Saves a emulation execution to the metastore

Parameters

emulation_execution – the policy to save

Returns

None

static save_emulation_image(img: bytes, emulation_name: str) Any[source]

Saves the image of an emulation in the metastore

Parameters
  • img – the image data to save

  • emulation_name – the name of the emulation

Returns

id of the created row

static save_emulation_simulation_trace(emulation_simulation_trace: EmulationSimulationTrace) Union[Any, int][source]

Saves an emulation_simulation trace

Parameters

emulation_simulation_trace – the emulation trace to save

Returns

id of the new row

static save_emulation_statistic(emulation_statistics: EmulationStatistics) Union[Any, int][source]

Saves a DTO with emulation statistics to the metastore

Parameters

emulation_statistics – the emulation statistics to save

Returns

id of the created record

static save_emulation_trace(emulation_trace: EmulationTrace) Union[Any, int][source]

Saves a trace from the emulation

Parameters

emulation_trace – the emulation trace to save

Returns

id of the created record

static save_experiment_execution(experiment_execution: ExperimentExecution) Union[Any, int][source]

Saves an experiment execution to the metastore

Parameters

experiment_execution – the experiment execution to save

Returns

id of the created record

static save_fnn_w_softmax_policy(fnn_w_softmax_policy: FNNWithSoftmaxPolicy) Union[Any, int][source]

Saves a FNN with softmax policy to the metastore

Parameters

fnn_w_softmax_policy – the policy to save

Returns

id of the created record

static save_gaussian_mixture_system_model(gaussian_mixture_system_model: GaussianMixtureSystemModel) Union[Any, int][source]

Saves a gaussian mixture system model to the metastore

Parameters

gaussian_mixture_system_model – the gaussian mixture system model to save

Returns

id of the created record

static save_gp_system_model(gp_system_model: GPSystemModel) Union[Any, int][source]

Saves a gp system model to the metastore

Parameters

gp_system_model – the gp system model to save

Returns

id of the created record

static save_linear_threshold_stopping_policy(linear_threshold_stopping_policy: LinearThresholdStoppingPolicy) Union[Any, int][source]

Saves a linear-threshold stopping policy to the metastore

Parameters

linear_threshold_stopping_policy – the policy to save

Returns

id of the created record

static save_management_user(management_user: ManagementUser) Union[None, int][source]

Saves a management user to the metastore

Parameters

management_user – the management user to save

Returns

id of the created record

static save_mcmc_system_model(mcmc_system_model: MCMCSystemModel) Union[Any, int][source]

Saves a mcmc system model to the metastore

Parameters

mcmc_system_model – the mcmc system model to save

Returns

id of the created record

static save_multi_threshold_stopping_policy(multi_threshold_stopping_policy: MultiThresholdStoppingPolicy) Union[Any, int][source]

Saves a multi-threshold stopping policy to the metastore

Parameters

multi_threshold_stopping_policy – the policy to save

Returns

id of the created record

static save_ppo_policy(ppo_policy: PPOPolicy) Union[Any, int][source]

Saves a PPO policy to the metastore

Parameters

ppo_policy – the policy to save

Returns

id of the created record

static save_session_token(session_token: SessionToken) Union[None, str][source]

Saves a session token to the metastore

Parameters

session_token – the session token to save

Returns

token of the created record

static save_simulation_image(img: bytes, simulation_name: str) Union[Any, int][source]

Saves the image of a simulation in the metastore

Parameters
  • img – the image data to save

  • simulation_name – the name of the simulation

Returns

id of the created row

static save_simulation_trace(simulation_trace: SimulationTrace) Union[Any, int][source]

Saves a trace from the simulation

Parameters

simulation_trace – the simulation trace to save

Returns

id of the created record

static save_statistics_dataset(statistics_dataset: StatisticsDataset) Union[Any, int][source]

Saves a statistics dataset to the metastore

Parameters

statistics_dataset – the statistics dataset to save

Returns

idg of the created record

static save_system_identification_job(system_identification_job: SystemIdentificationJobConfig) Union[Any, int][source]

Saves a system_identification job to the metastore

Parameters

system_identification_job – the system identification job to save

Returns

id of the created record

static save_tabular_policy(tabular_policy: TabularPolicy) Union[Any, int][source]

Saves a Tabular policy to the metastore

Parameters

tabular_policy – the policy to save

Returns

id of the created record

static save_traces_dataset(traces_dataset: TracesDataset) Union[Any, int][source]

Saves a traces dataset to the metastore

Parameters

traces_dataset – the traces dataset to save

Returns

idg of the created record

static save_training_job(training_job: TrainingJobConfig) Union[Any, int][source]

Saves a training job to the metastore

Parameters

training_job – the training job to save

Returns

id of the created record

static save_vector_policy(vector_policy: VectorPolicy) Union[Any, int][source]

Saves a vector policy to the metastore

Parameters

vector_policy – the policy to save

Returns

id of the created record

static uninstall_emulation(config: EmulationEnvConfig) None[source]

Uninstalls the emulation configuration in the metastore

Parameters

config – the config to uninstall

Returns

None

static uninstall_simulation(config: SimulationEnvConfig) None[source]

Uninstalls the simulation configuration in the metastore

Parameters

config – the config to uninstall

Returns

None

static update_config(config: Config, id: int) None[source]

Updates a config in the metastore

Parameters
  • config – the config to save

  • id – the id of the row to update

Returns

id of the created record

static update_data_collection_job(data_collection_job: DataCollectionJobConfig, id: int) None[source]

Updates a data collection job in the metastore

Parameters
  • training_job – the training job to save

  • id – the id of the row to update

Returns

id of the created record

static update_empirical_system_model(empirical_system_model: EmpiricalSystemModel, id: int) None[source]

Updates a empirical system model in the metastore

Parameters
  • empirical_system_model – the empirical system model to save

  • id – the id of the row to update

Returns

id of the created record

static update_emulation_execution(emulation_execution: EmulationExecution, ip_first_octet: int, emulation: str) None[source]

Updates an emulation execution in the metastore

Parameters
  • emulation_execution – the emulation execution to update

  • ip_first_octet – the first octet of the ip of the execution

  • emulation – the emulation of the execution

Returns

id of the created record

static update_emulation_statistic(emulation_statistics: EmulationStatistics, id: int) None[source]

Updates a row with emulation statistic in the metastore

Parameters
  • emulation_statistics – the emulation statistics to save

  • id – the id of the row to update

Returns

id of the created record

static update_experiment_execution(experiment_execution: ExperimentExecution, id: int) None[source]

Updates an experiment execution in the metastore

Parameters
  • experiment_execution – the experiment execution to update

  • id – the id of the row to update

Returns

id of the created record

static update_gaussian_mixture_system_model(gaussian_mixture_system_model: GaussianMixtureSystemModel, id: int) None[source]

Updates a gaussian mixture system model in the metastore

Parameters
  • gaussian_mixture_system_model – the gaussian mixture system model to save

  • id – the id of the row to update

Returns

id of the created record

static update_gp_system_model(gp_system_model: GPSystemModel, id: int) None[source]

Updates a gp system model in the metastore

Parameters
  • gp_system_model – the gp system model to save

  • id – the id of the row to update

Returns

id of the created record

static update_management_user(management_user: ManagementUser, id: int) None[source]

Updates a management user in the metastore

Parameters
  • management_user – the management user to update

  • id – the id of the row to update

Returns

id of the created record

static update_mcmc_system_model(mcmc_system_model: MCMCSystemModel, id: int) None[source]

Updates a mcmc system model in the metastore

Parameters
  • mcmc_system_model – the mcmc system model to save

  • id – the id of the row to update

Returns

id of the created record

static update_session_token(session_token: SessionToken, token: str) None[source]

Updates a session token in the metastore

Parameters
  • session_token – the session token to update

  • token – the token of the row to update

Returns

None

static update_statistics_dataset(statistics_dataset: StatisticsDataset, id: int) None[source]

Updates a statistics dataset in the metastore

Parameters
  • statistics_dataset – the statistics dataset to update

  • id – the id of the row to update

Returns

id of the created record

static update_system_identification_job(system_identification_job: SystemIdentificationJobConfig, id: int) None[source]

Updates a system identification job in the metastore

Parameters
  • system_identification_job – the system identification job to save

  • id – the id of the row to update

Returns

id of the created record

static update_traces_dataset(traces_dataset: TracesDataset, id: int) None[source]

Updates a traces dataset in the metastore

Parameters
  • traces_dataset – the traces dataset to update

  • id – the id of the row to update

Returns

id of the created record

static update_training_job(training_job: TrainingJobConfig, id: int) None[source]

Updates a training job in the metastore

Parameters
  • training_job – the training job to save

  • id – the id of the row to update

Returns

id of the created record

Module contents