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