(args)
| 253 | |
| 254 | |
| 255 | def main(args): |
| 256 | if args.dlc: |
| 257 | rank, current_time = setup_dlc() |
| 258 | else: |
| 259 | rank, current_time = 0, time.time() |
| 260 | config_path = prepare_configs(args, rank, current_time) |
| 261 | cmd_list = [ |
| 262 | sys.executable, |
| 263 | "-m", |
| 264 | "trinity.cli.launcher", |
| 265 | "run", |
| 266 | "--config", |
| 267 | config_path, |
| 268 | ] |
| 269 | if args.dlc: |
| 270 | dist.barrier() |
| 271 | dist.destroy_process_group() |
| 272 | cmd_list.append("--dlc") |
| 273 | |
| 274 | # load plugins |
| 275 | base_path = os.path.dirname(os.path.abspath(__file__)) |
| 276 | plugin_dir = os.path.join(base_path, "plugins", args.dataset) |
| 277 | if os.path.exists(plugin_dir): |
| 278 | cmd_list.append("--plugin-dir") |
| 279 | cmd_list.append(plugin_dir) |
| 280 | |
| 281 | # run command |
| 282 | subprocess.run(cmd_list, check=True) |
| 283 | |
| 284 | |
| 285 | if __name__ == "__main__": |
no test coverage detected