Function
run_trainer
(config: Config, stop_event=None)
Source from the content-addressed store, hash-verified
| 561 | |
| 562 | |
| 563 | def run_trainer(config: Config, stop_event=None) -> None: |
| 564 | ray.init( |
| 565 | namespace=config.ray_namespace, |
| 566 | runtime_env={ |
| 567 | "env_vars": { |
| 568 | LOG_DIR_ENV_VAR: config.log.save_dir, |
| 569 | LOG_LEVEL_ENV_VAR: "INFO", |
| 570 | } |
| 571 | }, |
| 572 | ) |
| 573 | try: |
| 574 | train(config) |
| 575 | finally: |
| 576 | if stop_event: |
| 577 | stop_event.set() |
| 578 | ray.shutdown() |
| 579 | |
| 580 | |
| 581 | def run_explorer(config: Config, stop_event=None) -> None: |
Callers
nothing calls this directly
Tested by
no test coverage detected