def format_eval_filename(
    task, seed, num_eval_episodes, loaded_ckpt, collapse_in_eval,
    stop_if_stuck, eval_id):
  """Add evaluation settings to output file name."""
  collapse_str = 'c' if collapse_in_eval else ''
  stuck_str = 's' if stop_if_stuck else ''
  if loaded_ckpt and str(loaded_ckpt)[0] != '_':
    loaded_ckpt = '_' + str(loaded_ckpt)
  filename = (
      f'{task}_s{seed}_e{num_eval_episodes}{loaded_ckpt}{collapse_str}'
      f'{stuck_str}')
  if eval_id:
    filename += '_' + eval_id
  return filename