|
14 | 14 |
|
15 | 15 | """Utilities to construct configs for solutionsteam_jax_bite DAG.""" |
16 | 16 |
|
17 | | -from dags.common import test_owner |
| 17 | +import datetime |
| 18 | +from typing import Iterable, Optional |
| 19 | + |
| 20 | +from dags.common.vm_resource import Project, XpkClusters |
18 | 21 | from xlml.apis import gcp_config, metric_config, task, test_config |
19 | 22 | from xlml.apis.xpk_cluster_config import XpkClusterConfig |
20 | | -from dags import gcs_bucket |
21 | | -from dags.common.vm_resource import TpuVersion, Project, XpkClusters, GpuVersion, CpuVersion, Zone |
22 | | -from typing import Iterable, Optional |
23 | | -import datetime |
24 | 23 |
|
25 | 24 | clusters = { |
26 | 25 | # accelerator: cluster names |
@@ -49,7 +48,9 @@ def get_gke_config( |
49 | 48 | test_owner: str, |
50 | 49 | cluster: XpkClusterConfig = XpkClusters.TPU_V4_8_MAXTEXT_CLUSTER, |
51 | 50 | num_slices: int = 1, |
52 | | - dataset_name: metric_config.DatasetOption = metric_config.DatasetOption.XLML_DATASET, |
| 51 | + dataset_name: metric_config.DatasetOption = ( |
| 52 | + metric_config.DatasetOption.XLML_DATASET |
| 53 | + ), |
53 | 54 | dataset_project: str = Project.CLOUD_ML_AUTO_SOLUTIONS.value, |
54 | 55 | composer_project: str = Project.CLOUD_ML_AUTO_SOLUTIONS.value, |
55 | 56 | tensorboard_summary_config: Optional[metric_config.SummaryConfig] = None, |
@@ -88,42 +89,3 @@ def get_gke_config( |
88 | 89 | task_gcp_config=job_gcp_config, |
89 | 90 | task_metric_config=job_metric_config, |
90 | 91 | ) |
91 | | - |
92 | | - |
93 | | -def get_gpu_gke_test_config( |
94 | | - time_out_in_min: int, |
95 | | - test_name: str, |
96 | | - run_model_cmds: str, |
97 | | - cluster: XpkClusterConfig, |
98 | | - test_owner: str, |
99 | | - docker_image: str, |
100 | | - num_slices: int = 1, |
101 | | -) -> task.XpkTask: |
102 | | - job_gcp_config = gcp_config.GCPConfig( |
103 | | - project_name=cluster.project, |
104 | | - zone=cluster.zone, |
105 | | - dataset_name=metric_config.DatasetOption.XLML_DATASET, |
106 | | - ) |
107 | | - |
108 | | - job_test_config = test_config.GpuXpkTest( |
109 | | - test_config.Gpu( |
110 | | - machine_type=None, |
111 | | - image_family=None, |
112 | | - count=None, |
113 | | - accelerator_type=cluster.device_version.value, |
114 | | - runtime_version=None, |
115 | | - ), |
116 | | - test_name=test_name, |
117 | | - set_up_cmds=None, |
118 | | - run_model_cmds=run_model_cmds, |
119 | | - timeout=datetime.timedelta(minutes=time_out_in_min), |
120 | | - task_owner=test_owner, |
121 | | - cluster_name=cluster.name, |
122 | | - docker_image=docker_image, |
123 | | - num_slices=num_slices, |
124 | | - ) |
125 | | - |
126 | | - return task.XpkTask( |
127 | | - task_test_config=job_test_config, |
128 | | - task_gcp_config=job_gcp_config, |
129 | | - ) |
0 commit comments