Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing support for MultiMessage from stages #1803

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
ba506fa
Remove MultiMessage from AddScoresStage
yczhang-nv Jul 8, 2024
bb18d7e
Remove MultiMessage from AddScoresStage python impl & reformatting
yczhang-nv Jul 8, 2024
6500db8
fix test errors
yczhang-nv Jul 9, 2024
6402965
remove from preprocess_nlp cpp impl
yczhang-nv Jul 9, 2024
7a53076
remove from preprocess_nlp python impl
yczhang-nv Jul 9, 2024
f4f97bd
remove from preprocess_fil cpp impl
yczhang-nv Jul 9, 2024
9e8b2c5
remove from preprocess_fil python impl
yczhang-nv Jul 9, 2024
0bbadbc
remove from preprocess_ae impl
yczhang-nv Jul 9, 2024
a960468
remove from serialize stage impl
yczhang-nv Jul 9, 2024
5c45b62
remove from filter_detections impl
yczhang-nv Jul 9, 2024
6ea61b8
remove from filter_detections_controller
yczhang-nv Jul 10, 2024
81ccd6e
remove from generate_viz_frames
yczhang-nv Jul 10, 2024
fecd7e0
remove from mlflow_drift_stage
yczhang-nv Jul 10, 2024
4a572c9
remove from timeseries stage
yczhang-nv Jul 10, 2024
3e3ad14
remove from validation stage
yczhang-nv Jul 10, 2024
fa3d971
update deserialize stage
yczhang-nv Jul 10, 2024
30a76a2
fix some unit tests
yczhang-nv Jul 11, 2024
6629139
fix unit tests
yczhang-nv Jul 12, 2024
746530c
fix inference
yczhang-nv Jul 12, 2024
f0dbfc0
update fil stage
yczhang-nv Jul 15, 2024
46217dc
rollback to test triton_inference_stage
yczhang-nv Jul 15, 2024
72171fa
test cm for test_inference_stage
yczhang-nv Jul 15, 2024
3753707
passed test_triton_inference_stage
yczhang-nv Jul 17, 2024
b6509f0
fix
yczhang-nv Jul 17, 2024
bddaf5f
debugging test_dfp.py
yczhang-nv Jul 19, 2024
cc945c7
fix test_dfp.py
yczhang-nv Jul 22, 2024
b436176
fix test_phishing.py
yczhang-nv Jul 22, 2024
83e8367
Merge remote-tracking branch 'upstream/branch-24.10' into verify-and-…
yczhang-nv Jul 22, 2024
9ca9320
fix test
yczhang-nv Jul 22, 2024
55c75a6
remove some multimessage branches
yczhang-nv Jul 23, 2024
90ab421
fix ci
yczhang-nv Jul 23, 2024
94e4639
fix ci
yczhang-nv Jul 24, 2024
aa00fbb
fix naming
yczhang-nv Jul 25, 2024
e77a50a
fix ci
yczhang-nv Jul 25, 2024
d8b60d6
Merge branch 'branch-24.10' into complete-remove-multi-message
yczhang-nv Jul 25, 2024
4581346
fix CI
yczhang-nv Jul 26, 2024
8cd1a7d
fix CI
yczhang-nv Jul 26, 2024
66013af
fix CI
yczhang-nv Jul 26, 2024
554856c
test gpg
yczhang-nv Jul 29, 2024
dfff798
test gpg sign
yczhang-nv Jul 29, 2024
5940311
test gpg
yczhang-nv Jul 29, 2024
5b890d2
test gpg
yczhang-nv Jul 29, 2024
9977a6a
gix abp_pcap_detection
yczhang-nv Jul 29, 2024
9351310
Finalize CI
yczhang-nv Jul 29, 2024
10a01ff
rollback
yczhang-nv Jul 29, 2024
db17566
Merge remote-tracking branch 'upstream/branch-24.10' into complete-re…
yczhang-nv Aug 13, 2024
8d9ecf4
fix python checks
yczhang-nv Aug 13, 2024
fa816ff
fix typo
yczhang-nv Aug 13, 2024
5927b62
Merge remote-tracking branch 'upstream/branch-24.10' into complete-re…
yczhang-nv Aug 14, 2024
95725c8
fix ci
yczhang-nv Aug 14, 2024
c4b1cdf
Merge branch 'branch-24.10' into complete-remove-multi-message
yczhang-nv Aug 14, 2024
c596520
Merge branch 'branch-24.10' into complete-remove-multi-message
yczhang-nv Aug 15, 2024
24c3af0
Merge remote-tracking branch 'upstream/branch-24.10' into complete-re…
yczhang-nv Aug 27, 2024
d3e1b45
support casting TensorObject from Python to C++ for ControlMessage
yczhang-nv Aug 28, 2024
371f001
add overload to TensorObject
yczhang-nv Aug 28, 2024
ac94065
Update comment
yczhang-nv Aug 28, 2024
efd9937
Update comments
yczhang-nv Aug 28, 2024
dd0e0a0
Merge branch 'cast-python-tensor-memory-to-cpp-for-control-message' i…
yczhang-nv Aug 28, 2024
4218d74
fix comments
yczhang-nv Aug 29, 2024
08fb90e
fix comments
yczhang-nv Aug 29, 2024
41e9e2f
fic CI format
yczhang-nv Aug 29, 2024
b811206
fix format
yczhang-nv Aug 29, 2024
c2bf5d3
fix CI
yczhang-nv Aug 29, 2024
8033055
Fix CI
yczhang-nv Aug 29, 2024
f4be468
fix CI
yczhang-nv Aug 29, 2024
809bbb5
revert changes that break the build
yczhang-nv Aug 29, 2024
9c03ee9
fix CI
yczhang-nv Aug 29, 2024
66922a7
fix CI
yczhang-nv Aug 29, 2024
f5c16b0
Merge remote-tracking branch 'upstream/branch-24.10' into cast-python…
yczhang-nv Sep 6, 2024
dddd3c8
fix CI
yczhang-nv Sep 6, 2024
c4a7095
Merge remote-tracking branch 'upstream/branch-24.10' into complete-re…
yczhang-nv Sep 6, 2024
9f30383
revert format
yczhang-nv Sep 6, 2024
38e8f9c
Merge remote-tracking branch 'origin/cast-python-tensor-memory-to-cpp…
yczhang-nv Sep 6, 2024
32ec933
fix CI
yczhang-nv Sep 6, 2024
f43f10a
try to minimize CI errors
yczhang-nv Sep 6, 2024
c74f51f
Update ransomware pipeline to use ControlMessage
yczhang-nv Sep 6, 2024
0876026
Merge branch 'branch-24.10' into complete-remove-multi-message
yczhang-nv Sep 6, 2024
9ed5e32
Merge branch 'complete-remove-multi-message' of github.com:yczhang-nv…
yczhang-nv Sep 6, 2024
ae33cab
remove comments
yczhang-nv Sep 6, 2024
84d179d
fix CI
yczhang-nv Sep 6, 2024
b33e128
fix format
yczhang-nv Sep 6, 2024
1776efc
Merge branch 'branch-24.10' into complete-remove-multi-message
yczhang-nv Sep 7, 2024
a848845
fix doc
yczhang-nv Sep 9, 2024
4115cc9
fix merge conflict
yczhang-nv Sep 9, 2024
8201199
Revert "Merge remote-tracking branch 'origin/cast-python-tensor-memor…
yczhang-nv Sep 9, 2024
0dc0947
Revert "fic CI format"
yczhang-nv Sep 9, 2024
6656224
Revert "support casting TensorObject from Python to C++ for ControlMe…
yczhang-nv Sep 9, 2024
21e3d2f
fix revert error
yczhang-nv Sep 9, 2024
2023469
fix CI
yczhang-nv Sep 9, 2024
adbc5ca
fix CI
yczhang-nv Sep 9, 2024
6d65a6d
TensorMemory
yczhang-nv Sep 10, 2024
7d8a64b
Cleanup during review
mdemoret-nv Sep 10, 2024
8b0833d
Fixing formatting on pyi files
mdemoret-nv Sep 10, 2024
9a975c1
fix header and formatting issue
yczhang-nv Sep 10, 2024
91474a3
fix docstring
yczhang-nv Sep 10, 2024
ecb6766
fix CI
yczhang-nv Sep 11, 2024
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
Prev Previous commit
Next Next commit
Fix CI
  • Loading branch information
