MCPcopy
hub / github.com/openai/openai-python / get_outfnames

Function get_outfnames

src/openai/lib/_validators.py:621–629  ·  view source on GitHub ↗
(fname: str, split: bool)

Source from the content-addressed store, hash-verified

619
620
621def get_outfnames(fname: str, split: bool) -> list[str]:
622 suffixes = ["_train", "_valid"] if split else [""]
623 i = 0
624 while True:
625 index_suffix = f" ({i})" if i > 0 else ""
626 candidate_fnames = [f"{os.path.splitext(fname)[0]}_prepared{suffix}{index_suffix}.jsonl" for suffix in suffixes]
627 if not any(os.path.isfile(f) for f in candidate_fnames):
628 return candidate_fnames
629 i += 1
630
631
632def get_classification_hyperparams(df: pd.DataFrame) -> tuple[int, object]:

Callers 1

write_out_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected