(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
)
| 31 | |
| 32 | |
| 33 | def 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 | |
| 58 | def preflight( |
no test coverage detected