MCPcopy
hub / github.com/hustvl/Vim / _setup_gpu_args

Method _setup_gpu_args

vim/run_with_submitit.py:70–79  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

68 return submitit.helpers.DelayedSubmission(empty_trainer)
69
70 def _setup_gpu_args(self):
71 import submitit
72 from pathlib import Path
73
74 job_env = submitit.JobEnvironment()
75 self.args.output_dir = Path(str(self.args.output_dir).replace("%j", str(job_env.job_id)))
76 self.args.gpu = job_env.local_rank
77 self.args.rank = job_env.global_rank
78 self.args.world_size = job_env.num_tasks
79 print(f"Process group: {job_env.num_tasks} tasks, rank: {job_env.global_rank}")
80
81
82def main():

Callers 1

__call__Method · 0.95

Calls 1

printFunction · 0.85

Tested by

no test coverage detected