Hi I need to do a batchscrip thousands of gold test sets(I also ask my self the same question why? ). How can I batchscript them with the code below? Sorry I have not done this in years.
If I understand the problem correctly, you have thousands of gold test sets (e.g., sample2.spacy) and you want to evaluate all of them with the same model. If that's the case:
If the file names are similar in format, you can use a bash for loop.
You can also do this programmatically using Python, call the spacy.cli.evaluate function and apply it to a glob of files in a directory.