Skip to content

Commit ff459e0

Browse files
authored
fix: Change base.yml path from MaxText to maxtext (GoogleCloudPlatform#1209)
In AI-Hypercomputer/maxtext#3044, all config files were moved from `src/MaxText/configs` to the lowercase `src/maxtext/configs`. Because of this directory change, the XLML DAGs are currently failing with the following error: ```FileNotFoundError: [Errno 2] No such file or directory: '/deps/src/MaxText/configs/base.yml'``` This change updated file paths for compatibility with AI-Hypercomputer/maxtext#3044.
1 parent ec552cf commit ff459e0

18 files changed

Lines changed: 30 additions & 24 deletions

dags/examples/maxtext_aqtp_version_sweep_gke_example_dag.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
for model_size in models:
5555
run_cmds = [
5656
"pip show aqtp",
57-
f"bash MaxText/configs/{tpu}/{model_size}.sh EXECUTABLE=train.py OUTPUT_PATH={base_output_directory} PLATFORM=gke",
57+
f"bash src/maxtext/configs/tpu/{tpu}/{model_size}.sh EXECUTABLE=train.py OUTPUT_PATH={base_output_directory} PLATFORM=gke",
5858
]
5959

6060
tests.extend(

dags/examples/maxtext_profile_namegen_example_dag.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
base_command = (
3535
f"export BASE_OUTPUT_PATH={BASE_OUTPUT_PATH} && "
36-
+ "python3 -m MaxText.train MaxText/configs/base.yml base_output_directory=gs://runner-maxtext-logs run_name=${RUN_NAME} model_name=mixtral-8x7b tokenizer_path=assets/tokenizer.mistral-v1 dataset_path=gs://maxtext-dataset per_device_batch_size=4 enable_checkpointing=false ici_fsdp_parallelism=-1 max_target_length=1024 async_checkpointing=false attention=flash dtype=bfloat16 weight_dtype=bfloat16"
36+
+ "python3 -m MaxText.train src/maxtext/configs/base.yml base_output_directory=gs://runner-maxtext-logs run_name=${RUN_NAME} model_name=mixtral-8x7b tokenizer_path=assets/tokenizer.mistral-v1 dataset_path=gs://maxtext-dataset per_device_batch_size=4 enable_checkpointing=false ici_fsdp_parallelism=-1 max_target_length=1024 async_checkpointing=false attention=flash dtype=bfloat16 weight_dtype=bfloat16"
3737
)
3838

3939
test_models_tpu = {

dags/examples/maxtext_profile_sweep_example_dag.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def dict_to_arg(param_dict):
4545
"cluster": XpkClusters.TPU_V6E_256_MLPERF_CLUSTER,
4646
"train_command": [
4747
f"export BASE_OUTPUT_PATH={BASE_OUTPUT_PATH} && "
48-
"python3 -m MaxText.train MaxText/configs/base.yml base_output_directory=${BASE_OUTPUT_PATH} model_name=mixtral-8x7b "
48+
"python3 -m MaxText.train src/maxtext/configs/base.yml base_output_directory=${BASE_OUTPUT_PATH} model_name=mixtral-8x7b "
4949
# add profiler config: ensure steps > skip_first_n_steps_for_profiler + profiler_steps
5050
"steps=10 profiler=xplane skip_first_n_steps_for_profiler=5 profiler_steps=3 "
5151
+ dict_to_arg({
@@ -81,7 +81,7 @@ def dict_to_arg(param_dict):
8181
"base_output_directory": "gs://runner-maxtext-logs",
8282
"train_command": [
8383
f"export BASE_OUTPUT_PATH={BASE_OUTPUT_PATH} && "
84-
"python3 -m MaxText.train MaxText/configs/base.yml base_output_directory=${BASE_OUTPUT_PATH} model_name=mixtral-8x7b "
84+
"python3 -m MaxText.train src/maxtext/configs/base.yml base_output_directory=${BASE_OUTPUT_PATH} model_name=mixtral-8x7b "
8585
# add profiler config: ensure steps > skip_first_n_steps_for_profiler + profiler_steps
8686
"steps=10 profiler=xplane skip_first_n_steps_for_profiler=5 profiler_steps=3 "
8787
+ dict_to_arg({

dags/examples/maxtext_sweep_gke_example_dag.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
# MaxText set up and run commands
3838
base_output_directory = "gs://maxtext-experiments-multipod"
3939
base_run_model_cmds = [
40-
f"python3 -m MaxText.train MaxText/configs/base.yml base_output_directory={base_output_directory} dataset_path=gs://max-datasets-rogue enable_checkpointing=false global_parameter_scale=16 steps=10",
40+
f"python3 -m MaxText.train src/maxtext/configs/base.yml base_output_directory={base_output_directory} dataset_path=gs://max-datasets-rogue enable_checkpointing=false global_parameter_scale=16 steps=10",
4141
]
4242

4343
# Get list of MaxText GKE XPK jobs

dags/inference/configs/jetstream_benchmark_serving_gce_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def get_config(
155155
f"export KV_QUANT_AXIS={model_configs['kv_quant_axis']}",
156156
# Start JetStream MaxText server in the background
157157
"""python3 -m MaxText.maxengine_server \
158-
MaxText/configs/inference_jetstream.yml \
158+
src/maxtext/configs/inference/inference_jetstream.yml \
159159
model_name=${MODEL_NAME} \
160160
tokenizer_path=${TOKENIZER_PATH} \
161161
weight_dtype=${WEIGHT_DTYPE} \

dags/inference/configs/maxtext_gpu_inference_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def get_maxtext_gpu_inference_config(
6363
"export XLA_PYTHON_CLIENT_MEM_FRACTION=0.94",
6464
"export PER_DEVICE_BATCH_SIZE=190",
6565
"export PYTHONPATH='/opt/maxtext:${PYTHONPATH:+:$PYTHONPATH}'",
66-
f"python3 -m MaxText.inference_microbenchmark MaxText/configs/base.yml base_output_directory=$BASE_OUTPUT_DIRECTORY model_name='llama2-70b' max_prefill_predict_length=1024 max_target_length=2048 attention=dot_product scan_layers=false hardware=gpu async_checkpointing=$ASYNC_CHECKPOINTING per_device_batch_size=$PER_DEVICE_BATCH_SIZE inference_microbenchmark_prefill_lengths=1024 inference_microbenchmark_stages=prefill,generate inference_microbenchmark_loop_iters=64 run_name=$(date +%Y-%m-%d-%H-%M) ici_fsdp_parallelism=1 ici_autoregressive_parallelism=1 ici_tensor_parallelism=-1 weight_dtype=bfloat16 kv_quant_dtype=fp8 quantize_kvcache=True quantization=aqt_fp8 > output.txt",
66+
f"python3 -m MaxText.inference_microbenchmark src/maxtext/configs/base.yml base_output_directory=$BASE_OUTPUT_DIRECTORY model_name='llama2-70b' max_prefill_predict_length=1024 max_target_length=2048 attention=dot_product scan_layers=false hardware=gpu async_checkpointing=$ASYNC_CHECKPOINTING per_device_batch_size=$PER_DEVICE_BATCH_SIZE inference_microbenchmark_prefill_lengths=1024 inference_microbenchmark_stages=prefill,generate inference_microbenchmark_loop_iters=64 run_name=$(date +%Y-%m-%d-%H-%M) ici_fsdp_parallelism=1 ici_autoregressive_parallelism=1 ici_tensor_parallelism=-1 weight_dtype=bfloat16 kv_quant_dtype=fp8 quantize_kvcache=True quantization=aqt_fp8 > output.txt",
6767
"wget https://raw.githubusercontent.com/GoogleCloudPlatform/ml-auto-solutions/refs/heads/master/dags/inference/utils/maxtext_gpu_microbenchmark_jsonl_converter.py",
6868
f"python maxtext_gpu_microbenchmark_jsonl_converter.py {jsonl_output_path}",
6969
)

dags/inference/configs/maxtext_inference_microbenchmark_gce_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def config(
8888
# Configure flags
8989
"export XLA_FLAGS='--xla_disable_hlo_passes=rematerialization'",
9090
f"""python3 -m MaxText.inference_microbenchmark_sweep \
91-
MaxText/configs/base.yml \
91+
src/maxtext/configs/base.yml \
9292
model_name={model_configs['model_name']} \
9393
tokenizer_path=assets/{model_configs['tokenizer']} \
9494
weight_dtype={model_configs['weight_dtype']} \

dags/multipod/configs/gke_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def get_gke_maxtext_nightly_config(
113113
(
114114
"JAX_PLATFORM_NAME=TPU XLA_FLAGS='--xla_dump_to=/tmp/xla_dump/'"
115115
" ENABLE_PJRT_COMPATIBILITY=true"
116-
f" python3 -m MaxText.train MaxText/configs/base.yml run_name={run_name}"
116+
f" python3 -m MaxText.train src/maxtext/configs/base.yml run_name={run_name}"
117117
f" base_output_directory={base_output_directory}"
118118
" dataset_path=gs://max-datasets-rogue dataset_type=synthetic"
119119
" model_name=llama3-8b per_device_batch_size=12 reuse_example_batch=1 metrics_file='metrics.txt'"
@@ -213,7 +213,7 @@ def get_gke_gpt3_6b_nightly_config(
213213
(
214214
"JAX_PLATFORM_NAME=TPU XLA_FLAGS='--xla_dump_to=/tmp/xla_dump/'"
215215
" ENABLE_PJRT_COMPATIBILITY=true"
216-
f" python3 -m MaxText.train MaxText/configs/base.yml run_name={run_name} model_name=gpt3-6b"
216+
f" python3 -m MaxText.train src/maxtext/configs/base.yml run_name={run_name} model_name=gpt3-6b"
217217
f" base_output_directory={base_output_directory}"
218218
" dataset_path=gs://max-datasets-rogue dataset_type=synthetic"
219219
" per_device_batch_size=12 reuse_example_batch=1 global_parameter_scale=1 metrics_file='metrics.txt'"

dags/multipod/configs/maxtext_gce_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def get_maxtext_nightly_config(
6565
"cd /tmp/maxtext &&"
6666
" JAX_PLATFORM_NAME=TPU XLA_FLAGS='--xla_dump_to=/tmp/xla_dump/'"
6767
" ENABLE_PJRT_COMPATIBILITY=true"
68-
f" python3 -m MaxText.train MaxText/configs/base.yml run_name={run_name}"
68+
f" python3 -m MaxText.train src/maxtext/configs/base.yml run_name={run_name}"
6969
f" base_output_directory={base_output_directory}"
7070
" dataset_path=gs://max-datasets-rogue dataset_type=synthetic"
7171
" per_device_batch_size=12 reuse_example_batch=1 global_parameter_scale=1 metrics_file='metrics.txt'"

dags/multipod/maxtext_configs_aot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
output_path = "dummy-output-dir"
8080

8181
cmd = (
82-
f"bash src/MaxText/configs/{tpu}/{model_size}.sh "
82+
f"bash src/maxtext/configs/tpu/{tpu}/{model_size}.sh "
8383
"EXECUTABLE=train_compile "
8484
f"M_COMPILE_TOPOLOGY={tpu}-{num_cores} "
8585
f"M_COMPILE_TOPOLOGY_NUM_SLICES={n} "

0 commit comments

Comments
 (0)