File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -270,16 +270,15 @@ def split_keys(keys):
270270 return [keys [i ::n_fetchers ] for i in range (n_fetchers )]
271271
272272 futures = []
273- async with asyncio .TaskGroup () as tg :
274- for i , names in enumerate (split_keys (hf_param_names )):
273+ for i , names in enumerate (split_keys (hf_param_names )):
275274
276- async def fetch_coro ():
277- return self .weight_fetchers .slice (procs = i ).fetch .call_one (
278- version = version , param_names = names
279- )
275+ async def fetch_coro ():
276+ return self .weight_fetchers .slice (procs = i ).fetch .call_one (
277+ version = version , param_names = names
278+ )
280279
281- fut = tg .create_task (fetch_coro ())
282- futures .append (fut )
280+ fut = asyncio .create_task (fetch_coro ())
281+ futures .append (fut )
283282
284283 sub_state_dicts = [await fut for fut in futures ]
285284
You can’t perform that action at this time.
0 commit comments