From 4804b0563722295ebebb16300720c68f4f998aa7 Mon Sep 17 00:00:00 2001 From: Wei Fu <36355462+garrett4wade@users.noreply.github.com> Date: Mon, 21 Jul 2025 12:57:50 +0800 Subject: [PATCH] [Refactor] Rename files in arealite before release. (#190) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * PullRequest: 353 [Lite] Add gradient checkpointing to FSDPEngine Merge branch mzy/add-gradient-ckpt of git@code.alipay.com:inclusionAI/AReaL.git into lite https://code.alipay.com/inclusionAI/AReaL/pull_requests/353 Reviewed-by: 博惟 * add gradient checkpointing * PullRequest: 354 [lite] GRPO pre-commit: minor changes in FSDP engine Merge branch fw/lite-fix1 of git@code.alipay.com:inclusionAI/AReaL.git into lite https://code.alipay.com/inclusionAI/AReaL/pull_requests/354 Reviewed-by: 晓雷 * . * . * . * . * PullRequest: 355 [Lite] GRPO pre-commit 2: Refactor RemoteSGLangEngine thread and SGLang configuration Merge branch fw/lite-fix1 of git@code.alipay.com:inclusionAI/AReaL.git into lite https://code.alipay.com/inclusionAI/AReaL/pull_requests/355?tab=commit Reviewed-by: 晓雷 * . * . * . * . * . * . * fix * . * PullRequest: 357 [lite] GRPO pre-commit 3: Fix typos and experiment utilities Merge branch fw/lite-fix2 of git@code.alipay.com:inclusionAI/AReaL.git into lite https://code.alipay.com/inclusionAI/AReaL/pull_requests/357?tab=comment Reviewed-by: 晓雷 * . * . * . * . * . * fix destroy process group * PullRequest: 358 [lite] Support GRPO training locally with the GSM8k dataset Merge branch fw/lite-fix3 of git@code.alipay.com:inclusionAI/AReaL.git into lite https://code.alipay.com/inclusionAI/AReaL/pull_requests/358 Reviewed-by: 晓雷 * . * . * . * . * fix loss mask * fix * . * PullRequest: 368 [lite] Refactor train engine after merging contributions from GitHub Merge branch fw/lite-train-engine of git@code.alipay.com:inclusionAI/AReaL.git into lite https://code.alipay.com/inclusionAI/AReaL/pull_requests/368 Reviewed-by: 晓雷 * . * . * PullRequest: 371 [lite] [fix] fix misc bugs in GRPO implementation Merge branch fw/lite-fix0716 of git@code.alipay.com:inclusionAI/AReaL.git into lite https://code.alipay.com/inclusionAI/AReaL/pull_requests/371 Reviewed-by: 晓雷 * . * PullRequest: 370 [lite] Add Slurm Launcher and Ray Launcher Merge branch mzy/lite/launcher of git@code.alipay.com:inclusionAI/AReaL.git into lite https://code.alipay.com/inclusionAI/AReaL/pull_requests/370 Reviewed-by: 博惟 * . * . * . * fix * PullRequest: 392 [lite] Fix several bugs regarding RL learning and add an example to reproduce boba-math results. Merge branch fw/lite-boba of git@code.alipay.com:inclusionAI/AReaL.git into lite https://code.alipay.com/inclusionAI/AReaL/pull_requests/392 Reviewed-by: 晓雷 * support fsdp engine and sglang remote engine * minor fix * . * refactor trainer * add close * rm mb_spec * . * fix * . * qwen2 grpo works * fix * fix * async works * fix * slurm launcher not tested * fix arg parse * . * sglang server wrapper * . * . * slurm run * ready for boba * debug * 32k run * . * . * fix * . * . * . * . * . * fix * . * fix * . * . * . * . * fix * . * . * . * . * . * . * . * refactor train engine * refactor train engine * . * fix update weight error * . * . * match train * format * . * fix * seems to work * . * . * . * . * format * format * . * rename * rename --------- Co-authored-by: 晓雷 --- arealite/env/__init__.py | 0 arealite/{engine => experimental}/autotp_engine.py | 0 arealite/{engine => experimental}/sglang_engine.py | 0 arealite/{ => experimental}/tests/test_sglang_local_engine.py | 2 +- arealite/reward/__init__.py | 0 arealite/tests/test_train_engine.py | 4 ++-- 6 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 arealite/env/__init__.py rename arealite/{engine => experimental}/autotp_engine.py (100%) rename arealite/{engine => experimental}/sglang_engine.py (100%) rename arealite/{ => experimental}/tests/test_sglang_local_engine.py (98%) delete mode 100644 arealite/reward/__init__.py diff --git a/arealite/env/__init__.py b/arealite/env/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/arealite/engine/autotp_engine.py b/arealite/experimental/autotp_engine.py similarity index 100% rename from arealite/engine/autotp_engine.py rename to arealite/experimental/autotp_engine.py diff --git a/arealite/engine/sglang_engine.py b/arealite/experimental/sglang_engine.py similarity index 100% rename from arealite/engine/sglang_engine.py rename to arealite/experimental/sglang_engine.py diff --git a/arealite/tests/test_sglang_local_engine.py b/arealite/experimental/tests/test_sglang_local_engine.py similarity index 98% rename from arealite/tests/test_sglang_local_engine.py rename to arealite/experimental/tests/test_sglang_local_engine.py index faebc7a..be20655 100644 --- a/arealite/tests/test_sglang_local_engine.py +++ b/arealite/experimental/tests/test_sglang_local_engine.py @@ -23,7 +23,7 @@ from arealite.api.cli_args import ( SGLangConfig, ) from arealite.api.io_struct import LLMRequest, LLMResponse -from arealite.engine.sglang_engine import SGLangEngine +from arealite.experimental.sglang_engine import SGLangEngine from arealite.workflow.rlvr import RLVRWorkflow from realhf.api.core.data_api import load_hf_tokenizer from realhf.base import seeding diff --git a/arealite/reward/__init__.py b/arealite/reward/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/arealite/tests/test_train_engine.py b/arealite/tests/test_train_engine.py index 9c208b0..a99e3c7 100644 --- a/arealite/tests/test_train_engine.py +++ b/arealite/tests/test_train_engine.py @@ -52,8 +52,8 @@ def mock_input( def get_engine(engine_type: str, model_path: str): - from arealite.engine.autotp_engine import DeepSpeedAutoTPEngine from arealite.engine.fsdp_engine import FSDPEngine + from arealite.experimental.autotp_engine import DeepSpeedAutoTPEngine engine_cls = {"auto_tp": DeepSpeedAutoTPEngine, "fsdp": FSDPEngine}[engine_type] @@ -135,7 +135,7 @@ def test_train_batch(engine, mock_input): @torch.no_grad() def test_hf_save_load_weights(tmp_path_factory, engine, mock_input): - from arealite.engine.autotp_engine import DeepSpeedAutoTPEngine + from arealite.experimental.autotp_engine import DeepSpeedAutoTPEngine if isinstance(engine, DeepSpeedAutoTPEngine): print("AutoTP engine does not support HF save/load for now.")