Evaluation report missing
Magpi007 opened this issue · 2 comments
Hi Thilina,
Just finished to reproduce the code, and at the end of the evaluation process, I got this error message after finishing the process and before printing the results:
I have navigated through the folders created by the code but I can't find the file 'eval_results.txt'. The only thing I have seen is that the code tries to store the report file in a folder called 'insults_evaluation_reports' (note reports is plural), but the system has the folder 'insults_evaluation_report' (in singular) and a subfolder called 'report_0' that is empty as you can see in the attached screenshot. In the 'insults_evaluation_report' folder there is aren't files, only the folder 'report_0'. Any idea where can I find the file?
For your interest, the report setup code is
REPORTS_DIR = f'/content/NLP-HS-E002/reports/{TASK_NAME}_evaluation_reports/'
Thanks!
I just ran the evaluation notebook and it creates a directory with the correct name (_evaluation_reports). I'm not sure why your directory has the singular name.
As a temporary fix, you can rename the directory on the disk to the name that the logger output is expecting and rerun the part that generates the file.
output_eval_file = os.path.join(REPORTS_DIR, "eval_results.txt") with open(output_eval_file, "w") as writer: logger.info("***** Eval results *****") for key in (result.keys()): logger.info(" %s = %s", key, str(result[key])) writer.write("%s = %s\n" % (key, str(result[key])))
After that, can you rerun the first three cells of the notebook and check whether it creates the directory with the correct plural name?
OK, I found it, just in the first chunk of code where you define the parameters, the reports directory is defined without -s, and in the evaluation section where you define again the parameters is with -s, I adjusted it and it worked.