1+ # Copyright 2024 Google LLC
2+ #
3+ # Licensed under the Apache License, Version 2.0 (the "License");
4+ # you may not use this file except in compliance with the License.
5+ # You may obtain a copy of the License at
6+ #
7+ # http://www.apache.org/licenses/LICENSE-2.0
8+ #
9+ # Unless required by applicable law or agreed to in writing, software
10+ # distributed under the License is distributed on an "AS IS" BASIS,
11+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ # See the License for the specific language governing permissions and
13+ # limitations under the License.
14+
15+ """A standalone DAG to test the Qwen3-Next 80B script with a custom Docker image."""
16+
17+ import datetime
18+ from airflow import models
19+ from dags import composer_env
20+ from dags .common import test_owner
21+ from dags .common .vm_resource import XpkClusters
22+ from dags .multipod .configs import gke_config
23+
24+ # Retrieve the HF_TOKEN from Airflow variables
25+ HF_TOKEN = models .Variable .get ("HF_TOKEN" , None )
26+
27+ with models .DAG (
28+ dag_id = "qwen3_next_custom_image_test" ,
29+ schedule = None , # Set to None so it only runs when manually triggered
30+ tags = [
31+ "maxtext" ,
32+ "tpu" ,
33+ "qwen3" ,
34+ "v5p-128" ,
35+ ],
36+ start_date = datetime .datetime (2024 , 1 , 1 ),
37+ catchup = False ,
38+ ) as dag :
39+
40+ # Your specified custom docker image
41+ custom_docker_image = "gcr.io/tpu-prod-env-multipod/maxtext_stable_stack_candidate:rbierneni-qwen-test"
42+
43+ # Single unchained test configuration
44+ test_qwen3_next = gke_config .get_gke_config (
45+ time_out_in_min = 90 ,
46+ test_name = "maxtext_qwen3_next_80b_test" ,
47+ run_model_cmds = (
48+ f"export HF_TOKEN={ HF_TOKEN } ; export BASE_OUTPUT_PATH=$GCS_OUTPUT; bash tests/end_to_end/tpu/qwen/next/qwen3-next-80b-a3b/2_test_qwen3_next_80b_a3b.sh" ,
49+ ),
50+ docker_image = custom_docker_image ,
51+ test_owner = test_owner .ROHAN_B , # Update the owner if necessary
52+ cluster = XpkClusters .TPU_V5P_128_CLUSTER ,
53+ ).run ()
54+
55+ # No chained dependencies required since there is only one task
56+ test_qwen3_next
0 commit comments