MCPcopy Create free account
hub / github.com/eric-mitchell/direct-preference-optimization / rank0_print

Function rank0_print

utils.py:40–43  ·  view source on GitHub ↗

Print, but only on rank 0.

(*args, **kwargs)

Source from the content-addressed store, hash-verified

38
39
40def rank0_print(*args, **kwargs):
41 """Print, but only on rank 0."""
42 if not dist.is_initialized() or dist.get_rank() == 0:
43 print(*args, **kwargs)
44
45
46def get_local_dir(prefixes_to_resolve: List[str]) -> str:

Callers 5

__init__Method · 0.90
trainMethod · 0.90
write_state_dictMethod · 0.90
__init__Method · 0.90
__init__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected