diff --git a/src/dependencies/dockerfiles/maxtext_runner.Dockerfile b/src/dependencies/dockerfiles/maxtext_runner.Dockerfile index d85511c848..b45eda3a72 100644 --- a/src/dependencies/dockerfiles/maxtext_runner.Dockerfile +++ b/src/dependencies/dockerfiles/maxtext_runner.Dockerfile @@ -19,3 +19,4 @@ COPY ${PACKAGE_DIR}/maxtext/assets/ "${MAXTEXT_ASSETS_ROOT}" # Copy all files except assets from local workspace into docker container COPY --exclude=${PACKAGE_DIR}/maxtext/assets/ ${PACKAGE_DIR}/maxtext/ src/maxtext/ +COPY tests/ tests/ diff --git a/src/maxtext/utils/gcs_utils.py b/src/maxtext/utils/gcs_utils.py index ade7fb79ad..2287937ac8 100644 --- a/src/maxtext/utils/gcs_utils.py +++ b/src/maxtext/utils/gcs_utils.py @@ -291,7 +291,8 @@ def mkdir_and_check_permissions(path: str | epath.Path) -> epath.Path: if isinstance(path, str): path = epath.Path(path) - if path.as_posix().startswith("gs://"): + is_gcs = path.as_posix().startswith("gs://") + if is_gcs: if len(path.parts) < 3: raise ValueError(f"Invalid GCS path (missing bucket name): '{path}'") bucket_name = path.parts[2] @@ -301,7 +302,7 @@ def mkdir_and_check_permissions(path: str | epath.Path) -> epath.Path: except Exception as e: raise FileNotFoundError(f"GCS bucket 'gs://{bucket_name}' not found or accessible.") from e path.mkdir(exist_ok=True, parents=True) - if not path.exists(): + if not is_gcs and not path.exists(): raise PermissionError(f"Failed to create the directory '{path}'. Please check that you have write access.") # Verify write permissions by creating and deleting a temporary file. diff --git a/tests/end_to_end/tpu/gpt_oss/20b/test_gpt_oss_to_mt.sh b/tests/end_to_end/tpu/gpt_oss/20b/test_gpt_oss_to_mt.sh index e9667eaa91..654af108d4 100644 --- a/tests/end_to_end/tpu/gpt_oss/20b/test_gpt_oss_to_mt.sh +++ b/tests/end_to_end/tpu/gpt_oss/20b/test_gpt_oss_to_mt.sh @@ -20,7 +20,7 @@ run_id=${1:-$(date +%Y-%m-%d-%H-%M-%S)} MODEL_NAME='gpt-oss-20b' # Non-Googlers please remember to point BASE_OUTPUT_DIRECTORY to the GCS paths where you want to store scanned and unscanned checkpoints -BASE_OUTPUT_DIRECTORY=gs://runner-maxtext-logs/${MODEL_NAME}/to_maxtext +BASE_OUTPUT_DIRECTORY=${BASE_OUTPUT_DIRECTORY:-gs://runner-maxtext-logs/${MODEL_NAME}/to_maxtext} # Step 1: Install torch python3 -m pip install torch --index-url https://download.pytorch.org/whl/cpu @@ -74,6 +74,6 @@ python3 -m tests.utils.forward_pass_logit_checker \ dtype=float32 \ attention=dot_product \ --golden_logits_path=/tmp/golden_data_gpt-oss-20b.jsonl \ - --max_kl_div=1.0 \ + --max_kl_div=1.2 \ hardware=cpu \ skip_jax_distributed_system=True \ No newline at end of file