Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
ac9f552
Update training
stefanDeveloper May 5, 2025
f3ce895
Adjust plotting
stefanDeveloper May 5, 2025
9d4395c
Add scale pos for unbalanced ds
stefanDeveloper May 5, 2025
790b377
Update plot saving
stefanDeveloper May 6, 2025
03ecdc7
Update training
stefanDeveloper May 6, 2025
fefb0fd
Support evaluation on all data sets
stefanDeveloper May 6, 2025
46b7d86
Update ds
stefanDeveloper May 7, 2025
895a683
Update training and test func
stefanDeveloper May 7, 2025
1fc746a
Add logging of results
stefanDeveloper May 8, 2025
20cf2e4
remove nested code
stefanDeveloper May 8, 2025
2ce6938
Add tsne plots
stefanDeveloper May 8, 2025
3eba303
Add correct saving for plots
stefanDeveloper May 9, 2025
1f81e34
Update dataset
stefanDeveloper May 9, 2025
3ead599
Update saving of models
stefanDeveloper May 9, 2025
55ae6d4
Finish plotting
stefanDeveloper May 9, 2025
9dd9f1e
Update paths for saving
stefanDeveloper May 9, 2025
edaa870
Fix stratification
stefanDeveloper May 9, 2025
d6f2f42
Increase size
stefanDeveloper May 9, 2025
714b56a
Update trial
stefanDeveloper May 9, 2025
b495101
Fix error in plot generation
stefanDeveloper May 9, 2025
7bf0a64
Update model training
stefanDeveloper May 9, 2025
97dc2ca
Add results to ignore
stefanDeveloper May 9, 2025
1a62f26
Fix issue in explainer
stefanDeveloper May 12, 2025
b5a5688
Fix issue in XG
stefanDeveloper May 12, 2025
4be5274
Fix issue in explainer
stefanDeveloper May 13, 2025
09ca581
Add fdr and fttar
stefanDeveloper May 13, 2025
7e3a716
Update benchmarking
stefanDeveloper May 14, 2025
bb7dc24
Update fdr scorer
stefanDeveloper May 14, 2025
a0815dc
Reduce feature size
stefanDeveloper May 23, 2025
392795e
Fix issue in model
stefanDeveloper May 23, 2025
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ __pycache__/
*.py[cod]
*$py.class
*.pkl

results/*
# C extensions
*.so
*.html
Expand Down
4 changes: 2 additions & 2 deletions docker/benchmark_tests/Dockerfile.run_test
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ COPY src/base ./src/base
COPY src/train ./src/train
COPY config.yaml .
COPY docker/benchmark_tests .
COPY data ./data
COPY data/dgta ./data/dgta

RUN rm -rf /root/.cache

CMD [ "python", "run_test.py"]
CMD [ "python", "run_test.py" ]
38 changes: 30 additions & 8 deletions docker/benchmark_tests/run_test.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import argparse
import datetime
import ipaddress
import os
Expand Down Expand Up @@ -27,6 +28,7 @@ def __init__(self, data_base_path: str = "./data"):
datasets = DatasetLoader(base_path=data_base_path, max_rows=10000)

dataset = Dataset(
name="",
data_path="",
data=pl.concat(
[
Expand Down Expand Up @@ -262,7 +264,32 @@ def __init__(self, length_in_min: float | int, msg_per_sec: int = 500):
super().__init__(full_length_in_min=length_in_min, msg_per_sec=msg_per_sec)


def main(test_type_nr):
def main():
# Get the environment variable, default to 1 if not set
env_test_type_nr = int(os.getenv("TEST_TYPE_NR", 1))

parser = argparse.ArgumentParser(
description="Example script with test_type_nr argument."
)

parser.add_argument(
"--test_type_nr",
type=int,
choices=[1, 2, 3, 4],
default=env_test_type_nr,
help="""
1 - Ramp-up test
2 - Burst test
3 - Maximum throughput test
4 - Long-term test
""",
)

args = parser.parse_args()

print(f"Selected test type number: {args.test_type_nr}")
test_type_nr = args.test_type_nr

"""Creates the test instance and executes the test."""
match test_type_nr:
case 1:
Expand Down Expand Up @@ -300,10 +327,5 @@ def main(test_type_nr):


if __name__ == "__main__":
"""
1 - Ramp-up test
2 - Burst test
3 - Maximum throughput test
4 - Long-term test
"""
main(3)
""" """
main()
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
services:
benchmark_test_run:
image: benchmark_test_run
image: localhost:5000/benchmark_test_run
environment:
- TEST_TYPE_NR=3
networks:
heidgaf:
deploy:
Expand Down
5 changes: 5 additions & 0 deletions requirements/requirements.train.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ pyarrow
polars
click
optuna
matplotlib
te2rules
seaborn
lightgbm
imblearn
3 changes: 3 additions & 0 deletions src/train/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
RESULT_FOLDER = "results"
CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"], show_default=True)
SEED = 108
Loading
Loading