aap-utils 0.1.2__tar.gz → 0.1.3__tar.gz
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-0.1.2 → aap_utils-0.1.3}/PKG-INFO +2 -7
- {aap_utils-0.1.2 → aap_utils-0.1.3}/aap_utils/register.py +27 -2
- {aap_utils-0.1.2 → aap_utils-0.1.3}/aap_utils.egg-info/PKG-INFO +3 -8
- {aap_utils-0.1.2 → aap_utils-0.1.3}/setup.py +1 -1
- {aap_utils-0.1.2 → aap_utils-0.1.3}/README.md +0 -0
- {aap_utils-0.1.2 → aap_utils-0.1.3}/aap_utils/__init__.py +0 -0
- {aap_utils-0.1.2 → aap_utils-0.1.3}/aap_utils.egg-info/SOURCES.txt +0 -0
- {aap_utils-0.1.2 → aap_utils-0.1.3}/aap_utils.egg-info/dependency_links.txt +0 -0
- {aap_utils-0.1.2 → aap_utils-0.1.3}/aap_utils.egg-info/requires.txt +0 -0
- {aap_utils-0.1.2 → aap_utils-0.1.3}/aap_utils.egg-info/top_level.txt +0 -0
- {aap_utils-0.1.2 → aap_utils-0.1.3}/pyproject.toml +0 -0
- {aap_utils-0.1.2 → aap_utils-0.1.3}/setup.cfg +0 -0
@@ -1,15 +1,10 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: aap_utils
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.3
|
4
4
|
Summary: A Python library for registering an IP address for AAP
|
5
|
-
Home-page: UNKNOWN
|
6
5
|
Author: Minh Dang
|
7
6
|
Author-email: danghoangminh86@gmail.com
|
8
|
-
License: UNKNOWN
|
9
|
-
Platform: UNKNOWN
|
10
7
|
Classifier: Programming Language :: Python :: 3
|
11
8
|
Classifier: License :: OSI Approved :: MIT License
|
12
9
|
Classifier: Operating System :: OS Independent
|
13
|
-
|
14
|
-
UNKNOWN
|
15
|
-
|
10
|
+
Requires-Dist: requests
|
@@ -2,6 +2,8 @@ import socket
|
|
2
2
|
import requests
|
3
3
|
import time
|
4
4
|
import os
|
5
|
+
from hydra import initialize, compose
|
6
|
+
from omegaconf import OmegaConf, DictConfig
|
5
7
|
|
6
8
|
def register_demo(debug=False):
|
7
9
|
for attempt in range(10):
|
@@ -13,7 +15,11 @@ def register_demo(debug=False):
|
|
13
15
|
headers={"Content-Type": "application/json"}
|
14
16
|
)
|
15
17
|
if response.ok:
|
16
|
-
|
18
|
+
response_json = response.json()
|
19
|
+
argo_host = response_json.get('ARGOWORKFLOW_HOST', 'http://argowf.aiplatform.vcntt.tech')
|
20
|
+
domain_name = argo_host.split("argowf.")[-1]
|
21
|
+
url, namespace = create_url(domain_name=domain_name)
|
22
|
+
|
17
23
|
# print(f"The demo service is at {namespace}.your_custorm_domain/demo/. Eg: {url}")
|
18
24
|
print(f"The demo service is at {url}")
|
19
25
|
if debug:
|
@@ -51,5 +57,24 @@ def create_url(domain_name = "aiplatform.vcntt.tech"):
|
|
51
57
|
raise ValueError(f"The KERNEL_NAMESPACE '{kernel_namespace}' does not follow the expected format.")
|
52
58
|
|
53
59
|
# Create the final URL
|
54
|
-
url = f"https://{transformed_namespace}.{domain_name}
|
60
|
+
url = f"https://{transformed_namespace}.{domain_name}"
|
55
61
|
return url, transformed_namespace
|
62
|
+
|
63
|
+
|
64
|
+
def get_args():
|
65
|
+
kcn_params = "config.yaml"
|
66
|
+
config_path="configs/config.yaml"
|
67
|
+
overrides = []
|
68
|
+
|
69
|
+
if os.environ.get('KCN_PARAMS') and os.environ.get('KCN_PARAMS') != '':
|
70
|
+
full_path = os.getenv('KCN_PARAMS')
|
71
|
+
config_path = os.path.join(config_path, kcn_params)
|
72
|
+
kcn_params = os.path.basename(full_path) # Extract the filename
|
73
|
+
|
74
|
+
if os.environ.get('KCN_OVERRIDES') and os.environ.get('KCN_OVERRIDES') != '':
|
75
|
+
overrides_env = os.getenv("KCN_OVERRIDES")
|
76
|
+
overrides = overrides_env.split('|') if overrides_env else []
|
77
|
+
|
78
|
+
with initialize(version_base=None, config_path=config_path):
|
79
|
+
args = compose(config_name=kcn_params)
|
80
|
+
return args
|
@@ -1,15 +1,10 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
|
-
Name:
|
3
|
-
Version: 0.1.
|
2
|
+
Name: aap_utils
|
3
|
+
Version: 0.1.3
|
4
4
|
Summary: A Python library for registering an IP address for AAP
|
5
|
-
Home-page: UNKNOWN
|
6
5
|
Author: Minh Dang
|
7
6
|
Author-email: danghoangminh86@gmail.com
|
8
|
-
License: UNKNOWN
|
9
|
-
Platform: UNKNOWN
|
10
7
|
Classifier: Programming Language :: Python :: 3
|
11
8
|
Classifier: License :: OSI Approved :: MIT License
|
12
9
|
Classifier: Operating System :: OS Independent
|
13
|
-
|
14
|
-
UNKNOWN
|
15
|
-
|
10
|
+
Requires-Dist: requests
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
2
2
|
|
3
3
|
setup(
|
4
4
|
name="aap_utils", # The name of your library
|
5
|
-
version="0.1.
|
5
|
+
version="0.1.3",
|
6
6
|
description="A Python library for registering an IP address for AAP",
|
7
7
|
author="Minh Dang",
|
8
8
|
author_email="danghoangminh86@gmail.com",
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|