This commit is contained in:
init_mahdi 2025-08-21 17:31:56 +03:30
parent 55b88ce189
commit b6855337c8

View File

@ -127,7 +127,7 @@ def main_train(model):
print(' Testing model finished! ') print(' Testing model finished! ')
# ################################################### # ###################################################
# ارزیابی مدل آموزش دیده # ارزیابی مدل آموزش دیده با متد evaluate_model از ماژول do_evaluate
try: try:
from evaluate_model import do_evaluate from evaluate_model import do_evaluate
print(' Try to evaluating the trained model! ') print(' Try to evaluating the trained model! ')
@ -164,7 +164,7 @@ if __name__ == "__main__":
# model = 'HooshvareLab/bert-fa-base-uncased-ner-peyma' # model = 'HooshvareLab/bert-fa-base-uncased-ner-peyma'
# main_train(model) # main_train(model)
# iterate models to train # iterate models to train based on dataset
for model in models: for model in models:
if model == '': if model == '':
continue continue
@ -175,8 +175,9 @@ if __name__ == "__main__":
if result: if result:
print(f'TRAIN **{model}** Finished successfully') print(f'TRAIN **{model}** Finished successfully')
except: except Exception as error:
print(f" !!! TRAIN **{model}** Model ERROR !!! ") print(f" !!! TRAIN **{model}** Model ERROR !!! ")
print(f"Error message: {error}")
print('All Models Training Process Finished!') print('All Models Training Process Finished!')