Skip to content

Commit fcb8d4d

Browse files
authored
Merge branch 'develop' into add_ut_requirement
2 parents 4ba65ce + 90bfa0b commit fcb8d4d

File tree

6 files changed

+31
-28
lines changed

6 files changed

+31
-28
lines changed

.github/workflows/_base_test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,7 @@ jobs:
118118
-v "${CACHE_DIR}/ConfigDir:/root/.config" \
119119
-e TZ="Asia/Shanghai" \
120120
--gpus '"device='"${DEVICES}"'"' ${docker_image} /bin/bash -xc '
121-
# python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
122-
python -m pip install paddlepaddle-gpu==3.0.0.dev20250729 -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
121+
python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
123122
124123
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
125124

.github/workflows/_logprob_test_linux.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ jobs:
111111
-v "${CACHE_DIR}/ConfigDir:/root/.config" \
112112
-e TZ="Asia/Shanghai" \
113113
--gpus '"device='"${DEVICES}"'"' ${docker_image} /bin/bash -xc '
114-
# python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
115-
python -m pip install paddlepaddle-gpu==3.0.0.dev20250729 -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
114+
python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
116115
117116
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
118117

.github/workflows/_pre_ce_test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ jobs:
9797
--gpus '"device='"${DEVICES}"'"' ${docker_image} /bin/bash -c '
9898
git config --global --add safe.directory /workspace/FastDeploy
9999
cd FastDeploy
100-
# python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
101-
python -m pip install paddlepaddle-gpu==3.0.0.dev20250729 -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
100+
python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
102101
python -m pip install ${fd_wheel_url}
103102
bash scripts/run_pre_ce.sh
104103
'

.github/workflows/_unit_test_coverage.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ jobs:
9393
9494
git config --global --add safe.directory /workspace/FastDeploy
9595
cd FastDeploy
96-
# python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
97-
python -m pip install paddlepaddle-gpu==3.0.0.dev20250729 -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
96+
python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
9897
9998
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
10099
python -m pip install -r scripts/unittest_requirement.txt

.github/workflows/ci.yml

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

fastdeploy/rl/rollout_model.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ def __init__(
8989
super(BaseRLModel, self).__init__()
9090
self.infer_to_train_mapping = {}
9191
self.fd_config = None
92+
self._mappings_built = False
9293

9394
@classmethod
9495
def name(cls) -> str:
@@ -145,6 +146,12 @@ def name(self) -> str:
145146

146147
def get_name_mappings_to_training(self, trainer_degree=None) -> Dict[str, str]:
147148
"""Generate mapping between inference and training parameter for RL(donot delete!)."""
149+
if self._mappings_built:
150+
return self.infer_to_train_mapping
151+
152+
self.infer_to_train_mapping = {}
153+
self._mappings_built = True
154+
148155
# Prepare placeholders
149156
place_holders = ["weight"]
150157

@@ -218,6 +225,11 @@ def name(self) -> str:
218225

219226
def get_name_mappings_to_training(self, trainer_degree=None) -> Dict[str, str]:
220227
"""Generate mapping between inference and training parameter for RL(donot delete!)."""
228+
if self._mappings_built:
229+
return self.infer_to_train_mapping
230+
231+
self.infer_to_train_mapping = {}
232+
self._mappings_built = True
221233
# Prepare placeholders
222234
place_holders = ["weight"]
223235

@@ -319,6 +331,11 @@ def name(self) -> str:
319331

320332
def get_name_mappings_to_training(self, trainer_degree=None) -> Dict[str, str]:
321333
"""Generate mapping between inference and training parameter for RL(donot delete!)."""
334+
if self._mappings_built:
335+
return self.infer_to_train_mapping
336+
337+
self.infer_to_train_mapping = {}
338+
self._mappings_built = True
322339
# Prepare placeholders
323340
place_holders = ["weight"]
324341

@@ -363,6 +380,11 @@ def name(self) -> str:
363380

364381
def get_name_mappings_to_training(self, trainer_degree=None) -> Dict[str, str]:
365382
"""Generate mapping between inference and training parameter for RL(donot delete!)."""
383+
if self._mappings_built:
384+
return self.infer_to_train_mapping
385+
386+
self.infer_to_train_mapping = {}
387+
self._mappings_built = True
366388
# Prepare placeholders
367389
place_holders = ["weight"]
368390

@@ -432,6 +454,11 @@ def name(self) -> str:
432454
return "Qwen3ForCausalLMRL"
433455

434456
def get_name_mappings_to_training(self, trainer_degree=None) -> Dict[str, str]:
457+
if self._mappings_built:
458+
return self.infer_to_train_mapping
459+
460+
self.infer_to_train_mapping = {}
461+
self._mappings_built = True
435462
# Prepare placeholders
436463
place_holders = ["weight"]
437464

0 commit comments

Comments
 (0)