Skip to content

Commit

Permalink
chore: remove print statements
Browse files Browse the repository at this point in the history
  • Loading branch information
EdanToledo committed Aug 15, 2024
1 parent cb0e6b5 commit 07590df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion stoix/evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 3 additions & 5 deletions stoix/systems/ppo/sebulba/ff_ppo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 07590df

Please sign in to comment.