소스 검색

Merge branch 'dev-xym-fix' of algorithm/recommend-emr-dataprocess into feature/20250104-zt-update

fengzhoutian 1 일 전
부모
커밋
fc2b34fca6
1개의 변경된 파일1개의 추가작업 그리고 49개의 파일을 삭제
  1. 1 49
      ad/pai_flow_operator.py

+ 1 - 49
ad/pai_flow_operator.py

@@ -20,7 +20,6 @@ from ad_monitor_util import _monitor
 
 target_names = {
     '样本shuffle',
-    '评估样本重组',
     '模型训练-样本shufle',
     '模型训练-自定义',
     '模型增量训练',
@@ -519,7 +518,7 @@ def update_online_flow():
         for node in nodes:
             try:
                 name = node['name']
-                if name in ('样本shuffle', '评估样本重组'):
+                if name in ('样本shuffle',):
                     date_begin = '20250605' if name == '样本shuffle' else get_previous_days_date(10)
                     properties = node['properties']
                     for property in properties:
@@ -539,27 +538,6 @@ def update_online_flow():
     except Exception as e:
         raise Exception(f"发生未知错误: {e}")
 
-def update_global_param(params):
-    try:
-        draft = PAIClient.get_work_flow_draft(experiment_id)
-        content = draft['Content']
-        version = draft['Version']
-        content_json = json.loads(content)
-        nodes = content_json.get('nodes')
-        global_params = content_json.get('globalParams')
-        for global_param in global_params:
-            if global_param['name'] in params:
-                value = params[global_param['name']]
-                print(f"update global param {global_param['name']}: {value}")
-                global_param['value'] = value
-        new_content = json.dumps(content_json, ensure_ascii=False)
-        PAIClient.update_experiment_content(experiment_id, new_content, version)
-        return True
-    except json.JSONDecodeError:
-        raise Exception("JSON 解析错误,可能是草稿内容格式不正确")
-    except Exception as e:
-        raise Exception(f"发生未知错误: {e}")
-
 @retry
 def shuffle_table():
     try:
@@ -646,34 +624,8 @@ def update_online_model():
         print(error_message)
         raise Exception(error_message)
 
-def update_validation_config():
-    try:
-        job_dict = get_job_dict()
-        node_dict = get_node_dict()
-        print(node_dict)
-        job_id = job_dict['样本shuffle']
-        validate_job_detail = wait_job_end(job_id)
-        table = None
-        if validate_job_detail['Status'] == 'Succeeded':
-            pipeline_run_id = validate_job_detail['RunId']
-            node_id = validate_job_detail['PaiflowNodeId']
-            flow_out_put_detail = PAIClient.get_flow_out_put(pipeline_run_id, node_id, 2)
-            outputs = flow_out_put_detail['Outputs']
-            for output in outputs:
-                if output["Producer"] == node_dict['评估样本重组'] and output["Name"] == "outputTable":
-                    value1 = json.loads(output["Info"]['value'])
-                    table = value1['location']['table']
-        if not table:
-            raise Exception("table not available")
-        update_global_param({'eval_table_name': table})
-    except Exception as e:
-        error_message = f"在执行 update_validation_config 函数时发生异常: {str(e)}"
-        print(error_message)
-        raise Exception(error_message)
-
 @retry
 def get_validate_model_data():
-    update_validation_config()
     try:
         node_dict = get_node_dict()
         train_node_id = node_dict['虚拟起始节点']