Skip to content

Commit 82d8d53

Browse files
committed
Adds more debug statements
1 parent 454af08 commit 82d8d53

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

ads/aqua/app.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,9 @@ def get_config(
339339
config_file_path = os.path.join(config_path, config_file_name)
340340
if is_path_exists(config_file_path):
341341
try:
342+
logger.info(
343+
f"Loading config: `{config_file_name}` from `{config_path}`"
344+
)
342345
config = load_config(
343346
config_path,
344347
config_file_name=config_file_name,
@@ -378,9 +381,11 @@ def build_cli(self) -> str:
378381
"""
379382
cmd = f"ads aqua {self._command}"
380383
params = [
381-
f"--{field.name} {json.dumps(getattr(self, field.name))}"
382-
if isinstance(getattr(self, field.name), dict)
383-
else f"--{field.name} {getattr(self, field.name)}"
384+
(
385+
f"--{field.name} {json.dumps(getattr(self, field.name))}"
386+
if isinstance(getattr(self, field.name), dict)
387+
else f"--{field.name} {getattr(self, field.name)}"
388+
)
384389
for field in fields(self.__class__)
385390
if getattr(self, field.name) is not None
386391
]

ads/aqua/common/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def load_config(file_path: str, config_file_name: str, **kwargs) -> dict:
252252
return config
253253

254254

255-
def list_os_files_with_extension(oss_path: str, extension: str) -> [str]:
255+
def list_os_files_with_extension(oss_path: str, extension: str) -> List[str]:
256256
"""
257257
List files in the specified directory with the given extension.
258258

ads/aqua/modeldeployment/utils.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ def load(
6262
cannot be determined, an appropriate error message is included in the summary.
6363
"""
6464
# Fetch deployment configurations concurrently.
65+
logger.debug(f"Loading model deployment configuration for models: {model_ids}")
6566
deployment_configs = self._fetch_deployment_configs_concurrently(model_ids)
67+
68+
logger.debug(f"Loaded config: {deployment_configs}")
6669
model_shape_gpu, deployment = self._extract_model_shape_gpu(deployment_configs)
6770

6871
# Initialize the summary result with the deployment configurations.
@@ -80,6 +83,8 @@ def load(
8083

8184
# Identify common deployment shapes among all models.
8285
common_shapes = self._get_common_shapes(model_shape_gpu)
86+
logger.debug(f"Common Shapes: {common_shapes} from: {model_shape_gpu}")
87+
8388
if not common_shapes:
8489
summary.error_message = (
8590
"The selected models do not share any common deployment shapes. "
@@ -94,6 +99,9 @@ def load(
9499
gpu_allocation = self._compute_gpu_allocation(
95100
common_shapes, model_shape_gpu, primary_model_id
96101
)
102+
103+
logger.debug(f"GPU Allocation: {gpu_allocation}")
104+
97105
if not gpu_allocation:
98106
summary.error_message = (
99107
"Unable to determine a valid GPU allocation for the selected models based on their current configurations. "

0 commit comments

Comments
 (0)