aap-utils 0.1.12__py3-none-any.whl → 0.1.14__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aap_utils/register.py +3 -1
- {aap_utils-0.1.12.dist-info → aap_utils-0.1.14.dist-info}/METADATA +1 -1
- aap_utils-0.1.14.dist-info/RECORD +6 -0
- aap_utils/config_loader.py +0 -26
- aap_utils-0.1.12.dist-info/RECORD +0 -7
- {aap_utils-0.1.12.dist-info → aap_utils-0.1.14.dist-info}/WHEEL +0 -0
- {aap_utils-0.1.12.dist-info → aap_utils-0.1.14.dist-info}/top_level.txt +0 -0
aap_utils/register.py
CHANGED
@@ -2,7 +2,8 @@ import socket
|
|
2
2
|
import requests
|
3
3
|
import time
|
4
4
|
import os
|
5
|
-
from
|
5
|
+
from pathlib import Path
|
6
|
+
from hydra import initialize, compose, initialize_config_dir
|
6
7
|
from omegaconf import OmegaConf, DictConfig
|
7
8
|
|
8
9
|
def register_demo(debug=False):
|
@@ -60,6 +61,7 @@ def create_url(domain_name = "aiplatform.vcntt.tech"):
|
|
60
61
|
url = f"https://{transformed_namespace}.{domain_name}"
|
61
62
|
return url, transformed_namespace
|
62
63
|
|
64
|
+
|
63
65
|
def get_args():
|
64
66
|
kcn_params = "config.yaml"
|
65
67
|
|
@@ -0,0 +1,6 @@
|
|
1
|
+
aap_utils/__init__.py,sha256=iN7GQizkWVefysHlKpDG6L35Dkfaur2x2uS2uXtUiN4,46
|
2
|
+
aap_utils/register.py,sha256=4uCv45LfElYNp-3JfXyD_u4QDzM5zie-NPqyGJWzarg,3445
|
3
|
+
aap_utils-0.1.14.dist-info/METADATA,sha256=vwQXCNeikv4PBh-ORcaLQ0Lnnpn5krq1nY9uiavcemc,347
|
4
|
+
aap_utils-0.1.14.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
5
|
+
aap_utils-0.1.14.dist-info/top_level.txt,sha256=Qt5xmL8_0_jhMl9uA3lg-xnvs4nCEyVj1tBE4vnp36M,10
|
6
|
+
aap_utils-0.1.14.dist-info/RECORD,,
|
aap_utils/config_loader.py
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
import os
|
2
|
-
from hydra import initialize, compose
|
3
|
-
from omegaconf import DictConfig
|
4
|
-
|
5
|
-
class ConfigLoader:
|
6
|
-
def __init__(self):
|
7
|
-
self.kcn_params = "config.yaml"
|
8
|
-
self.config_path = "configs/"
|
9
|
-
self.overrides = []
|
10
|
-
|
11
|
-
def _load_env_variables(self):
|
12
|
-
"""Load environment variables for config parameters and overrides."""
|
13
|
-
if os.environ.get("KCN_PARAMS"):
|
14
|
-
full_path = os.getenv("KCN_PARAMS")
|
15
|
-
self.kcn_params = os.path.basename(full_path) # Extract the filename
|
16
|
-
|
17
|
-
if os.environ.get("KCN_OVERRIDES"):
|
18
|
-
overrides_env = os.getenv("KCN_OVERRIDES")
|
19
|
-
self.overrides = overrides_env.split("|") if overrides_env else []
|
20
|
-
|
21
|
-
def get_args(self) -> DictConfig:
|
22
|
-
"""Load and return the Hydra configuration."""
|
23
|
-
self._load_env_variables()
|
24
|
-
with initialize_config_dir(version_base=None, config_dir=self.config_path):
|
25
|
-
args = compose(config_name=self.kcn_params, overrides=self.overrides)
|
26
|
-
return args
|
@@ -1,7 +0,0 @@
|
|
1
|
-
aap_utils/__init__.py,sha256=iN7GQizkWVefysHlKpDG6L35Dkfaur2x2uS2uXtUiN4,46
|
2
|
-
aap_utils/config_loader.py,sha256=dhwQYuJ7y1exe6zI8zRK8WL6XhXnlb9eDLNKG3GgNNs,1011
|
3
|
-
aap_utils/register.py,sha256=GHzj4HSZ0ylF4UEADMRwDOq6sWdsKLr7QRBF7p6QYbs,3396
|
4
|
-
aap_utils-0.1.12.dist-info/METADATA,sha256=DreyF-hB1jwyn7Qv4c8AiB79kOJeb17kQFs6YbcEMao,347
|
5
|
-
aap_utils-0.1.12.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
6
|
-
aap_utils-0.1.12.dist-info/top_level.txt,sha256=Qt5xmL8_0_jhMl9uA3lg-xnvs4nCEyVj1tBE4vnp36M,10
|
7
|
-
aap_utils-0.1.12.dist-info/RECORD,,
|
File without changes
|
File without changes
|