Exemple #1
0
def get_val_dir(train_dir: str, ds: str, iterations: Set[int], full_run: bool, entry_ids: Optional[Set[int]]):
  if len(iterations) > 3:
    its = ",".join(str(x) for x in sorted(iterations)[:3]) + ",..."
  else:
    its = ",".join(str(x) for x in sorted(iterations))

  subdir_name = f"{datetime.datetime.now():%d.%m.%Y__%H-%M-%S}__ds={ds}__entries={get_repr_entries(entry_ids)}__its={its}__full={full_run}"
  return get_subdir(_get_validation_root_dir(train_dir), subdir_name, create=True)
Exemple #2
0
def get_val_entry_dir(val_dir: str, entry: PreparedData, iteration: int) -> None:
  return get_subdir(val_dir, f"it={iteration}_id={entry.entry_id}", create=True)
Exemple #3
0
def get_train_logs_dir(train_dir: str):
  return get_subdir(train_dir, "logs", create=True)
Exemple #4
0
def get_checkpoints_dir(train_dir: str):
  return get_subdir(train_dir, "checkpoints", create=True)
Exemple #5
0
def get_train_dir(base_dir: str, train_name: str, create: bool):
  return get_subdir(base_dir, train_name, create)
Exemple #6
0
def get_val_dir(train_dir: str, entry: PreparedData, iteration: int):
  subdir_name = f"{datetime.datetime.now():%Y-%m-%d,%H-%M-%S},id={entry.entry_id},speaker={entry.speaker_id},it={iteration}"
  return get_subdir(_get_validation_root_dir(train_dir), subdir_name, create=True)
Exemple #7
0
def _get_validation_root_dir(train_dir: str):
  return get_subdir(train_dir, "validation", create=True)
Exemple #8
0
def get_inference_root_dir(train_dir: str):
  return get_subdir(train_dir, "inference", create=True)
Exemple #9
0
def get_infer_dir(train_dir: str, run_name: str) -> str:
    #input_name = get_basename(wav_path)
    return get_subdir(get_inference_root_dir(train_dir), run_name, create=True)