diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml new file mode 100644 index 0000000..1cbd31b --- /dev/null +++ b/.github/workflows/python-ci.yml @@ -0,0 +1,22 @@ +name: Python CI + +on: [push, pull_request] + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + with: + python-version: "3.10" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + cd qoa4ml_lib + pip install -r requirements.txt + pip install -r dev_requirements.txt + # Uncomment when fix ydata + #pip install -r ml_requirements.txt + cd .. + - uses: pre-commit/action@v3.0.1 diff --git a/example/simple/test.py b/example/simple/test.py index 6829457..65330b9 100644 --- a/example/simple/test.py +++ b/example/simple/test.py @@ -10,7 +10,6 @@ from devtools import debug from qoa4ml.qoa_client import QoaClient -from qoa4ml.reports.rohe_reports import RoheReport client1 = QoaClient(config_path="./config/client1.yaml") client2 = QoaClient(config_path="./config/client2.yaml") diff --git a/qoa4ml_lib/VERSION b/qoa4ml_lib/VERSION index 0ea3a94..7179039 100644 --- a/qoa4ml_lib/VERSION +++ b/qoa4ml_lib/VERSION @@ -1 +1 @@ -0.2.0 +0.2.3 diff --git a/qoa4ml_lib/qoa4ml/__init__.py b/qoa4ml_lib/qoa4ml/__init__.py index e923901..01d1ab8 100644 --- a/qoa4ml_lib/qoa4ml/__init__.py +++ b/qoa4ml_lib/qoa4ml/__init__.py @@ -1,8 +1,10 @@ # NOTE: Mark lazy module globally, only load when used -# -# lazy_import.lazy_module("numpy") -# lazy_import.lazy_module("tensorflow") -# lazy_import.lazy_module("psutil") -# lazy_import.lazy_module("pydantic") -# lazy_import.lazy_module("fastapi") -# lazy_import.lazy_module("tinyflux") +import lazy_import + +lazy_import.lazy_module("requests") +lazy_import.lazy_module("tensorflow") +lazy_import.lazy_module("numpy") +lazy_import.lazy_module("pandas") +lazy_import.lazy_module("fastapi") +lazy_import.lazy_module("tinyflux") +lazy_import.lazy_module("psutil") diff --git a/qoa4ml_lib/qoa4ml/qoa_client.py b/qoa4ml_lib/qoa4ml/qoa_client.py index 119f20e..694b8cd 100644 --- a/qoa4ml_lib/qoa4ml/qoa_client.py +++ b/qoa4ml_lib/qoa4ml/qoa_client.py @@ -152,6 +152,7 @@ def __init__( def registration(self, url: str): # get connector configuration by registering with the monitoring service + return requests.request( "POST", url, headers=headers, data=self.client_config.json() ) diff --git a/qoa4ml_lib/qoa4ml/utils/__init__.py b/qoa4ml_lib/qoa4ml/utils/__init__.py new file mode 100644 index 0000000..e69de29