MCPcopy
hub / github.com/deepspeedai/DeepSpeed / create_deepspeed_args

Function create_deepspeed_args

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

Source from the content-addressed store, hash-verified

296
297
298def create_deepspeed_args():
299 parser = argparse.ArgumentParser()
300 args = parser.parse_args(args='')
301 args.deepspeed = True
302 if dist.is_initialized():
303 # We assume up to one full node executing unit tests
304 assert dist.get_world_size() <= get_accelerator().device_count()
305 args.local_rank = dist.get_rank()
306 return args
307
308
309def 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…