From e136ab207c1c245e582a9f3b92dba73ca665d372 Mon Sep 17 00:00:00 2001 From: Eli Fajardo Date: Wed, 29 May 2024 15:37:30 -0400 Subject: [PATCH] Fix description for `cache_mode` option of DFP Rolling Window module (#1707) - Fix description for `cache_mode` option of DFP Rolling Window module. It was using description for `fallback_username` in multiple places. Closes #1696 ## By Submitting this PR I confirm: - I am familiar with the [Contributing Guidelines](https://github.com/nv-morpheus/Morpheus/blob/main/docs/source/developer_guide/contributing.md). - When the PR is ready for review, new or existing tests cover these changes. - When the PR is ready for review, the documentation is up to date with these changes. Authors: - Eli Fajardo (https://github.com/efajardo-nv) Approvers: - Michael Demoret (https://github.com/mdemoret-nv) URL: https://github.com/nv-morpheus/Morpheus/pull/1707 --- .../modules/examples/digital_fingerprinting/dfp_deployment.md | 2 +- .../examples/digital_fingerprinting/dfp_inference_pipe.md | 4 ++-- .../examples/digital_fingerprinting/dfp_rolling_window.md | 2 +- .../examples/digital_fingerprinting/dfp_training_pipe.md | 2 +- .../production/morpheus/dfp/modules/dfp_deployment.py | 3 ++- .../production/morpheus/dfp/modules/dfp_inference_pipe.py | 3 ++- .../production/morpheus/dfp/modules/dfp_rolling_window.py | 3 ++- .../production/morpheus/dfp/modules/dfp_training_pipe.py | 3 ++- .../production/morpheus/dfp/utils/config_generator.py | 4 ++-- .../morpheus/notebooks/dfp_azure_integrated_training.ipynb | 2 +- .../morpheus/notebooks/dfp_duo_integrated_training.ipynb | 2 +- 11 files changed, 17 insertions(+), 13 deletions(-) diff --git a/docs/source/modules/examples/digital_fingerprinting/dfp_deployment.md b/docs/source/modules/examples/digital_fingerprinting/dfp_deployment.md index e63d791e54..ad094ee81a 100644 --- a/docs/source/modules/examples/digital_fingerprinting/dfp_deployment.md +++ b/docs/source/modules/examples/digital_fingerprinting/dfp_deployment.md @@ -102,7 +102,7 @@ This module function sets up modular Digital Fingerprinting Pipeline instance. | Parameter | Type | Description | Example Value | Default Value | |-------------------------|--------|-------------------------------------------------------------|---------------|---------------| -| `cache_mode` | string | The user ID to use if the user ID is not found | "batch" | `batch` | +| `cache_mode` | string | Mode for managing user cache. Setting to `batch` flushes cache once trigger conditions are met. Otherwise, continue to aggregate user's history. | "batch" | `batch` | | `min_history` | int | Minimum history to trigger a new training event | 1 | `1` | | `max_history` | int | Maximum history to include in a new training event | 0 | `0` | | `timestamp_column_name` | string | Name of the column containing timestamps | "timestamp" | `timestamp` | diff --git a/docs/source/modules/examples/digital_fingerprinting/dfp_inference_pipe.md b/docs/source/modules/examples/digital_fingerprinting/dfp_inference_pipe.md index 5827b0a40d..b13fc42b10 100644 --- a/docs/source/modules/examples/digital_fingerprinting/dfp_inference_pipe.md +++ b/docs/source/modules/examples/digital_fingerprinting/dfp_inference_pipe.md @@ -60,7 +60,7 @@ into a single module. | Parameter | Type | Description | Example Value | Default Value | |-------------------------|--------|-------------------------------------------------------------|---------------|---------------| -| `cache_mode` | string | The user ID to use if the user ID is not found | "batch" | `batch` | +| `cache_mode` | string | Mode for managing user cache. Setting to `batch` flushes cache once trigger conditions are met. Otherwise, continue to aggregate user's history. | "batch" | `batch` | | `min_history` | int | Minimum history to trigger a new training event | 1 | `1` | | `max_history` | int | Maximum history to include in a new training event | 0 | `0` | | `timestamp_column_name` | string | Name of the column containing timestamps | "timestamp" | `timestamp` | @@ -105,7 +105,7 @@ into a single module. }, "stream_aggregation_options": { "timestamp_column_name": "timestamp", - "cache_mode": "MEMORY", + "cache_mode": "batch", "trigger_on_min_history": true, "aggregation_span": "1D", "trigger_on_min_increment": true, diff --git a/docs/source/modules/examples/digital_fingerprinting/dfp_rolling_window.md b/docs/source/modules/examples/digital_fingerprinting/dfp_rolling_window.md index b6b8c068f2..7104937956 100644 --- a/docs/source/modules/examples/digital_fingerprinting/dfp_rolling_window.md +++ b/docs/source/modules/examples/digital_fingerprinting/dfp_rolling_window.md @@ -23,7 +23,7 @@ This module is responsible for maintaining a rolling window of historical data, | Parameter | Type | Description | Example Value | Default Value | |--------------------------|--------|--------------------------------------------------------------|---------------|---------------| -| cache_mode | string | The user ID to use if the user ID is not found | "batch" | "batch" | +| cache_mode | string | Mode for managing user cache. Setting to `batch` flushes cache once trigger conditions are met. Otherwise, continue to aggregate user's history. | "batch" | "batch" | | trigger_on_min_history | int | Minimum history to trigger a new training event | 1 | 1 | | trigger_on_min_increment | int | Minmum increment from the last trained to new training event | 0 | 0 | | timestamp_column_name | string | Name of the column containing timestamps | "timestamp" | "timestamp" | diff --git a/docs/source/modules/examples/digital_fingerprinting/dfp_training_pipe.md b/docs/source/modules/examples/digital_fingerprinting/dfp_training_pipe.md index 388f2851ea..c1a9699886 100644 --- a/docs/source/modules/examples/digital_fingerprinting/dfp_training_pipe.md +++ b/docs/source/modules/examples/digital_fingerprinting/dfp_training_pipe.md @@ -59,7 +59,7 @@ This module function consolidates multiple DFP pipeline modules relevant to the | Key | Type | Description | Example Value | Default Value | |-------------------------|--------|-------------------------------------------------------------|---------------|---------------| -| `cache_mode` | string | The user ID to use if the user ID is not found | "batch" | `batch` | +| `cache_mode` | string | Mode for managing user cache. Setting to `batch` flushes cache once trigger conditions are met. Otherwise, continue to aggregate user's history. | "batch" | `batch` | | `min_history` | int | Minimum history to trigger a new training event | 1 | `1` | | `max_history` | int | Maximum history to include in a new training event | 0 | `0` | | `timestamp_column_name` | string | Name of the column containing timestamps | 'timestamp' | `timestamp` | diff --git a/examples/digital_fingerprinting/production/morpheus/dfp/modules/dfp_deployment.py b/examples/digital_fingerprinting/production/morpheus/dfp/modules/dfp_deployment.py index 9ac3061b6b..e4744c32b6 100644 --- a/examples/digital_fingerprinting/production/morpheus/dfp/modules/dfp_deployment.py +++ b/examples/digital_fingerprinting/production/morpheus/dfp/modules/dfp_deployment.py @@ -98,7 +98,8 @@ def dfp_deployment(builder: mrc.Builder): - timestamp_column_name (str): Name of the timestamp column; Example: `timestamp`; Default: timestamp stream_aggregation_options: - - cache_mode (str): The user ID to use if the user ID is not found; Example: 'batch'; Default: 'batch' + - cache_mode (str): Mode for managing user cache. Setting to `batch` flushes cache once trigger conditions are + met. Otherwise, continue to aggregate user's history.; Example: 'batch'; Default: 'batch' - trigger_on_min_history (int): Minimum history to trigger a new training event; Example: 1; Default: 1 - trigger_on_min_increment (int): Minmum increment from the last trained to new training event; Example: 0; Default: 0 diff --git a/examples/digital_fingerprinting/production/morpheus/dfp/modules/dfp_inference_pipe.py b/examples/digital_fingerprinting/production/morpheus/dfp/modules/dfp_inference_pipe.py index b5dbbcf09c..24f72c278a 100644 --- a/examples/digital_fingerprinting/production/morpheus/dfp/modules/dfp_inference_pipe.py +++ b/examples/digital_fingerprinting/production/morpheus/dfp/modules/dfp_inference_pipe.py @@ -94,7 +94,8 @@ def dfp_inference_pipe(builder: mrc.Builder): - timestamp_column_name (str): Name of the timestamp column; Example: "timestamp"; Default: timestamp stream_aggregation_options: - - cache_mode (str): The user ID to use if the user ID is not found; Example: 'batch'; Default: 'batch' + - cache_mode (str): Mode for managing user cache. Setting to `batch` flushes cache once trigger conditions + are met. Otherwise, continue to aggregate user's history.; Example: 'batch'; Default: 'batch' - trigger_on_min_history (int): Minimum history to trigger a new training event; Example: 1; Default: 1 - trigger_on_min_increment (int): Minimum increment from the last trained to new training event; Example: 0; Default: 0 diff --git a/examples/digital_fingerprinting/production/morpheus/dfp/modules/dfp_rolling_window.py b/examples/digital_fingerprinting/production/morpheus/dfp/modules/dfp_rolling_window.py index c815f0e7f1..54a793b253 100644 --- a/examples/digital_fingerprinting/production/morpheus/dfp/modules/dfp_rolling_window.py +++ b/examples/digital_fingerprinting/production/morpheus/dfp/modules/dfp_rolling_window.py @@ -48,7 +48,8 @@ def dfp_rolling_window(builder: mrc.Builder): Notes ----- Configurable parameters: - - cache_mode (str): The user ID to use if the user ID is not found; Example: 'batch'; Default: 'batch' + - cache_mode (str): Mode for managing user cache. Setting to `batch` flushes cache once trigger conditions are + met. Otherwise, continue to aggregate user's history.; Example: 'batch'; Default: 'batch' - trigger_on_min_history (int): Minimum history to trigger a new training event; Example: 1; Default: 1 - trigger_on_min_increment (int): Minmum increment from the last trained to new training event; Example: 0; Default: 0 diff --git a/examples/digital_fingerprinting/production/morpheus/dfp/modules/dfp_training_pipe.py b/examples/digital_fingerprinting/production/morpheus/dfp/modules/dfp_training_pipe.py index a3fd39edf4..9fcbd946af 100644 --- a/examples/digital_fingerprinting/production/morpheus/dfp/modules/dfp_training_pipe.py +++ b/examples/digital_fingerprinting/production/morpheus/dfp/modules/dfp_training_pipe.py @@ -87,7 +87,8 @@ def dfp_training_pipe(builder: mrc.Builder): - timestamp_column_name (str): Name of the timestamp column; Example: `timestamp`; Default: timestamp stream_aggregation_options: - - cache_mode (str): The user ID to use if the user ID is not found; Example: 'batch'; Default: 'batch' + - cache_mode (str): Mode for managing user cache. Setting to `batch` flushes cache once trigger conditions + are met. Otherwise, continue to aggregate user's history.; Example: 'batch'; Default: 'batch' - trigger_on_min_history (int): Minimum history to trigger a new training event; Example: 1; Default: 1 - trigger_on_min_increment (int): Minimum increment from the last trained to new training event; Example: 0; Default: 0 diff --git a/examples/digital_fingerprinting/production/morpheus/dfp/utils/config_generator.py b/examples/digital_fingerprinting/production/morpheus/dfp/utils/config_generator.py index 74befdbb51..daeb21ac21 100644 --- a/examples/digital_fingerprinting/production/morpheus/dfp/utils/config_generator.py +++ b/examples/digital_fingerprinting/production/morpheus/dfp/utils/config_generator.py @@ -84,7 +84,7 @@ def infer_module_conf(self): "stream_aggregation_options": { "aggregation_span": "1d", "cache_to_disk": False, - "cache_mode": "streaming", + "cache_mode": "batch", }, "preprocessing_options": { "schema": { @@ -139,7 +139,7 @@ def train_module_conf(self): "stream_aggregation_options": { "aggregation_span": "60d", "cache_to_disk": False, - "cache_mode": "streaming", + "cache_mode": "aggregate", "trigger_on_min_history": 300, "trigger_on_min_increment": 300 }, diff --git a/examples/digital_fingerprinting/production/morpheus/notebooks/dfp_azure_integrated_training.ipynb b/examples/digital_fingerprinting/production/morpheus/notebooks/dfp_azure_integrated_training.ipynb index 40e6f6fd9c..1d77c364d9 100644 --- a/examples/digital_fingerprinting/production/morpheus/notebooks/dfp_azure_integrated_training.ipynb +++ b/examples/digital_fingerprinting/production/morpheus/notebooks/dfp_azure_integrated_training.ipynb @@ -309,7 +309,7 @@ "\n", "| Parameter | Type | Description | Example Value | Default Value |\n", "|-------------------------|--------|-------------------------------------------------------------|---------------|---------------|\n", - "| `cache_mode` | string | The user ID to use if the user ID is not found | \"batch\" | `batch` |\n", + "| `cache_mode` | string | Mode for managing user cache. Setting to `batch` flushes cache once trigger conditions are met. Otherwise, continue to aggregate user's history. | \"batch\" | `batch` |\n", "| `min_history` | int | Minimum history to trigger a new training event | 1 | `1` |\n", "| `max_history` | int | Maximum history to include in a new training event | 0 | `0` |\n", "| `timestamp_column_name` | string | Name of the column containing timestamps | \"timestamp\" | `timestamp` |\n", diff --git a/examples/digital_fingerprinting/production/morpheus/notebooks/dfp_duo_integrated_training.ipynb b/examples/digital_fingerprinting/production/morpheus/notebooks/dfp_duo_integrated_training.ipynb index b87f57356c..16fff565cc 100644 --- a/examples/digital_fingerprinting/production/morpheus/notebooks/dfp_duo_integrated_training.ipynb +++ b/examples/digital_fingerprinting/production/morpheus/notebooks/dfp_duo_integrated_training.ipynb @@ -311,7 +311,7 @@ "\n", "| Parameter | Type | Description | Example Value | Default Value |\n", "|-------------------------|--------|-------------------------------------------------------------|---------------|---------------|\n", - "| `cache_mode` | string | The user ID to use if the user ID is not found | \"batch\" | `batch` |\n", + "| `cache_mode` | string | Mode for managing user cache. Setting to `batch` flushes cache once trigger conditions are met. Otherwise, continue to aggregate user's history. | \"batch\" | `batch` |\n", "| `min_history` | int | Minimum history to trigger a new training event | 1 | `1` |\n", "| `max_history` | int | Maximum history to include in a new training event | 0 | `0` |\n", "| `timestamp_column_name` | string | Name of the column containing timestamps | \"timestamp\" | `timestamp` |\n",