mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-04-26 12:32:10 +00:00
feat(gaudi/ci): added ci for gaudi device
This commit is contained in:
parent
119bdbd458
commit
7bfba234b1
@ -190,11 +190,7 @@ def gaudi_launcher(event_loop):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Error handling existing container: {str(e)}")
|
logger.error(f"Error handling existing container: {str(e)}")
|
||||||
|
|
||||||
model_name = next(
|
tgi_args = TEST_CONFIGS[test_name]["args"].copy()
|
||||||
name for name, cfg in TEST_CONFIGS.items() if cfg["model_id"] == model_id
|
|
||||||
)
|
|
||||||
|
|
||||||
tgi_args = TEST_CONFIGS[model_name]["args"].copy()
|
|
||||||
|
|
||||||
env = BASE_ENV.copy()
|
env = BASE_ENV.copy()
|
||||||
|
|
||||||
@ -202,15 +198,20 @@ def gaudi_launcher(event_loop):
|
|||||||
env["MODEL_ID"] = model_id
|
env["MODEL_ID"] = model_id
|
||||||
|
|
||||||
# Add env config that is definied in the fixture parameter
|
# Add env config that is definied in the fixture parameter
|
||||||
if "env_config" in TEST_CONFIGS[model_name]:
|
if "env_config" in TEST_CONFIGS[test_name]:
|
||||||
env.update(TEST_CONFIGS[model_name]["env_config"].copy())
|
env.update(TEST_CONFIGS[test_name]["env_config"].copy())
|
||||||
|
|
||||||
volumes = [f"{DOCKER_VOLUME}:/data"]
|
volumes = [f"{DOCKER_VOLUME}:/data"]
|
||||||
logger.debug(f"Using volume {volumes}")
|
logger.debug(f"Using volume {volumes}")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
logger.debug(f"Using command {tgi_args}")
|
||||||
logger.info(f"Creating container with name {container_name}")
|
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
|
# Log equivalent docker run command for debugging, this is not actually executed
|
||||||
container = client.containers.run(
|
container = client.containers.run(
|
||||||
DOCKER_IMAGE,
|
DOCKER_IMAGE,
|
||||||
|
@ -3,7 +3,7 @@ import os
|
|||||||
from typing import Dict, Any, Generator
|
from typing import Dict, Any, Generator
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from test_generate import TEST_CONFIGS
|
from test_gaudi_generate import TEST_CONFIGS
|
||||||
|
|
||||||
UNKNOWN_CONFIGS = {
|
UNKNOWN_CONFIGS = {
|
||||||
name: config
|
name: config
|
||||||
|
Loading…
Reference in New Issue
Block a user