Skip to content

Commit

Permalink
Fix AttributeError: 'int' object has no attribute 'item' (#1995)
Browse files Browse the repository at this point in the history
* Fixes an issue where an `int` is being returned in the DFP rolling window stage, likely caused by the recent update to the version of pandas being used.
* Update file paths to reflect the move of the `dfp_duo_pipeline.py`, `dfp_azure_pipeline.py` & `dfp_integrated_training_batch_pipeline.py` scripts
* Document installing the missing dependencies needed for the DFP Grafana example

Closes #1994

## 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:
  - David Gardner (https://github.com/dagardner-nv)

Approvers:
  - Michael Demoret (https://github.com/mdemoret-nv)
  - Anuradha Karuppiah (https://github.com/AnuradhaKaruppiah)

URL: #1995
  • Loading branch information
dagardner-nv authored Oct 28, 2024
1 parent 036d0b4 commit 4d84238
Show file tree
Hide file tree
Showing 25 changed files with 542 additions and 523 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ The reference architecture is composed of the following services:​
From the root of the Morpheus repo, run:
```bash
cd examples/digital_fingerprinting/production
export MORPHEUS_CONTAINER_VERSION="$(git describe --tags --abbrev=0)-runtime"
docker compose build
```

Expand Down
4 changes: 2 additions & 2 deletions examples/digital_fingerprinting/production/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ ENV MLFLOW_TRACKING_URI="http://mlflow:5000"
# If any changes have been made from the base image, recopy the sources
COPY . /workspace/examples/digital_fingerprinting/

# Set the workdir to be the morpheus folder
WORKDIR /workspace/examples/digital_fingerprinting/production/morpheus
# Set the workdir to be the production folder
WORKDIR /workspace/examples/digital_fingerprinting/production

# ===== Setup for running unattended =====
FROM base as runtime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ services:
TERM: "${TERM:-}"
DFP_CACHE_DIR: "/workspace/.cache/dfp"
DFP_TRACKING_URI: "http://mlflow:5000"
command: ./launch.sh --train_users=generic --duration=1d --start_time "2022-08-01" --input_file="../../../data/dfp/duo-training-data/*.json" --log_level INFO
command: ./launch.sh --train_users=generic --duration=1d --start_time "2022-08-01" --input_file="../../data/dfp/duo-training-data/*.json" --log_level INFO
volumes:
- ../../..:/workspace
depends_on:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,14 @@ When using the MRC SegmentModule in a pipeline, it will also require a module co

To ensure the [file_to_df_loader.py](../../../../../morpheus/loaders/file_to_df_loader.py) utilizes the same type of downloading mechanism, set `MORPHEUS_FILE_DOWNLOAD_TYPE` environment variable with any one of given choices (`dask`, `dask thread`, `single thread`).

```
```bash
export MORPHEUS_FILE_DOWNLOAD_TYPE=dask
```

Benchmarks for an individual workflow can be run from `examples/digital_fingerprinting/production/morpheus` in your container:

```
```bash
cd examples/digital_fingerprinting/production/morpheus
pytest -s --log-level=WARN --benchmark-enable --benchmark-warmup=on --benchmark-warmup-iterations=1 --benchmark-autosave benchmarks/test_bench_e2e_dfp_pipeline.py::<test-workflow>
```

Expand Down Expand Up @@ -128,12 +129,12 @@ The `--benchmark-warmup` and `--benchmark-warmup-iterations` options are used to
- `test_dfp_stages_duo_inference_e2e`

For example, to run E2E benchmarks on the DFP training (modules) workflow on the azure logs:
```
```bash
pytest -s --benchmark-enable --benchmark-warmup=on --benchmark-warmup-iterations=1 --benchmark-autosave benchmarks/test_bench_e2e_dfp_pipeline.py::test_dfp_modules_azure_payload_lti_e2e
```

To run E2E benchmarks on all workflows:
```
```bash
pytest -s --benchmark-enable --benchmark-warmup=on --benchmark-warmup-iterations=1 --benchmark-autosave benchmarks/test_bench_e2e_dfp_pipeline.py
```

Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
{
"inputs": [
{
"tasks": [
{
"type": "load",
"properties": {
"loader_id": "fsspec",
"files": [
"../../../data/dfp/azure-inference-data/*.json"
]
{
"tasks": [
{
"type": "load",
"properties": {
"loader_id": "fsspec",
"files": [
"../../data/dfp/azure-inference-data/*.json"
]
}
},
{
"type": "inference",
"properties": {}
}
],
"metadata": {
"data_type": "payload"
}
},
{
"type": "inference",
"properties": {
}
}
],
"metadata": {
"data_type": "payload"
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -1,46 +1,44 @@
{
"inputs": [
{
"tasks": [
{
"type": "load",
"properties": {
"loader_id": "fsspec",
"files": [
"../../../data/dfp/azure-training-data/*.json"
]
{
"tasks": [
{
"type": "load",
"properties": {
"loader_id": "fsspec",
"files": [
"../../data/dfp/azure-training-data/*.json"
]
}
},
{
"type": "training",
"properties": {}
}
],
"metadata": {
"data_type": "payload"
}
},
{
"type": "training",
"properties": {
},
{
"tasks": [
{
"type": "load",
"properties": {
"loader_id": "fsspec",
"files": [
"../../data/dfp/azure-inference-data/*.json"
]
}
},
{
"type": "inference",
"properties": {}
}
],
"metadata": {
"data_type": "payload"
}
}
],
"metadata": {
"data_type": "payload"
}
},
{
"tasks": [
{
"type": "load",
"properties": {
"loader_id": "fsspec",
"files": [
"../../../data/dfp/azure-inference-data/*.json"
]
}
},
{
"type": "inference",
"properties": {
}
}
],
"metadata": {
"data_type": "payload"
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
{
"inputs": [
{
"tasks": [
{
"type": "load",
"properties": {
"loader_id": "fsspec",
"files": [
"../../../data/dfp/azure-training-data/*.json"
]
{
"tasks": [
{
"type": "load",
"properties": {
"loader_id": "fsspec",
"files": [
"../../data/dfp/azure-training-data/*.json"
]
}
},
{
"type": "training",
"properties": {}
}
],
"metadata": {
"data_type": "payload"
}
},
{
"type": "training",
"properties": {
}
}
],
"metadata": {
"data_type": "payload"
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -1,58 +1,66 @@
{
"inputs": [
{
"tasks": [
{
"type": "load",
"properties": {
"loader_id": "fsspec",
"files": [
"../../../data/dfp/azure-training-data/*.json"
]
}
},
{
"type": "training",
"properties": {
}
}
],
"metadata": {
"data_type": "payload",
"batching_options": {"period": "M", "start_time": "2022-08-01", "end_time": "2022-08-31"},
"file_to_df_options":{
"parser_kwargs": {
"lines": false, "orient": "records"
{
"tasks": [
{
"type": "load",
"properties": {
"loader_id": "fsspec",
"files": [
"../../data/dfp/azure-training-data/*.json"
]
}
},
{
"type": "training",
"properties": {}
}
],
"metadata": {
"data_type": "payload",
"batching_options": {
"period": "M",
"start_time": "2022-08-01",
"end_time": "2022-08-31"
},
"file_to_df_options": {
"parser_kwargs": {
"lines": false,
"orient": "records"
}
}
}
}
},
{
"tasks": [
{
"type": "load",
"properties": {
"loader_id": "fsspec",
"files": [
"../../../data/dfp/azure-inference-data/*.json"
]
}
},
{
"type": "inference",
"properties": {
}
}
],
"metadata": {
"data_type": "payload",
"batching_options": {"period": "D", "start_time": "2022-08-01", "end_time": "2022-08-31"},
"file_to_df_options":{
"parser_kwargs": {
"lines": false, "orient": "records"
},
{
"tasks": [
{
"type": "load",
"properties": {
"loader_id": "fsspec",
"files": [
"../../data/dfp/azure-inference-data/*.json"
]
}
},
{
"type": "inference",
"properties": {}
}
}
],
"metadata": {
"data_type": "payload",
"batching_options": {
"period": "D",
"start_time": "2022-08-01",
"end_time": "2022-08-31"
},
"file_to_df_options": {
"parser_kwargs": {
"lines": false,
"orient": "records"
}
}
}
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
{
"inputs": [
{
"tasks": [
{
"type": "load",
"properties": {
"loader_id": "fsspec",
"files": [
"../../../data/dfp/azure-training-data/*.json"
]
{
"tasks": [
{
"type": "load",
"properties": {
"loader_id": "fsspec",
"files": [
"../../data/dfp/azure-training-data/*.json"
]
}
},
{
"type": "training",
"properties": {}
}
],
"metadata": {
"data_type": "payload"
}
},
{
"type": "training",
"properties": {
}
}
],
"metadata": {
"data_type": "payload"
}
}
]
}
}
Loading

0 comments on commit 4d84238

Please sign in to comment.