MCPcopy Create free account
hub / github.com/OpenRL-Lab/Wandb_Tutorial / running_func

Function running_func

basic/test_multi_process.py:24–48  ·  view source on GitHub ↗
(args,start_step)

Source from the content-addressed store, hash-verified

22 return all_args
23
24def running_func(args,start_step):
25
26 all_args = parse(args)
27
28 random.seed(all_args.seed)
29
30 run_dir = Path("../results") / all_args.project_name / all_args.experiment_name
31 if not run_dir.exists():
32 os.makedirs(str(run_dir))
33
34 wandb.init(config=all_args,
35 project=all_args.project_name,
36 entity=all_args.team_name,
37 notes=socket.gethostname(),
38 name=all_args.experiment_name+"_"+str(all_args.seed),
39 group=all_args.scenario_name,
40 dir=str(run_dir),
41 job_type="training",
42 reinit=True)
43
44 total_step_num = 10
45 for step in range(total_step_num):
46 if step % 2 == start_step:
47 wandb.log({'log_curve': math.log(step+1)},step=step)
48 wandb.finish()
49
50def test_multi_process(args):
51 process = [Process(target=running_func, args=(args,0)),

Callers

nothing calls this directly

Calls 1

parseFunction · 0.70

Tested by

no test coverage detected