PIAF v2.0 repo for ML development. Main purpose of this repo is to automatically find the best configuration for a QA pipeline of a partner organisation.
We create a new directory if the file ./results/results.csv does not exist. The problem is that the folder results may already exist so this will fail with Exception File already exists.
if result_file_path.exists():
df_old = pd.read_csv(result_file_path)
df_results = pd.concat([df_old, df_results])
else:
if not result_file_path.parent.exists():
result_file_path.parent.mkdir()
We create a new directory if the file
./results/results.csv
does not exist. The problem is that the folderresults
may already exist so this will fail withException File already exists.
https://github.com/etalab-ia/piaf-ml/blob/296c5abd93753d2026292885324a749909ecee72/src/evaluation/retriever_25k_eval.py#L180
I propose this change :