Browse Source

删除评估样本重组

xueyiming 1 day ago
parent
commit
c0d91f85bb
1 changed files with 0 additions and 21 deletions
  1. 0 21
      ad/pai_flow_operator.py

+ 0 - 21
ad/pai_flow_operator.py

@@ -538,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: