aap-utils 0.1.7__py3-none-any.whl → 0.1.8__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 CHANGED
@@ -63,20 +63,28 @@ def create_url(domain_name = "aiplatform.vcntt.tech"):
63
63
 
64
64
  def get_args():
65
65
  kcn_params = "config.yaml"
66
-
67
- run_py_path = os.path.abspath(os.path.dirname(__file__)) # Get the directory of this script
68
- config_path = os.path.join(run_py_path, "configs") # Set config_path relative to run.py
66
+
67
+ # Get the directory of run.py (assuming run.py is executed from its own location)
68
+ run_py_path = os.getcwd() # This gets the directory where run.py is executed
69
+
70
+ # Relative path to configs directory
71
+ config_path = "configs" # Hydra requires a relative path
72
+
69
73
  overrides = []
70
74
 
71
75
  if os.environ.get('KCN_PARAMS') and os.environ.get('KCN_PARAMS') != '':
72
76
  full_path = os.getenv('KCN_PARAMS')
73
- config_path = os.path.join(config_path, kcn_params)
74
77
  kcn_params = os.path.basename(full_path) # Extract the filename
75
78
 
76
79
  if os.environ.get('KCN_OVERRIDES') and os.environ.get('KCN_OVERRIDES') != '':
77
80
  overrides_env = os.getenv("KCN_OVERRIDES")
78
81
  overrides = overrides_env.split('|') if overrides_env else []
79
82
 
83
+ # Ensure the config directory exists
84
+ if not os.path.exists(os.path.join(run_py_path, config_path)):
85
+ raise FileNotFoundError(f"Config directory not found: {os.path.join(run_py_path, config_path)}")
86
+
80
87
  with initialize(version_base=None, config_path=config_path):
81
88
  args = compose(config_name=kcn_params)
89
+
82
90
  return args
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aap_utils
3
- Version: 0.1.7
3
+ Version: 0.1.8
4
4
  Summary: A Python library for registering an IP address for AAP
5
5
  Author: Minh Dang
6
6
  Author-email: danghoangminh86@gmail.com
@@ -0,0 +1,6 @@
1
+ aap_utils/__init__.py,sha256=UB0P2cVBboRNY4SE__iGw0Nscwv9KJFTINuwydrWv4M,45
2
+ aap_utils/register.py,sha256=-TGFMUjgv8aIZBMZ6h9VkYoLqXAkAoi5_VJZyhcJ6Ys,3460
3
+ aap_utils-0.1.8.dist-info/METADATA,sha256=14ly6dglTdHhGDF6jXnpeFCeGlCB8Ucx8MH_RZSfXpA,346
4
+ aap_utils-0.1.8.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
5
+ aap_utils-0.1.8.dist-info/top_level.txt,sha256=Qt5xmL8_0_jhMl9uA3lg-xnvs4nCEyVj1tBE4vnp36M,10
6
+ aap_utils-0.1.8.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- aap_utils/__init__.py,sha256=UB0P2cVBboRNY4SE__iGw0Nscwv9KJFTINuwydrWv4M,45
2
- aap_utils/register.py,sha256=LhyPdo375TAR8rb-adN9PJaTsDrd10StfX1QX_YRblw,3226
3
- aap_utils-0.1.7.dist-info/METADATA,sha256=-l64FenVgq64Fzh-TmXXxtxnoMEWJL7Co-yiuu9ulSE,346
4
- aap_utils-0.1.7.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
5
- aap_utils-0.1.7.dist-info/top_level.txt,sha256=Qt5xmL8_0_jhMl9uA3lg-xnvs4nCEyVj1tBE4vnp36M,10
6
- aap_utils-0.1.7.dist-info/RECORD,,