File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 1212# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313# See the License for the specific language governing permissions and
1414# limitations under the License.
15-
15+ import os
1616import tempfile
1717import unittest
1818from unittest .mock import Mock , patch
@@ -60,7 +60,8 @@ def setUp(self):
6060 self .device = torch .device ("cuda" if torch .cuda .is_available () else "cpu" )
6161 self .temp_dir = tempfile .mkdtemp ()
6262
63- config = AutoConfig .from_pretrained ("Qwen/Qwen2.5-0.5B-Instruct" )
63+ model_path = os .path .expanduser ("~/models/Qwen/Qwen2.5-0.5B-Instruct" )
64+ config = AutoConfig .from_pretrained (model_path )
6465 config .save_pretrained (self .temp_dir )
6566
6667 self .config = FSDPCriticConfig (
@@ -76,8 +77,8 @@ def setUp(self):
7677 rollout_n = 1 ,
7778 optim = FSDPOptimizerConfig (lr = 1e-6 ),
7879 model = FSDPCriticModelCfg (
79- path = "Qwen/Qwen2.5-0.5B-Instruct" ,
80- tokenizer_path = "Qwen/Qwen2.5-0.5B-Instruct" ,
80+ path = model_path ,
81+ tokenizer_path = model_path ,
8182 fsdp_config = FSDPEngineConfig (fsdp_size = - 1 ),
8283 use_remove_padding = False ,
8384 ),
Original file line number Diff line number Diff line change @@ -25,9 +25,11 @@ def test_actor_rollout_ref_worker_actor_ref_model():
2525 os .environ ["MASTER_ADDR" ] = "127.0.0.1"
2626 os .environ ["MASTER_PORT" ] = "8888"
2727
28- config_str = """
28+ actor_model_path = os .path .expanduser ("~/models/Qwen/Qwen2.5-0.5B-Instruct" )
29+ ref_model_path = os .path .expanduser ("~/models/Qwen/Qwen2.5-1.5B-Instruct" )
30+ config_str = f"""
2931 model:
30- path: Qwen/Qwen2.5-0.5B-Instruct
32+ path: { actor_model_path }
3133 actor:
3234 _target_: verl.workers.config.FSDPActorConfig
3335 strategy: fsdp
@@ -45,7 +47,7 @@ def test_actor_rollout_ref_worker_actor_ref_model():
4547 stack_depth: 32
4648 ref:
4749 model:
48- path: Qwen/Qwen2.5-1.5B-Instruct
50+ path: { ref_model_path }
4951 fsdp_config:
5052 _target_: verl.workers.config.FSDPEngineConfig
5153 fsdp_size: -1
You can’t perform that action at this time.
0 commit comments