Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move all PyTorch/XLA regression test on Trillium to one DAG page #504

Merged
merged 8 commits into from
Dec 17, 2024
Merged
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 33 additions & 9 deletions dags/mantaray/run_mantaray_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from xlml.utils import mantaray
import yaml
from dags import composer_env
import re

# Skip running this script in unit test because gcs loading will fail.
if composer_env.is_prod_env() or composer_env.is_dev_env():
Expand All @@ -29,18 +30,41 @@
f"{mantaray.MANTARAY_G3_GS_BUCKET}/xlml_jobs/xlml_jobs.yaml"
)
xlml_jobs = yaml.safe_load(xlml_jobs_yaml)
# Create a DAG for each job

# Create a DAG for PyTorch/XLA tests
pattern = r"^(ptxla|pytorchxla).*"
workload_file_name_list = []
for job in xlml_jobs:
with models.DAG(
dag_id=job["task_name"],
schedule=job["schedule"],
tags=["mantaray"],
start_date=datetime.datetime(2024, 4, 22),
catchup=False,
) as dag:
if re.match(pattern, job["task_name"]):
workload_file_name_list.append(job["file_name"])

# merge all PyTorch/XLA tests ino one Dag
with models.DAG(
dag_id="pytorch_xla_model_regression_test_on_trillium",
schedule="0 0 * * *", # everyday at midnight # job["schedule"],
tags=["mantaray", "pytorchxla", "xlml"],
start_date=datetime.datetime(2024, 4, 22),
catchup=False,
) as dag:
for workload_file_name in workload_file_name_list:
run_workload = mantaray.run_workload(
workload_file_name=job["file_name"],
workload_file_name=workload_file_name,
)
run_workload

# Create a DAG for each job from maxtext
for job in xlml_jobs:
ManfeiBai marked this conversation as resolved.
Show resolved Hide resolved
if not re.match(pattern, job["task_name"]):
with models.DAG(
dag_id=job["task_name"],
schedule=job["schedule"],
tags=["mantaray"],
start_date=datetime.datetime(2024, 4, 22),
catchup=False,
) as dag:
run_workload = mantaray.run_workload(
workload_file_name=job["file_name"],
)
run_workload
else:
print(
Expand Down
Loading