yczhang-nv committed Aug 29, 2024
commit 803305592f8f625ea6fd3286763042613ec1c992
4 changes: 1 addition & 3 deletions examples/llm/agents/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from langchain.llms.openai import OpenAI

from morpheus.config import Config
from morpheus.messages import ControlMessage
from morpheus.pipeline.linear_pipeline import LinearPipeline
from morpheus.stages.general.monitor_stage import MonitorStage
from morpheus.stages.output.in_memory_sink_stage import InMemorySinkStage
Expand Down Expand Up @@ -67,8 +66,7 @@ def build_common_pipeline(config: Config, pipe: LinearPipeline, task_payload: di
Construct the elements of the pipeline common to the simple and kafka agent pipelines.
This method should be called after the source stage has been set.
"""
pipe.add_stage(
DeserializeStage(config, message_type=ControlMessage, task_type="llm_engine", task_payload=task_payload))
pipe.add_stage(DeserializeStage(config, task_type="llm_engine", task_payload=task_payload))

pipe.add_stage(MonitorStage(config, description="Source rate", unit='questions'))

Expand Down
4 changes: 1 addition & 3 deletions examples/llm/completion/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from morpheus.config import Config
from morpheus.config import PipelineModes
from morpheus.io.deserializers import read_file_to_df
from morpheus.messages import ControlMessage
from morpheus.pipeline.linear_pipeline import LinearPipeline
from morpheus.stages.general.monitor_stage import MonitorStage
from morpheus.stages.input.in_memory_source_stage import InMemorySourceStage
Expand Down Expand Up @@ -116,8 +115,7 @@ def pipeline(num_threads: int,

pipe.set_source(InMemorySourceStage(config, dataframes=[source_df], repeat=repeat_count))

pipe.add_stage(
DeserializeStage(config, message_type=ControlMessage, task_type="llm_engine", task_payload=completion_task))
pipe.add_stage(DeserializeStage(config, task_type="llm_engine", task_payload=completion_task))

pipe.add_stage(MonitorStage(config, description="Source rate", unit='questions'))

Expand Down
4 changes: 1 addition & 3 deletions examples/llm/rag/standalone_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

from morpheus.config import Config
from morpheus.config import PipelineModes
from morpheus.messages import ControlMessage
from morpheus.pipeline.linear_pipeline import LinearPipeline
from morpheus.stages.general.monitor_stage import MonitorStage
from morpheus.stages.input.in_memory_source_stage import InMemorySourceStage
Expand Down Expand Up @@ -114,8 +113,7 @@ def standalone(num_threads,

pipe.set_source(InMemorySourceStage(config, dataframes=source_dfs, repeat=repeat_count))

pipe.add_stage(
DeserializeStage(config, message_type=ControlMessage, task_type="llm_engine", task_payload=completion_task))
pipe.add_stage(DeserializeStage(config, task_type="llm_engine", task_payload=completion_task))

pipe.add_stage(MonitorStage(config, description="Source rate", unit='questions'))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include "morpheus/export.h" // for MORPHEUS_EXPORT
#include "morpheus/messages/meta.hpp" // for MessageMeta
#include "morpheus/types.hpp" // for TensorIndex
#include "morpheus/utilities/json_types.hpp" // for json_t

#include <pybind11/pytypes.h> // for object, dict, list
Expand Down
4 changes: 2 additions & 2 deletions python/morpheus/morpheus/_lib/messages/module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@
#include "morpheus/objects/data_table.hpp"
#include "morpheus/objects/mutable_table_ctx_mgr.hpp"
#include "morpheus/pybind11/json.hpp" // IWYU pragma: keep
#include "morpheus/types.hpp" // for TensorIndex
#include "morpheus/utilities/cudf_util.hpp"
#include "morpheus/utilities/json_types.hpp" // for json_t
#include "morpheus/utilities/string_util.hpp"
#include "morpheus/version.hpp"

#include <glog/logging.h> // for COMPACT_GOOGLE_LOG_INFO, LogMessage, VLOG
#include <mrc/edge/edge_connector.hpp>
#include <nlohmann/json.hpp> // for basic_json
#include <pybind11/detail/common.h>
#include <nlohmann/json.hpp> // for basic_json
#include <pybind11/functional.h> // IWYU pragma: keep
#include <pybind11/pybind11.h>
#include <pybind11/pytypes.h>
Expand Down
1 change: 1 addition & 0 deletions python/morpheus/morpheus/_lib/src/io/data_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "morpheus/io/data_loader.hpp"

#include "morpheus/messages/control.hpp"
#include "morpheus/utilities/json_types.hpp" // for PythonByteContainer

#include <glog/logging.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "morpheus/io/loaders/file.hpp"
#include "morpheus/io/loaders/payload.hpp"
#include "morpheus/messages/control.hpp"
#include "morpheus/utilities/json_types.hpp" // for PythonByteContainer

#include <gtest/gtest.h>
#include <nlohmann/json.hpp>
Expand Down
2 changes: 2 additions & 0 deletions python/morpheus/morpheus/messages/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
from morpheus.messages.memory.response_memory import ResponseMemoryProbs
from morpheus.messages.message_base import MessageBase
from morpheus.messages.message_meta import MessageMeta
from morpheus.messages.multi_message import MultiMessage
from morpheus.messages.message_meta import UserMessageMeta

__all__ = [
Expand All @@ -42,6 +43,7 @@
"InferenceMemoryNLP",
"MessageBase",
"MessageMeta",
"MultiMessage",
"RawPacketMessage",
"ResponseMemory",
"ResponseMemoryAE",
Expand Down
2 changes: 0 additions & 2 deletions python/morpheus/morpheus/utils/concat_df.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import typing

import pandas as pd

import cudf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
#include "morpheus_llm/llm/llm_task_handler_runner.hpp" // for LLMTaskHandlerRunner
#include "morpheus_llm/llm/utils.hpp"

#include "morpheus/messages/control.hpp" // for ControlMessage
#include "morpheus/messages/control.hpp" // for ControlMessage
#include "morpheus/utilities/json_types.hpp" // for PythonByteContainer

#include <mrc/coroutines/task.hpp> // IWYU pragma: keep
#include <nlohmann/json.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "morpheus/_lib/tests/test_utils/common.hpp" // IWYU pragma: associated
#include "morpheus/messages/control.hpp" // for ControlMessage
#include "morpheus/types.hpp"
#include "morpheus/utilities/json_types.hpp" // for PythonByteContainer

#include <gtest/gtest.h>
#include <mrc/channel/forward.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

#include "morpheus_llm/llm/fwd.hpp" // for morpheus
#include "morpheus_llm/llm/input_map.hpp"
#include "morpheus_llm/llm/utils.hpp"

Expand Down
1 change: 0 additions & 1 deletion tests/benchmarks/test_bench_agents_simple_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import cudf

from morpheus.config import Config
from morpheus.messages import ControlMessage
from morpheus.pipeline.linear_pipeline import LinearPipeline
from morpheus.stages.input.in_memory_source_stage import InMemorySourceStage
from morpheus.stages.output.in_memory_sink_stage import InMemorySinkStage
Expand Down
1 change: 0 additions & 1 deletion tests/benchmarks/test_bench_completion_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

from _utils.dataset_manager import DatasetManager
from morpheus.config import Config
from morpheus.messages import ControlMessage
from morpheus.pipeline.linear_pipeline import LinearPipeline
from morpheus.stages.input.in_memory_source_stage import InMemorySourceStage
from morpheus.stages.output.in_memory_sink_stage import InMemorySinkStage
Expand Down
1 change: 0 additions & 1 deletion tests/benchmarks/test_bench_rag_standalone_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
from _utils.milvus import populate_milvus
from morpheus.config import Config
from morpheus.config import PipelineModes
from morpheus.messages import ControlMessage
from morpheus.pipeline.linear_pipeline import LinearPipeline
from morpheus.stages.input.in_memory_source_stage import InMemorySourceStage
from morpheus.stages.output.in_memory_sink_stage import InMemorySinkStage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
from _utils import TEST_DIRS
from _utils.dataset_manager import DatasetManager
from morpheus.config import Config
from morpheus.messages import MultiMessage
from morpheus.messages.message_meta import AppShieldMessageMeta
from morpheus.pipeline.control_message_stage import ControlMessageStage
from morpheus.stages.input.appshield_source_stage import AppShieldSourceStage
Expand Down Expand Up @@ -174,7 +173,7 @@ def test_create_multi_messages(self,

prev_loc = 0
for (i, _multi_message) in enumerate(multi_messages):
assert isinstance(_multi_message, MultiMessage)
assert isinstance(_multi_message)
pid = pids[i]
(_multi_message.get_meta(['pid_process']) == pid).all()
assert _multi_message.mess_offset == prev_loc
Expand Down
3 changes: 1 addition & 2 deletions tests/pipeline/test_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
from morpheus.config import Config
from morpheus.messages import ControlMessage
from morpheus.messages import MessageMeta
from morpheus.messages import MultiMessage
from morpheus.pipeline import LinearPipeline
from morpheus.pipeline import Pipeline
from morpheus.stages.boundary.linear_boundary_stage import LinearBoundaryEgressStage
Expand Down Expand Up @@ -226,7 +225,7 @@ def test_add_edge_input_port_errors(config: Config, num_inputs: int):
pipe.add_edge(start_stage.output_ports[0], end_stage)


@pytest.mark.parametrize("data_type", [int, float, str, MessageMeta, ControlMessage, MultiMessage])
@pytest.mark.parametrize("data_type", [int, float, str, MessageMeta, ControlMessage])
def test_add_segment_edge(config: Config, data_type: type):
pipe = Pipeline(config)

Expand Down
1 change: 0 additions & 1 deletion tests/stages/test_generate_viz_frames_stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import cudf

import morpheus._lib.messages as _messages
from morpheus.config import Config
from morpheus.messages import ControlMessage
from morpheus.messages import MessageMeta
Expand Down
1 change: 0 additions & 1 deletion tests/stages/test_ml_flow_drift_stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import pytest
import typing_utils

import morpheus._lib.messages as _messages
from morpheus.messages import ControlMessage
from morpheus.messages.message_meta import MessageMeta
from morpheus.stages.postprocess.ml_flow_drift_stage import MLFlowDriftStage
Expand Down
2 changes: 1 addition & 1 deletion tests/test_add_scores_stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@

import cudf

import morpheus._lib.messages as _messages
from _utils.dataset_manager import DatasetManager
from morpheus.config import Config
from morpheus.messages import ControlMessage
from morpheus.messages import TensorMemory
from morpheus.messages.message_meta import MessageMeta
from morpheus.stages.postprocess.add_classifications_stage import AddClassificationsStage
from morpheus.stages.postprocess.add_scores_stage import AddScoresStage
Expand Down
Loading