From 40987d02e16ea4677c3322667c49df74329d2899 Mon Sep 17 00:00:00 2001 From: Williams Date: Fri, 1 Sep 2023 11:58:11 -0400 Subject: [PATCH] Removing calls to appraise and scoring --- tr_sys/tr_ars/utils.py | 72 +++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/tr_sys/tr_ars/utils.py b/tr_sys/tr_ars/utils.py index acabaebd..c43abe0f 100644 --- a/tr_sys/tr_ars/utils.py +++ b/tr_sys/tr_ars/utils.py @@ -538,42 +538,42 @@ def post_process(data,key, agent_name): scrub_null_attributes(data) except Exception as e: logging.info("Problem with the second scrubbing of null attributes") - try: - appraise(mesg,data,agent_name) - logging.info("appraiser successful") - except Exception as e: - code = 422 - results = get_safe(data,"message","results") - default_ordering_component = { - "novelty": 0, - "confidence": 0, - "clinical_evidence": 0 - } - if results is not None: - for result in results: - if 'ordering_components' not in result.keys(): - result['ordering_components']=default_ordering_component - else: - continue - else: - logging.error('results returned from appraiser is None') - - #post_processing_error(mesg,data,"Error in appraiser") - logging.error("Error with appraise for "+str(key)) - logging.exception("Error in appraiser post process function") - #raise e - try: - results = get_safe(data,"message","results") - if results is not None: - new_res=scoring.compute_from_results(results) - logging.info("scoring succeeded") - else: - logging.error('results from appraiser returns None, cant do the scoring') - print() - except Exception as e: - post_processing_error(mesg,data,"Error in f-score calculation") - logging.exception("Error in f-score calculation") - raise e + # try: + # appraise(mesg,data,agent_name) + # logging.info("appraiser successful") + # except Exception as e: + # code = 422 + # results = get_safe(data,"message","results") + # default_ordering_component = { + # "novelty": 0, + # "confidence": 0, + # "clinical_evidence": 0 + # } + # if results is not None: + # for result in results: + # if 'ordering_components' not in result.keys(): + # result['ordering_components']=default_ordering_component + # else: + # continue + # else: + # logging.error('results returned from appraiser is None') + # + # #post_processing_error(mesg,data,"Error in appraiser") + # logging.error("Error with appraise for "+str(key)) + # logging.exception("Error in appraiser post process function") + # #raise e + # try: + # results = get_safe(data,"message","results") + # if results is not None: + # new_res=scoring.compute_from_results(results) + # logging.info("scoring succeeded") + # else: + # logging.error('results from appraiser returns None, cant do the scoring') + # print() + # except Exception as e: + # post_processing_error(mesg,data,"Error in f-score calculation") + # logging.exception("Error in f-score calculation") + # raise e mesg.status='D' mesg.code=code mesg.data = data