Ver código fonte

fix: Ensure the order of execution steps are correct when logging with Weave by W&B (#25183)

tags/2.0.0-beta.2^2
Anubhav Singh 1 mês atrás
pai
commit
f721c778ad
Nenhuma conta vinculada ao e-mail do autor do commit
1 arquivos alterados com 4 adições e 1 exclusões
  1. 4
    1
      api/core/ops/weave_trace/weave_trace.py

+ 4
- 1
api/core/ops/weave_trace/weave_trace.py Ver arquivo

workflow_attributes["trace_id"] = trace_id workflow_attributes["trace_id"] = trace_id
workflow_attributes["start_time"] = trace_info.start_time workflow_attributes["start_time"] = trace_info.start_time
workflow_attributes["end_time"] = trace_info.end_time workflow_attributes["end_time"] = trace_info.end_time
workflow_attributes["tags"] = ["workflow"]
workflow_attributes["tags"] = ["dify_workflow"]


workflow_run = WeaveTraceModel( workflow_run = WeaveTraceModel(
file_list=trace_info.file_list, file_list=trace_info.file_list,
workflow_run_id=trace_info.workflow_run_id workflow_run_id=trace_info.workflow_run_id
) )


# rearrange workflow_node_executions by starting time
workflow_node_executions = sorted(workflow_node_executions, key=lambda x: x.created_at)

for node_execution in workflow_node_executions: for node_execution in workflow_node_executions:
node_execution_id = node_execution.id node_execution_id = node_execution.id
tenant_id = trace_info.tenant_id # Use from trace_info instead tenant_id = trace_info.tenant_id # Use from trace_info instead

Carregando…
Cancelar
Salvar