Skip to content

Commit 2b62964

Browse files
committed
Revert "create tasks"
This reverts commit e854ddd.
1 parent de3b41d commit 2b62964

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/forge/actors/generator.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -294,13 +294,10 @@ def split_keys(keys):
294294

295295
futures = []
296296
for i, names in enumerate(split_keys(hf_param_names)):
297-
298-
async def _fetch():
299-
await self.weight_fetchers.slice(procs=i).fetch.call_one(
300-
version=version, param_names=names
301-
)
302-
303-
futures.append(asyncio.create_task(_fetch()))
297+
fut = self.weight_fetchers.slice(procs=i).fetch.call_one(
298+
version=version, param_names=names
299+
)
300+
futures.append(fut)
304301

305302
sub_state_dicts = [await fut for fut in futures]
306303

0 commit comments

Comments
 (0)