Skip to content

Commit 91b1043

Browse files
committed
fix: preserve public XPU and test entrypoints
1 parent 72b2454 commit 91b1043

62 files changed

Lines changed: 302 additions & 141 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CLAUDE.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,24 @@ models, and pre-converted checkpoints referenced by the selected configs first,
4646

4747
```bash
4848
# Run the default CI suite (all models in tests/llm_vlm/configs/)
49-
(cd tests/llm_vlm && python3 main.py)
49+
bash tests/llm_vlm/main_start.sh
5050
```
5151

5252
### Running a Single Model Test
5353

54-
Pass selection and execution options directly to `tests/llm_vlm/main.py`:
54+
Edit variables in `tests/llm_vlm/main_start.sh`:
5555
```bash
5656
# Run one model from tests/llm_vlm/configs/
57-
(cd tests/llm_vlm && python3 main.py --models qwen3_14b)
57+
model_names="qwen3_14b"
5858

5959
# Run one model from tests/llm_vlm/optional_configs/
60-
(cd tests/llm_vlm && python3 main.py --models deepseek_v2/deepseek_v2_lite --include_optional)
60+
model_names="deepseek_v2/deepseek_v2_lite"
61+
include_optional=true
6162

6263
# Run an entire model series from optional_configs/
63-
(cd tests/llm_vlm && python3 main.py --optional_subdir internvl2.5 --include_optional)
64+
model_names="NONE"
65+
optional_subdir="internvl2.5"
66+
include_optional=true
6467
```
6568

