From d6fc50b6283add371258347960ddd241828c10a8 Mon Sep 17 00:00:00 2001 From: baptiste Date: Tue, 22 Apr 2025 09:17:44 +0000 Subject: [PATCH] feat(gaudi/ci): added ci for gaudi device --- integration-tests/fixtures/gaudi/service.py | 15 ++++++++------- .../gaudi/capture_expected_outputs.py | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/integration-tests/fixtures/gaudi/service.py b/integration-tests/fixtures/gaudi/service.py index 44c7f999..b6942dbe 100644 --- a/integration-tests/fixtures/gaudi/service.py +++ b/integration-tests/fixtures/gaudi/service.py @@ -190,11 +190,7 @@ def gaudi_launcher(event_loop): except Exception as e: logger.error(f"Error handling existing container: {str(e)}") - model_name = next( - name for name, cfg in TEST_CONFIGS.items() if cfg["model_id"] == model_id - ) - - tgi_args = TEST_CONFIGS[model_name]["args"].copy() + tgi_args = TEST_CONFIGS[test_name]["args"].copy() env = BASE_ENV.copy() @@ -202,15 +198,20 @@ def gaudi_launcher(event_loop): env["MODEL_ID"] = model_id # Add env config that is definied in the fixture parameter - if "env_config" in TEST_CONFIGS[model_name]: - env.update(TEST_CONFIGS[model_name]["env_config"].copy()) + if "env_config" in TEST_CONFIGS[test_name]: + env.update(TEST_CONFIGS[test_name]["env_config"].copy()) volumes = [f"{DOCKER_VOLUME}:/data"] logger.debug(f"Using volume {volumes}") try: + logger.debug(f"Using command {tgi_args}") logger.info(f"Creating container with name {container_name}") + logger.debug(f"Using environment {env}") + logger.debug(f"Using volumes {volumes}") + logger.debug(f"HABANA_RUN_ARGS {HABANA_RUN_ARGS}") + # Log equivalent docker run command for debugging, this is not actually executed container = client.containers.run( DOCKER_IMAGE, diff --git a/integration-tests/gaudi/capture_expected_outputs.py b/integration-tests/gaudi/capture_expected_outputs.py index 6a5d4a68..5a5fd179 100644 --- a/integration-tests/gaudi/capture_expected_outputs.py +++ b/integration-tests/gaudi/capture_expected_outputs.py @@ -3,7 +3,7 @@ import os from typing import Dict, Any, Generator import pytest -from test_generate import TEST_CONFIGS +from test_gaudi_generate import TEST_CONFIGS UNKNOWN_CONFIGS = { name: config