MCPcopy
hub / github.com/zju3dv/4K4D / launcher

Function launcher

easyvolcap/scripts/main.py:33–55  ·  view source on GitHub ↗
(runner_function: Callable,  # viewer.run or runner.train or runner.test
             runner_object: "VolumetricVideoRunner" = None,
             exp_name='nerft',
             detect_anomaly: bool = False,
             profiler_cfg: dotdict = dotdict(),  # for debug use only

             *args,
             **kwargs
             )

Source from the content-addressed store, hash-verified

31
32
33def launcher(runner_function: Callable, # viewer.run or runner.train or runner.test
34 runner_object: "VolumetricVideoRunner" = None,
35 exp_name='nerft',
36 detect_anomaly: bool = False,
37 profiler_cfg: dotdict = dotdict(), # for debug use only
38
39 *args,
40 **kwargs
41 ):
42
43 # Perform the actual training
44 setup_profiler(**profiler_cfg) # MARK: overwritting default configs
45 prev_anomaly = torch.is_anomaly_enabled()
46 torch.set_anomaly_enabled(detect_anomaly)
47 profiler_start() # already setup
48
49 # Give the user some time to save states
50 log('Launching runner for experiment:', magenta(exp_name))
51 cfg.runner = runner_object # holds a global reference for hacky usage # MARK: GLOBAL
52 runner_function()
53
54 profiler_stop() # already setup
55 torch.set_anomaly_enabled(prev_anomaly)
56
57
58def preflight(

Callers 3

guiFunction · 0.85
testFunction · 0.85
trainFunction · 0.85

Calls 6

dotdictClass · 0.90
setup_profilerFunction · 0.90
profiler_startFunction · 0.90
profiler_stopFunction · 0.90
magentaFunction · 0.85
logFunction · 0.50

Tested by

no test coverage detected