MCPcopy Create free account
hub / github.com/agentscope-ai/Trinity-RFT / run_trainer

Function run_trainer

tests/trainer/trainer_test.py:563–578  ·  view source on GitHub ↗
(config: Config, stop_event=None)

Source from the content-addressed store, hash-verified

561
562
563def 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
581def run_explorer(config: Config, stop_event=None) -> None:

Callers

nothing calls this directly

Calls 3

trainFunction · 0.90
setMethod · 0.80
shutdownMethod · 0.45

Tested by

no test coverage detected