Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ def run(self, data_file, logger, output):
# https://51degrees.com/documentation/_pipeline_api__concepts__configuration__builders__index.html?utm_source=code&utm_medium=example&utm_campaign=51degrees-python&utm_content=fiftyone_devicedetection_examples-src-fiftyone_devicedetection_examples-onpremise-gettingstarted_console.py&utm_term=run
pipeline = DeviceDetectionPipelineBuilder(
data_file_path = data_file,
# We use the low memory profile as its performance is
# sufficient for this example. See the documentation for
# more detail on this and other configuration options:
# We use the MaxPerformance profile, which loads the whole data
# file into memory. The free Lite data file is about 35 MB, so
# that costs little memory and gives the fastest detections.
# See the documentation for more detail on this and other
# configuration options:
# https://51degrees.com/documentation/_device_detection__features__performance_options.html?utm_source=code&utm_medium=example&utm_campaign=51degrees-python&utm_content=fiftyone_devicedetection_examples-src-fiftyone_devicedetection_examples-onpremise-gettingstarted_console.py&utm_term=run
# https://51degrees.com/documentation/_pipeline_api__features__automatic_datafile_updates.html?utm_source=code&utm_medium=example&utm_campaign=51degrees-python&utm_content=fiftyone_devicedetection_examples-src-fiftyone_devicedetection_examples-onpremise-gettingstarted_console.py&utm_term=run
# https://51degrees.com/documentation/_pipeline_api__features__usage_sharing.html?utm_source=code&utm_medium=example&utm_campaign=51degrees-python&utm_content=fiftyone_devicedetection_examples-src-fiftyone_devicedetection_examples-onpremise-gettingstarted_console.py&utm_term=run
Expand Down
2 changes: 1 addition & 1 deletion ip-intelligence/fiftyone_ipintelligence/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pipeline = IpIntelligencePipelineBuilder(resource_key="YOUR_RESOURCE_KEY").build

# On-premise
pipeline = IpIntelligencePipelineBuilder(
data_file_path="51Degrees-LiteIpiV41.ipi",
data_file_path="51Degrees-LiteV41.ipi",
licence_keys="",
usage_sharing=False).build()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ def run(self, data_file, license_key, interactive, logger, output):
# is configured to use a temporary copy.
data_file_path = data_file,
create_temp_data_copy = True,
# The Enterprise data file is large, so the LowMemory profile
# reads it from disk rather than holding parts of it in memory.
performance_profile = "LowMemory",
# The update listener notifies us when an update is complete.
data_file_update_service = update_service,
# A license key is required for automatic updates.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,12 @@
#
# The native engine holds the Python GIL for the duration of each lookup, so
# threads cannot run lookups in parallel. Parallelism therefore uses worker
# processes, each building its own pipeline. With the LowMemory profile the
# memory mapped data file is shared between the processes by the operating
# system, so a large enterprise data file is not duplicated per worker.
# processes, each building its own pipeline. With the default MaxPerformance
# profile each worker loads the whole data file into its own memory, so the
# memory used grows with the number of workers. With -p LowMemory each worker
# reads the data file from disk as it needs it, and the operating system's
# file cache holds one copy for all the workers, so a large Enterprise data
# file is not held once per worker.
#
# Required PyPi Dependencies:
# - fiftyone_ipintelligence
Expand Down
Loading