Skip to content
Open
Changes from all 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
20 changes: 15 additions & 5 deletions tests/e2e/ckpt/test_glm47_flash_ckpt.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os

import torch
from tests.ci.ci_register import register_cuda_ci

import miles.utils.external_utils.command_utils as U
Expand All @@ -10,7 +11,10 @@
ENABLE_EVAL = 0
USE_DEEPEP = 0

TIGHT_HOST_MEMORY = bool(int(os.environ.get("MILES_TEST_TIGHT_HOST_MEMORY", "0")))
ENABLE_EVAL = bool(int(os.environ.get("MILES_TEST_ENABLE_EVAL", "1")))
TIGHT_HOST_MEMORY = bool(int(os.environ.get("MILES_TEST_TIGHT_HOST_MEMORY", "1")))
USE_DEEPEP = bool(int(os.environ.get("MILES_TEST_USE_DEEPEP", "0")))
Comment on lines +14 to +16

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The variables ENABLE_EVAL and USE_DEEPEP are redefined here using environment variables, but their initial static assignments (ENABLE_EVAL = 0 and USE_DEEPEP = 0 on lines 11 and 12) were not removed. This results in redundant assignments and dead code. Please remove the initial assignments on lines 11 and 12.

IS_ROCM = torch.version.hip is not None

MODEL_NAME = "GLM-4.7-Flash"
MODEL_TYPE = "glm4.7-flash"
Expand Down Expand Up @@ -141,6 +145,8 @@ def execute(mode: str = "", ckpt_step: int | None = None):
ci_args += "--ci-save-model-hash "
if mode == "load":
ci_args += "--ci-check-model-hash "
if IS_ROCM:
ci_args += "--ci-disable-logprobs-checker "

misc_args = (
"--attention-dropout 0.0 "
Expand Down Expand Up @@ -172,14 +178,18 @@ def execute(mode: str = "", ckpt_step: int | None = None):
f"{misc_args} "
)

extra_env_vars = {
"MILES_EXPERIMENTAL_ROLLOUT_REFACTOR": "1",
"MILES_TEST_R3_THRESHOLD": "1.0",
}
if IS_ROCM:
extra_env_vars["SGLANG_USE_AITER"] = "0"

U.execute_train(
train_args=train_args,
num_gpus_per_node=NUM_GPUS,
megatron_model_type=MODEL_TYPE,
extra_env_vars={
"MILES_EXPERIMENTAL_ROLLOUT_REFACTOR": "1",
"MILES_TEST_R3_THRESHOLD": "1.0",
},
extra_env_vars=extra_env_vars,
)


Expand Down