-
Notifications
You must be signed in to change notification settings - Fork 155
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
Ransomware production version #1176
base: branch-23.11
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -404,7 +404,7 @@ def get_merge_target(): | |
|
||
def determine_merge_commit(current_branch="HEAD"): | ||
""" | ||
When running outside of CI, this will estimate the target merge commit hash of `current_branch` by finding a common | ||
When running outside of CI, this will estimate the target merge commit hash of `current_branch` by finding a common2 | ||
ancester with the remote branch 'branch-{major}.{minor}' where {major} and {minor} are determined from the repo | ||
version. | ||
|
||
|
@@ -416,7 +416,7 @@ def determine_merge_commit(current_branch="HEAD"): | |
Returns | ||
------- | ||
str | ||
The common commit hash ID | ||
The common2 commit hash ID | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Find/replace error |
||
""" | ||
|
||
remote_branch = get_merge_target() | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ docker run --rm -ti --gpus=all -p8000:8000 -p8001:8001 -p8002:8002 -v $PWD/model | |
tritonserver --model-repository=/models/triton-model-repo \ | ||
--exit-on-error=false \ | ||
--model-control-mode=explicit \ | ||
--load-model ransomw-model-short-rf | ||
--load-model ransomware_model_tl | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All of our models use hyphens instead of underscores. Can you rename the model |
||
``` | ||
|
||
##### Verify Model Deployment | ||
|
@@ -53,7 +53,7 @@ Once Triton server finishes starting up, it will display the status of all loade | |
+----------------------------+---------+--------+ | ||
| Model | Version | Status | | ||
+----------------------------+---------+--------+ | ||
| ransomw-model-short-rf | 1 | READY | | ||
| ransomware_model_tl | 1 | READY | | ||
+----------------------------+---------+--------+ | ||
``` | ||
|
||
|
@@ -72,10 +72,12 @@ Run the following from the `examples/ransomware_detection` directory to start th | |
```bash | ||
python run.py --server_url=localhost:8001 \ | ||
--sliding_window=3 \ | ||
--model_name=ransomw-model-short-rf \ | ||
--model_name=ransomware_model_tl \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we include some high-level information about the model, including details about the dataset used for training? Additionally, it would be greatly beneficial to explain how to generate the dataset for training the models or specify the required data for running the inference pipeline. Would be valuable to create a notebook that demonstrates how to train the model using a sample dataset and run it through the pipeline to showcase its ransomware capabilities. Providing an explanation of the output structure generated by the pipeline would greatly enhance the comprehensibility of the documentation. Adding this information to the documentation would be much appreciated. |
||
--conf_file=./config/ransomware_detection.yaml \ | ||
--input_glob=${MORPHEUS_ROOT}/examples/data/appshield/*/snapshot-*/*.json \ | ||
--output_file=./ransomware_detection_output.jsonlines | ||
--input_topic=ransomware_input \ | ||
--output_topic=ransomware_output \ | ||
--bootstrap_servers broker:9092 \ | ||
--group_id ransomware_group | ||
``` | ||
|
||
Input features for a short model can be taken from every three snapshots sequence, such as (1, 2, 3), or (2, 3, 4). The sliding window represents the number of subsequent snapshots that need to be taken into consideration when generating the input for a model. Sliding window for the medium model is `5` and for the long model it is `10`. | ||
|
@@ -108,20 +110,13 @@ Options: | |
--server_url TEXT Tritonserver url [required] | ||
--sliding_window INTEGER RANGE Sliding window to be used for model input | ||
request [x>=1] | ||
--input_glob TEXT Input glob pattern to match files to read. | ||
--input_topic TEXT Input Kafka topic for receiving the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you remove Dask related options? |
||
data [required] | ||
--output_topic TEXT Output Kafka topic for receiving the | ||
data [required] | ||
--bootstrap_servers TEXT Kafka bootstrap server [required] | ||
For example, | ||
'./input_dir/*/snapshot-*/*.json' would read | ||
all files with the 'json' extension in the | ||
directory 'input_dir'. [required] | ||
--watch_directory BOOLEAN The watch directory option instructs this | ||
stage to not close down once all files have | ||
been read. Instead it will read all files | ||
that match the 'input_glob' pattern, and | ||
then continue to watch the directory for | ||
additional files. Any new files that are | ||
added that match the glob will then be | ||
processed. | ||
--output_file TEXT The path to the file where the inference | ||
output will be saved. | ||
broker:9092 | ||
--group_id TEXT Kafka group_id topic [required] | ||
--help Show this message and exit. | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +0,0 @@ | ||
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
Comment on lines
-1
to
-14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why was this copyright removed? |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Find/replace error