6669
Test configs: `tests/llm_vlm/configs/` (CI suite) and `tests/llm_vlm/optional_configs/` (regression, organized by model family). Each YAML defines model params and multi-step `scenarios` (checkpoint conversion + training).

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ See the full documentation for installation, tutorials, and advanced usage — [
7272

7373
**1. Install** — using **prebuilt Docker images** or **source build**:
7474
- **NVIDIA GPU**: [Installation Guide](https://loongforge.readthedocs.io/en/latest/get_started/installation.html)
75+
- **Kunlun XPU**: [Installation Guide](https://loongforge.readthedocs.io/en/latest/kunlun_tutorial/install_p800.html)
7576

7677
**2. Launch your first training run** — follow a tutorial for your target hardware and modality:
7778
- **NVIDIA GPU**: [LLM](https://loongforge.readthedocs.io/en/latest/llm_tutorial/quick_start_llm_pretrain.html) · [VLM](https://loongforge.readthedocs.io/en/latest/vlm_tutorial/quick_start_vlm_pretrain.html) · [VLA & WAM](https://loongforge.readthedocs.io/en/latest/embodied_tutorial/overview.html) · [Diffusion](https://loongforge.readthedocs.io/en/latest/wan_tutorial/quick_start_wan_training.html)
@@ -239,7 +240,7 @@ LoongForge/
239240
├── tools/ # Checkpoint conversion, data preprocessing
240241
├── ops/ # Custom fused operators (incl. open-sourced TileLang)
241242
├── patches/ # TransformerEngine patches
242-
├── docker/ # Dockerfile (GPU)
243+
├── docker/ # Dockerfiles (GPU & XPU)
243244
├── tests/ # E2E test suite (YAML-driven)
244245
└── docs/ # Documentation
245246
```

README_zh.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272

7373
**1. 安装** —— 可使用 **预构建镜像****源码构建**
7474
- **NVIDIA GPU**[安装指南](https://loongforge.readthedocs.io/zh-cn/latest/get_started/installation.html)
75+
- **昆仑芯 XPU**[安装指南](https://loongforge.readthedocs.io/zh-cn/latest/kunlun_tutorial/install_p800.html)
7576

7677
**2. 启动你的第一个训练任务** —— 根据目标硬件与模态选择教程:
7778
- **NVIDIA GPU**[LLM](https://loongforge.readthedocs.io/zh-cn/latest/llm_tutorial/quick_start_llm_pretrain.html) · [VLM](https://loongforge.readthedocs.io/zh-cn/latest/vlm_tutorial/quick_start_vlm_pretrain.html) · [VLA & WAM](https://loongforge.readthedocs.io/zh-cn/latest/embodied_tutorial/overview.html) · [Diffusion (WAN)](https://loongforge.readthedocs.io/zh-cn/latest/wan_tutorial/quick_start_wan_training.html)
@@ -238,7 +239,7 @@ LoongForge/
238239
├── tools/ # Checkpoint 转换、数据预处理
239240
├── ops/ # 自定义融合算子(含开源的 TileLang 版本)
240241
├── patches/ # TransformerEngine 补丁
241-
├── docker/ # Dockerfile(GPU)
242+
├── docker/ # Dockerfile(GPU & XPU
242243
├── tests/ # 端到端测试(YAML 驱动)
243244
└── docs/ # 文档
244245
```

ci/sensitive_rules.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@
207207
"as a path or symbol default, break external users.",
208208
"pattern": r"(?i)\bAIAK[-_](?:Training[-_](?:Omni|LLM)|Megatron)\b"
209209
r"|\bBaigeOmni\b"
210-
r"|\bLoongForge-VLA\b"
211210
r"|\baiak_training_omni\b"
212211
r"|\bset_aiak_\w+|\binitialize_baige_\w+|\bUSE_AIAK_\w+"
213212
r"|\baiak-ckpt\b",

docker/__init__.py

Lines changed: 0 additions & 2 deletions
This file was deleted.

docker/fix_xpytorch_hook.sh

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ else:
3030
for hook_file in hook_files:
3131
with open(hook_file, "r") as f:
3232
content = f.read()
33-
33+
3434
if "# patched: auto-detect pip isolated env" in content:
3535
print(f"[xpytorch] Already patched: {hook_file}")
3636
patched_count += 1
3737
continue
38-
38+
3939
# Fix 1: Add pip isolated environment detection at the beginning of _custom_import
4040
old_func_start = r"def _custom_import\(module_name, globals=None, locals=None, fromlist=\(\), level=0\):\n( *)global SYMBOL_REWRITE_REGISTER"
41-
41+
4242
def make_func_patch(m):
4343
indent = m.group(1)
4444
detection_code = (
@@ -51,18 +51,18 @@ else:
5151
+ detection_code +
5252
f"{indent}global SYMBOL_REWRITE_REGISTER"
5353
)
54-
54+
5555
content, count1 = re.subn(old_func_start, make_func_patch, content)
56-
56+
5757
# Fix 1 is critical, fail if not matched
5858
if count1 == 0:
5959
print(f"ERROR: Function pattern not found in {hook_file}", file=sys.stderr)
6060
print("This is a critical patch. Build cannot continue.", file=sys.stderr)
6161
sys.exit(1)
62-
62+
6363
# Fix 2: torch_version = version('torch') with fallback
6464
old_pattern2 = r"^( *)torch_version = version\('torch'\)"
65-
65+
6666
def make_patch2(m):
6767
indent = m.group(1)
6868
return (
@@ -74,12 +74,12 @@ else:
7474
f"{indent} except ImportError:\n"
7575
f"{indent} torch_version = \"0.0.0\" # patched fallback"
7676
)
77-
77+
7878
content, count2 = re.subn(old_pattern2, make_patch2, content, flags=re.MULTILINE)
79-
79+
8080
with open(hook_file, "w") as f:
8181
f.write(content)
82-
82+
8383
patched_count += 1
8484
print(f"[xpytorch] Patched: {hook_file} (func={count1}, version={count2})")
8585
@@ -103,31 +103,31 @@ else:
103103
for xray_file in xray_files:
104104
with open(xray_file, "r") as f:
105105
content = f.read()
106-
106+
107107
if "if spec is not None and spec.loader is not None:" in content:
108108
print(f"[xray] Already patched: {xray_file}")
109109
xray_patched_count += 1
110110
continue
111-
111+
112112
old_pattern = r"^( *)spec\.loader = XrayMetaPathLoader\(spec\.loader\)"
113-
113+
114114
def make_xray_patch(m):
115115
indent = m.group(1)
116116
return (
117117
f"{indent}if spec is not None and spec.loader is not None:\n"
118118
f"{indent} spec.loader = XrayMetaPathLoader(spec.loader)"
119119
)
120-
120+
121121
content, count = re.subn(old_pattern, make_xray_patch, content, flags=re.MULTILINE)
122-
122+
123123
if count == 0:
124124
print(f"ERROR: Pattern not found in {xray_file}", file=sys.stderr)
125125
print("This is a critical patch. Build cannot continue.", file=sys.stderr)
126126
sys.exit(1)
127-
127+
128128
with open(xray_file, "w") as f:
129129
f.write(content)
130-
130+
131131
xray_patched_count += 1
132132
print(f"[xray] Patched: {xray_file}")
133133

docs/source/embodied_tutorial/eval_docs/benchmark_envs.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Benchmark Environments
22

3-
This document records the benchmark runtime environments used by the LoongForge eval module under `loongforge/embodied/eval`.
3+
This document records the benchmark runtime environments used by the LoongForge-VLA eval module under `loongforge/embodied/eval`.
44

55
**For installation, follow the official benchmark homepages** — each benchmark page links to its official repository. This document is not an install guide; it records the dependency versions of the environments currently used by the eval module, so they can be compared / reproduced when debugging.
66

@@ -205,4 +205,3 @@ Used by:
205205
```text
206206
examples/embodied/pi05/eval/configs/maniskill/*.yaml
207207
```
208-

docs/source/embodied_tutorial/eval_docs/benchmarks/calvin.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ The evaluation needs the original-format CALVIN validation assets, not just a Le
3333
Run from inside the **benchmark** environment. The run scripts and eval YAMLs ship with `/path/to/...` placeholders — fill them in before running:
3434

3535
```bash
36-
cd /path/to/LoongForge
36+
cd /path/to/LoongForge-VLA
3737
examples/embodied/pi05/eval/run_calvin_eval.sh # pi05 (connectivity only)
3838
examples/embodied/xvla/eval/run_calvin_eval.sh # xvla (connectivity only)
3939
```

docs/source/embodied_tutorial/eval_docs/benchmarks/libero.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ The benchmark dataset is downloaded following the official LIBERO data instructi
3636
Run from inside the **benchmark** environment. The run scripts and eval YAMLs ship with `/path/to/...` placeholders — fill them in before running:
3737

3838
```bash
39-
cd /path/to/LoongForge
39+
cd /path/to/LoongForge-VLA
4040

4141
# pi05
4242
examples/embodied/pi05/eval/run_libero_eval.sh
@@ -53,7 +53,7 @@ Environment variables:
5353
| Variable | Meaning | Default |
5454
|---|---|---|
5555
| `CONFIG` | eval YAML config path | `<model>/eval/configs/libero/object_smoke.yaml` (xvla: `libero_weight_object_smoke.yaml`) |
56-
| `REPO_ROOT` | LoongForge repo root | `/path/to/LoongForge` |
56+
| `REPO_ROOT` | LoongForge-VLA repo root | `/path/to/LoongForge-VLA` |
5757
| `BENCHMARK_PYTHON` | LIBERO env interpreter | `/path/to/libero/bin/python` |
5858
| `CUDA_VISIBLE_DEVICES` | GPU id for the policy server | `0` |
5959
| `MUJOCO_GL` / `PYOPENGL_PLATFORM` | MuJoCo offscreen GL backend | `osmesa` |

docs/source/embodied_tutorial/eval_docs/benchmarks/maniskill.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pip install websockets msgpack pyyaml
3232
Run from inside the **benchmark** environment. The run scripts and eval YAMLs ship with `/path/to/...` placeholders — fill them in before running:
3333

3434
```bash
35-
cd /path/to/LoongForge
35+
cd /path/to/LoongForge-VLA
3636
examples/embodied/pi05/eval/run_maniskill_eval.sh # pi05 (connectivity only)
3737
examples/embodied/xvla/eval/run_maniskill_eval.sh # xvla (connectivity only)
3838
```

0 commit comments

Comments
 (0)