Documentation for Modelhandler Module¶
ModelHandler
¶
Bases: ABC
Source code in nebula/core/situationalawareness/discovery/modelhandlers/modelhandler.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
|
accept_model(model)
abstractmethod
¶
Evaluate and store a received model if it satisfies the required criteria.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model
|
The model object to be processed or stored. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
True if the model is accepted, False otherwise. |
Source code in nebula/core/situationalawareness/discovery/modelhandlers/modelhandler.py
15 16 17 18 19 20 21 22 23 24 25 26 |
|
get_model(model)
abstractmethod
async
¶
Asynchronously retrieve or generate the model to be used.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model
|
A reference to the kind of model to be used. |
required |
Returns:
Name | Type | Description |
---|---|---|
object |
The model instance requested. |
Source code in nebula/core/situationalawareness/discovery/modelhandlers/modelhandler.py
28 29 30 31 32 33 34 35 36 37 38 39 |
|
pre_process_model()
abstractmethod
¶
Perform any necessary preprocessing steps on the model before it is used.
Returns:
Name | Type | Description |
---|---|---|
object |
The preprocessed model, ready for further operations. |
Source code in nebula/core/situationalawareness/discovery/modelhandlers/modelhandler.py
41 42 43 44 45 46 47 48 49 |
|
set_config(config)
abstractmethod
¶
Configure internal settings for the model handler using the provided configuration.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config
|
A configuration object or dictionary with parameters relevant to model handling. |
required |
Source code in nebula/core/situationalawareness/discovery/modelhandlers/modelhandler.py
5 6 7 8 9 10 11 12 13 |
|