From 07590dfcbb12bba4c56929405fa3a002481708ab Mon Sep 17 00:00:00 2001 From: EdanToledo Date: Thu, 15 Aug 2024 20:30:17 +0000 Subject: [PATCH] chore: remove print statements --- stoix/evaluator.py | 2 +- stoix/systems/ppo/sebulba/ff_ppo.py | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/stoix/evaluator.py b/stoix/evaluator.py index a31ccfc..0fdb129 100644 --- a/stoix/evaluator.py +++ b/stoix/evaluator.py @@ -395,7 +395,7 @@ def get_sebulba_eval_fn( # Warnings if num eval episodes is not divisible by num parallel envs. if eval_episodes % n_parallel_envs != 0: print( - f"{Fore.YELLOW}{Style.BRIGHT} Number of evaluation episodes ({eval_episodes}) is not divisible by `num_envs`. Some extra evaluations will be executed. New number of evaluation episodes = {episode_loops * n_parallel_envs}{Style.RESET_ALL}" + f"{Fore.YELLOW}{Style.BRIGHT}Number of evaluation episodes ({eval_episodes}) is not divisible by `num_envs`. Some extra evaluations will be executed. New number of evaluation episodes = {episode_loops * n_parallel_envs}{Style.RESET_ALL}" ) def eval_fn(params: FrozenDict, key: chex.PRNGKey) -> Dict: diff --git a/stoix/systems/ppo/sebulba/ff_ppo.py b/stoix/systems/ppo/sebulba/ff_ppo.py index 0b999ae..f1d62a2 100644 --- a/stoix/systems/ppo/sebulba/ff_ppo.py +++ b/stoix/systems/ppo/sebulba/ff_ppo.py @@ -797,18 +797,16 @@ def run_experiment(_config: DictConfig) -> float: # Now we stop the actors and params sources for actor in actor_threads: actor.join() - print(f"{Fore.CYAN}{Style.BRIGHT}All actors stopped{Style.RESET_ALL}") - - print(f"{Fore.CYAN}{Style.BRIGHT}Learner stopped{Style.RESET_ALL}") + # Stop the pipeline pipeline_lifetime.stop() pipeline.join() - print(f"{Fore.CYAN}{Style.BRIGHT}Pipeline stopped{Style.RESET_ALL}") + # Stop the params sources params_sources_lifetime.stop() for param_source in params_sources: param_source.join() - print(f"{Fore.CYAN}{Style.BRIGHT}Params sources stopped{Style.RESET_ALL}") + # Measure absolute metric. if config.arch.absolute_metric: abs_metric_evaluator, abs_metric_evaluator_envs = get_sebulba_eval_fn(