Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
minhtribk12 committed Aug 30, 2024
2 parents e2c51e3 + 9511279 commit 38112ce
Show file tree
Hide file tree
Showing 25 changed files with 257 additions and 226 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ modules/orchestration/temp/
*.pem
observability/odop_obs/logs/*.txt
observability/odop_obs/tinyflux/*.csv

.python-version
38 changes: 19 additions & 19 deletions example/docker_report/config/client1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@ connector:
# exchange_name: test_qoa4ml
# exchange_type: topic
# out_routing_key: test.client1
# probes:
# - probe_type: "docker"
# frequency: 9999999
# require_register: false
# log_latency_flag: false
# environment: Edge
# container_list: ["test"]
probes:
- probe_type: "docker"
frequency: 9999999
require_register: false
log_latency_flag: false
environment: Edge
container_list: ["test"]

# - probe_type: "system"
# frequency: 1
# require_register: false
# log_latency_flag: false
# environment: Edge
# node_name: "Edge1"
#
# - probe_type: "process"
# frequency: 1
# require_register: false
# log_latency_flag: false
# environment: Edge
- probe_type: "system"
frequency: 1
require_register: false
log_latency_flag: false
environment: Edge
node_name: "Edge1"

- probe_type: "process"
frequency: 1
require_register: false
log_latency_flag: false
environment: Edge
25 changes: 13 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include = ["src/qoa4ml"]

[project]
name = "qoa4ml"
version = "0.2.16"
version = "0.2.17"
description = "Quality of Analysis for Machine Learning"
readme = "README.md"

Expand Down Expand Up @@ -77,19 +77,20 @@ AaltoSEA = "https://rdsea.github.io/"

[tool.rye]
dev-dependencies = [
"mkdocs-material",
"pre-commit",
"devtools",
"ruff",
"codespell",
"pip>=24.2",
"pytest>=8.3.2",
"tox>=4.18.0",
"pytest-sugar>=1.0.0",
"tox-uv>=1.11.2",
"tox-gh-actions>=3.2.0",
"mkdocs-material",
"pre-commit",
"devtools",
"ruff",
"codespell",
"pip>=24.2",
"pytest>=8.3.2",
"tox>=4.18.0",
"pytest-sugar>=1.0.0",
"tox-uv>=1.11.2",
"tox-gh-actions>=3.2.0",
]
managed = true
universal = true


[tool.ruff.lint]
Expand Down
15 changes: 10 additions & 5 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# all-features: true
# with-sources: false
# generate-hashes: false
# universal: false
# universal: true

-e file:.
absl-py==2.1.0
Expand Down Expand Up @@ -39,7 +39,10 @@ click==8.1.7
# via uvicorn
codespell==2.3.0
colorama==0.4.6
# via click
# via mkdocs
# via mkdocs-material
# via pytest
# via tox
confluent-kafka==2.5.0
# via qoa4ml
Expand All @@ -53,7 +56,7 @@ docker==7.1.0
# via qoa4ml
eval-type-backport==0.2.0
# via qoa4ml
exceptiongroup==1.2.2
exceptiongroup==1.2.2 ; python_full_version < '3.11'
# via anyio
# via pytest
executing==2.0.1
Expand Down Expand Up @@ -129,7 +132,7 @@ namex==0.0.8
# via keras
nodeenv==1.9.1
# via pre-commit
numpy==1.23.5
numpy==1.26.4
# via h5py
# via keras
# via ml-dtypes
Expand Down Expand Up @@ -210,6 +213,8 @@ pytest==8.3.2
pytest-sugar==1.0.0
python-dateutil==2.9.0.post0
# via ghp-import
pywin32==306 ; sys_platform == 'win32'
# via docker
pyyaml==6.0.2
# via mkdocs
# via mkdocs-get-deps
Expand Down Expand Up @@ -252,14 +257,14 @@ tensorboard-data-server==0.7.2
# via tensorboard
tensorflow==2.17.0
# via qoa4ml
tensorflow-io-gcs-filesystem==0.37.1
tensorflow-io-gcs-filesystem==0.37.1 ; python_full_version < '3.12'
# via tensorflow
termcolor==2.4.0
# via pytest-sugar
# via tensorflow
tinyflux==1.0.0
# via qoa4ml
tomli==2.0.1
tomli==2.0.1 ; python_full_version < '3.11'
# via pyproject-api
# via pytest
# via tox
Expand Down
12 changes: 8 additions & 4 deletions requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# all-features: true
# with-sources: false
# generate-hashes: false
# universal: false
# universal: true

-e file:.
absl-py==2.1.0
Expand All @@ -26,6 +26,8 @@ charset-normalizer==3.3.2
# via requests
click==8.1.7
# via uvicorn
colorama==0.4.6 ; platform_system == 'Windows'
# via click
confluent-kafka==2.5.0
# via qoa4ml
deprecated==1.2.14
Expand All @@ -35,7 +37,7 @@ docker==7.1.0
# via qoa4ml
eval-type-backport==0.2.0
# via qoa4ml
exceptiongroup==1.2.2
exceptiongroup==1.2.2 ; python_full_version < '3.11'
# via anyio
fastapi==0.112.1
# via qoa4ml
Expand Down Expand Up @@ -79,7 +81,7 @@ ml-dtypes==0.4.0
# via tensorflow
namex==0.0.8
# via keras
numpy==1.23.5
numpy==1.26.4
# via h5py
# via keras
# via ml-dtypes
Expand Down Expand Up @@ -130,6 +132,8 @@ pydantic-core==2.18.4
# via pydantic
pygments==2.18.0
# via rich
pywin32==306 ; sys_platform == 'win32'
# via docker
pyyaml==6.0.2
# via qoa4ml
requests==2.32.3
Expand Down Expand Up @@ -159,7 +163,7 @@ tensorboard-data-server==0.7.2
# via tensorboard
tensorflow==2.17.0
# via qoa4ml
tensorflow-io-gcs-filesystem==0.37.1
tensorflow-io-gcs-filesystem==0.37.1 ; python_full_version < '3.12'
# via tensorflow
termcolor==2.4.0
# via tensorflow
Expand Down
10 changes: 9 additions & 1 deletion src/qoa4ml/config/configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,20 @@ class KafkaCollectorConfig(BaseModel):
poll_inteval: float = 1.0


class DebugConnectorConfig(BaseModel):
silence: bool


# TODO: test if loading the config, the type of the config can be found
CollectorConfigClass = Union[
AMQPCollectorConfig, SocketCollectorConfig, KafkaCollectorConfig, dict
]
ConnectorConfigClass = Union[
AMQPConnectorConfig, SocketConnectorConfig, KafkaConnectorConfig, dict
AMQPConnectorConfig,
SocketConnectorConfig,
KafkaConnectorConfig,
DebugConnectorConfig,
dict,
]


Expand Down
8 changes: 5 additions & 3 deletions src/qoa4ml/connector/debug_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

from devtools import debug

from ..config.configs import DebugConnectorConfig
from .base_connector import BaseConnector


class DebugConnector(BaseConnector):
def __init__(self):
pass
def __init__(self, config: DebugConnectorConfig):
self.silence = config.silence

def send_report(self, body_message: str):
debug(json.loads(body_message))
if not self.silence:
debug(json.loads(body_message))
2 changes: 1 addition & 1 deletion src/qoa4ml/lang/datamodel_enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class ReportTypeEnum(Enum):
security = "security_report"


class EnvironmentEnum(Enum):
class EnvironmentEnum(str, Enum):
hpc = "HPC"
edge = "Edge"
cloud = "Cloud"
108 changes: 0 additions & 108 deletions src/qoa4ml/metric_mananger.py

This file was deleted.

Loading

0 comments on commit 38112ce

Please sign in to comment.