51Degrees Pipeline for Python

fiftyone_pipeline_examples.cloud.engines.WeightedCloudEngine Class Reference

Detailed Description

A cloud engine whose section includes weighted values.

Each weighted value is a list of {"value", "weighting"} dictionaries with the weighting as a proportion from 0.0 to 1.0, the form the on-premise engines use, rather than the raw weighting the cloud sends.

Inheritance diagram for fiftyone_pipeline_examples.cloud.engines.WeightedCloudEngine:

[legend]

Collaboration diagram for fiftyone_pipeline_examples.cloud.engines.WeightedCloudEngine:

[legend]

Public Member Functions

 process_internal (self, flowdata)
 Process function of a cloud engine.

Public Member Functions inherited from fiftyone_pipeline_cloudrequestengine.cloudengine.CloudEngine

 __init__ (self)
 on_registration (self, pipeline)
 Callback called when an engine is added to a pipeline In this case sets up the properties list for the element from data in the CloudRequestEngine.
 pipeline_element_not_found (self, element, flowdata)
 Custom error when an element cannot be found in the pipeline.

Public Member Functions inherited from fiftyone_pipeline_engines.engine.Engine

 __init__ (self, data_file=None)
 Constructor for an engine.
 set_cache (self, cache)
 Add a cache to an engine @type cashe: Cache.
 set_restricted_properties (self, properties_list)
 Add a subset of properties.
 in_cache (self, flowdata)
 A method to check if a flowdata's evidence is in the cache.
 refresh (self, identifier)
 process (self, flowdata)
 Engine's core process function.
 close (self)
 Stop the checks and updates of the engine's data file, whose timers would otherwise keep the engine alive.
 register_data_file (self, data_file)
 Register a data_file of the DataFile class with the engine @type data_file: DataFile.

Public Member Functions inherited from fiftyone_pipeline_core.flowelement.FlowElement

 __init__ (self)
 List of Pipelines the FlowElement has been added to.
 get_evidence_key_filter (self)
 Filter FlowData evidence using the FlowElement's EvidenceKeyFilter.
 filter_evidence (self, flowdata)
 Filter FlowData evidence using the FlowElement's EvidenceKeyFilter.
 filter_evidence_key (self, key)
 Filter FlowData.evidence using the flowElement's EvidenceKeyFilter with the property key of evidence of interest.
 get_properties (self)
 Get the FlowElement.properties of a FlowElement.

Static Protected Member Functions

 _with_weighting (item)
 Turn the raw weighting of one weighted entry into a proportion.

Additional Inherited Members

Public Attributes inherited from fiftyone_pipeline_engines.engine.Engine

 data_file = data_file
 cache = cache
 restricted_properties = properties_list

Public Attributes inherited from fiftyone_pipeline_core.flowelement.FlowElement

list pipelines = []
dict properties = {}
str datakey = ""
bool exclude_from_messages = False

Protected Member Functions inherited from fiftyone_pipeline_core.flowelement.FlowElement

 _log (self, level, message)

Member Function Documentation

◆ _with_weighting()

fiftyone_pipeline_examples.cloud.engines.WeightedCloudEngine._with_weighting ( item)
staticprotected

Turn the raw weighting of one weighted entry into a proportion.

An entry with no raw weighting is returned unchanged.

◆ process_internal()

fiftyone_pipeline_examples.cloud.engines.WeightedCloudEngine.process_internal ( self,
flowdata )

Process function of a cloud engine.

This organises and parses data returned from the Cloud Request Engine and adds it to the FlowData

@type flowdata: FlowData

Parameters
flowdataFlowData to process

Reimplemented from fiftyone_pipeline_cloudrequestengine.cloudengine.CloudEngine.