MCPcopy Create free account
hub / github.com/BeastyZ/ConvSearch-R1 / process_one_shard

Function process_one_shard

verl/scripts/model_merger.py:85–89  ·  view source on GitHub ↗
(rank)

Source from the content-addressed store, hash-verified

83 model_state_dict_lst.extend([""] * (total_shards - 1))
84
85 def process_one_shard(rank):
86 model_path = os.path.join(local_dir, f'model_world_size_{world_size}_rank_{rank}.pt')
87 state_dict = torch.load(model_path, map_location='cpu', weights_only=False)
88 model_state_dict_lst[rank] = state_dict
89 return state_dict
90
91 with ThreadPoolExecutor(max_workers=min(32, os.cpu_count())) as executor:
92 for rank in range(1, total_shards):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected