MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / create_deepspeed_args

Function create_deepspeed_args

tests/unit/simple_model.py:275–283  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

273
274
275def create_deepspeed_args():
276 parser = argparse.ArgumentParser()
277 args = parser.parse_args(args='')
278 args.deepspeed = True
279 if dist.is_initialized():
280 # We assume up to one full node executing unit tests
281 assert dist.get_world_size() <= get_accelerator().device_count()
282 args.local_rank = dist.get_rank()
283 return args
284
285
286def args_from_dict(tmpdir, config_dict):

Callers 1

args_from_dictFunction · 0.85

Calls 5

get_acceleratorFunction · 0.90
get_world_sizeMethod · 0.80
is_initializedMethod · 0.45
device_countMethod · 0.45
get_rankMethod · 0.45

Tested by

no test coverage detected