Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.8.3 parallel Workflow run failed #8731

Closed
5 tasks done
huangyafei opened this issue Sep 24, 2024 · 6 comments
Closed
5 tasks done

0.8.3 parallel Workflow run failed #8731

huangyafei opened this issue Sep 24, 2024 · 6 comments
Assignees
Labels
🌊 feat:workflow Workflow related stuff.

Comments

@huangyafei
Copy link
Contributor

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.8.3

Cloud or Self Hosted

Cloud, Self Hosted (Docker)

Steps to reproduce

I have found a similar Issue #8355 and a related PR #8378. But, this PR only fixed the problem within if/else nodes.

Currently, I'm encountering a new issue:

Case 1

Screen Shot 2024-09-24 at 22 09 01

DSL:

app:
  description: ''
  icon: 🤖
  icon_background: '#FFEAD5'
  mode: workflow
  name: Test Workflow
  use_icon_as_answer_icon: false
kind: app
version: 0.1.2
workflow:
  conversation_variables: []
  environment_variables: []
  features:
    file_upload:
      image:
        enabled: false
        number_limits: 3
        transfer_methods:
        - local_file
        - remote_url
    opening_statement: ''
    retriever_resource:
      enabled: false
    sensitive_word_avoidance:
      enabled: false
    speech_to_text:
      enabled: false
    suggested_questions: []
    suggested_questions_after_answer:
      enabled: false
    text_to_speech:
      enabled: false
      language: ''
      voice: ''
  graph:
    edges:
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: 1727144308127-source-1727145030743-target
      selected: false
      source: '1727144308127'
      sourceHandle: source
      target: '1727145030743'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: 1727148810092-source-1727148873972-target
      selected: false
      source: '1727148810092'
      sourceHandle: source
      target: '1727148873972'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: 1727148590580-source-1727145030743-target
      selected: false
      source: '1727148590580'
      sourceHandle: source
      target: '1727145030743'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: 1727148681332-source-1727145030743-target
      selected: false
      source: '1727148681332'
      sourceHandle: source
      target: '1727145030743'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: 1727148740287-source-1727145030743-target
      selected: false
      source: '1727148740287'
      sourceHandle: source
      target: '1727145030743'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: 1727145030743-source-1727172656753-target
      selected: false
      source: '1727145030743'
      sourceHandle: source
      target: '1727172656753'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: 1727148873972-source-1727172656753-target
      selected: false
      source: '1727148873972'
      sourceHandle: source
      target: '1727172656753'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: end
      id: 1727172656753-source-1727149196020-target
      selected: false
      source: '1727172656753'
      sourceHandle: source
      target: '1727149196020'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: start
        targetType: llm
      id: 1727142281355-source-1727144308127-target
      selected: false
      source: '1727142281355'
      sourceHandle: source
      target: '1727144308127'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: start
        targetType: llm
      id: 1727142281355-source-1727148590580-target
      selected: false
      source: '1727142281355'
      sourceHandle: source
      target: '1727148590580'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: start
        targetType: llm
      id: 1727142281355-source-1727148681332-target
      selected: false
      source: '1727142281355'
      sourceHandle: source
      target: '1727148681332'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: start
        targetType: llm
      id: 1727142281355-source-1727148740287-target
      selected: false
      source: '1727142281355'
      sourceHandle: source
      target: '1727148740287'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: start
        targetType: llm
      id: 1727142281355-source-1727148810092-target
      selected: false
      source: '1727142281355'
      sourceHandle: source
      target: '1727148810092'
      targetHandle: target
      type: custom
      zIndex: 0
    nodes:
    - data:
        desc: ''
        selected: false
        title: 开始
        type: start
        variables:
        - label: test1
          max_length: 5000
          options: []
          required: true
          type: paragraph
          variable: test1
        - label: test2
          max_length: 5000
          options: []
          required: true
          type: paragraph
          variable: test2
        - label: test2
          max_length: 5000
          options: []
          required: true
          type: paragraph
          variable: test3
      height: 142
      id: '1727142281355'
      position:
        x: 108.96174071985862
        y: 344.318673344686
      positionAbsolute:
        x: 108.96174071985862
        y: 344.318673344686
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: 6fc4d2d3-6195-48e2-a8e8-b50b476ae586
          role: system
          text: '{{#1727142281355.test1#}}'
        selected: false
        title: '1'
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727144308127'
      position:
        x: 618.0908948235066
        y: 3.9787359408662155
      positionAbsolute:
        x: 618.0908948235066
        y: 3.9787359408662155
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: a91d2fac-f89c-44ed-9d96-5479fd1d92d3
          role: system
          text: '{{#1727142281355.test1#}}

            {{#1727144308127.text#}}

            {{#1727148590580.text#}}

            {{#1727148681332.text#}}

            {{#1727148740287.text#}}'
        selected: false
        title: A
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727145030743'
      position:
        x: 939.241283086283
        y: 270.6495585970275
      positionAbsolute:
        x: 939.241283086283
        y: 270.6495585970275
      selected: true
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: 9334a19b-8c0f-488b-9b2b-4917684e26aa
          role: system
          text: '{{#1727142281355.test1#}}'
        selected: false
        title: '2'
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727148590580'
      position:
        x: 618.0908948235066
        y: 138.1527613772792
      positionAbsolute:
        x: 618.0908948235066
        y: 138.1527613772792
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: 2b95102d-5014-4d56-8b1d-f9b45a4e4012
          role: system
          text: '{{#1727142281355.test1#}}'
        selected: false
        title: '3'
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727148681332'
      position:
        x: 618.0908948235066
        y: 275.9787359408662
      positionAbsolute:
        x: 618.0908948235066
        y: 275.9787359408662
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: 6e289ffe-f1f8-418e-b5dd-746100d3d57d
          role: system
          text: '{{#1727142281355.test1#}}'
        selected: false
        title: '4'
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727148740287'
      position:
        x: 618.0908948235066
        y: 433.9787359408662
      positionAbsolute:
        x: 618.0908948235066
        y: 433.9787359408662
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: f301340a-c6a0-4d66-8d4a-ef6edb5cb021
          role: system
          text: '{{#1727142281355.test1#}}'
        selected: false
        title: '5'
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727148810092'
      position:
        x: 618.0908948235066
        y: 591.9787359408663
      positionAbsolute:
        x: 618.0908948235066
        y: 591.9787359408663
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: 2870bb25-f9b7-4bde-80a8-bcf2d0724cbc
          role: system
          text: '{{#1727142281355.test2#}}

            {{#1727148810092.text#}}'
        selected: false
        title: B
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727148873972'
      position:
        x: 939.241283086283
        y: 566.4133478867913
      positionAbsolute:
        x: 939.241283086283
        y: 566.4133478867913
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        outputs:
        - value_selector:
          - '1727172656753'
          - text
          variable: text
        selected: false
        title: 结束
        type: end
      height: 90
      id: '1727149196020'
      position:
        x: 1756.4116013408475
        y: 426.6748376865183
      positionAbsolute:
        x: 1756.4116013408475
        y: 426.6748376865183
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o-mini
          provider: openai
        prompt_template:
        - id: cde9e3d4-b80f-427e-ac80-630742578ac4
          role: system
          text: '{{#1727145030743.text#}}


            {{#1727148873972.text#}}'
        selected: false
        title: LLM 8
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727172656753'
      position:
        x: 1392.9711973004144
        y: 411.24959999322414
      positionAbsolute:
        x: 1392.9711973004144
        y: 411.24959999322414
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    viewport:
      x: -62.80515725984003
      y: 48.04103264536778
      zoom: 0.678929337056967

Case 2

Screen Shot 2024-09-24 at 22 10 25

DSL:

app:
  description: ''
  icon: 🤖
  icon_background: '#FFEAD5'
  mode: workflow
  name: Test Workflow
  use_icon_as_answer_icon: false
kind: app
version: 0.1.2
workflow:
  conversation_variables: []
  environment_variables: []
  features:
    file_upload:
      image:
        enabled: false
        number_limits: 3
        transfer_methods:
        - local_file
        - remote_url
    opening_statement: ''
    retriever_resource:
      enabled: false
    sensitive_word_avoidance:
      enabled: false
    speech_to_text:
      enabled: false
    suggested_questions: []
    suggested_questions_after_answer:
      enabled: false
    text_to_speech:
      enabled: false
      language: ''
      voice: ''
  graph:
    edges:
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: 1727144308127-source-1727145030743-target
      selected: false
      source: '1727144308127'
      sourceHandle: source
      target: '1727145030743'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: 1727148810092-source-1727148873972-target
      selected: false
      source: '1727148810092'
      sourceHandle: source
      target: '1727148873972'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: 1727148590580-source-1727145030743-target
      selected: false
      source: '1727148590580'
      sourceHandle: source
      target: '1727145030743'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: 1727148681332-source-1727145030743-target
      selected: false
      source: '1727148681332'
      sourceHandle: source
      target: '1727145030743'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: 1727148740287-source-1727145030743-target
      selected: false
      source: '1727148740287'
      sourceHandle: source
      target: '1727145030743'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: 1727145030743-source-1727172656753-target
      selected: false
      source: '1727145030743'
      sourceHandle: source
      target: '1727172656753'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: 1727148873972-source-1727172656753-target
      selected: false
      source: '1727148873972'
      sourceHandle: source
      target: '1727172656753'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: end
      id: 1727172656753-source-1727149196020-target
      selected: false
      source: '1727172656753'
      sourceHandle: source
      target: '1727149196020'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: start
        targetType: llm
      id: 1727142281355-source-1727144308127-target
      selected: false
      source: '1727142281355'
      sourceHandle: source
      target: '1727144308127'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: start
        targetType: llm
      id: 1727142281355-source-1727148590580-target
      selected: false
      source: '1727142281355'
      sourceHandle: source
      target: '1727148590580'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: start
        targetType: llm
      id: 1727142281355-source-1727148681332-target
      selected: false
      source: '1727142281355'
      sourceHandle: source
      target: '1727148681332'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: start
        targetType: llm
      id: 1727142281355-source-1727148740287-target
      selected: false
      source: '1727142281355'
      sourceHandle: source
      target: '1727148740287'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: start
        targetType: llm
      id: 1727142281355-source-1727148810092-target
      selected: false
      source: '1727142281355'
      sourceHandle: source
      target: '1727148810092'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: start
        targetType: template-transform
      id: 1727142281355-source-1727186987344-target
      source: '1727142281355'
      sourceHandle: source
      target: '1727186987344'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: template-transform
        targetType: llm
      id: 1727186987344-source-1727148873972-target
      source: '1727186987344'
      sourceHandle: source
      target: '1727148873972'
      targetHandle: target
      type: custom
      zIndex: 0
    nodes:
    - data:
        desc: ''
        selected: false
        title: 开始
        type: start
        variables:
        - label: test1
          max_length: 5000
          options: []
          required: true
          type: paragraph
          variable: test1
        - label: test2
          max_length: 5000
          options: []
          required: true
          type: paragraph
          variable: test2
        - label: test2
          max_length: 5000
          options: []
          required: true
          type: paragraph
          variable: test3
      height: 142
      id: '1727142281355'
      position:
        x: 108.96174071985862
        y: 344.318673344686
      positionAbsolute:
        x: 108.96174071985862
        y: 344.318673344686
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: 6fc4d2d3-6195-48e2-a8e8-b50b476ae586
          role: system
          text: '{{#1727142281355.test1#}}'
        selected: false
        title: '1'
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727144308127'
      position:
        x: 618.0908948235066
        y: 3.9787359408662155
      positionAbsolute:
        x: 618.0908948235066
        y: 3.9787359408662155
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: a91d2fac-f89c-44ed-9d96-5479fd1d92d3
          role: system
          text: '{{#1727142281355.test1#}}

            {{#1727144308127.text#}}

            {{#1727148590580.text#}}

            {{#1727148681332.text#}}

            {{#1727148740287.text#}}'
        selected: false
        title: A
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727145030743'
      position:
        x: 939.241283086283
        y: 270.6495585970275
      positionAbsolute:
        x: 939.241283086283
        y: 270.6495585970275
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: 9334a19b-8c0f-488b-9b2b-4917684e26aa
          role: system
          text: '{{#1727142281355.test1#}}'
        selected: false
        title: '2'
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727148590580'
      position:
        x: 618.0908948235066
        y: 138.1527613772792
      positionAbsolute:
        x: 618.0908948235066
        y: 138.1527613772792
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: 2b95102d-5014-4d56-8b1d-f9b45a4e4012
          role: system
          text: '{{#1727142281355.test1#}}'
        selected: false
        title: '3'
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727148681332'
      position:
        x: 618.0908948235066
        y: 275.9787359408662
      positionAbsolute:
        x: 618.0908948235066
        y: 275.9787359408662
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: 6e289ffe-f1f8-418e-b5dd-746100d3d57d
          role: system
          text: '{{#1727142281355.test1#}}'
        selected: false
        title: '4'
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727148740287'
      position:
        x: 618.0908948235066
        y: 433.9787359408662
      positionAbsolute:
        x: 618.0908948235066
        y: 433.9787359408662
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: f301340a-c6a0-4d66-8d4a-ef6edb5cb021
          role: system
          text: '{{#1727142281355.test1#}}'
        selected: false
        title: '5'
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727148810092'
      position:
        x: 618.0908948235066
        y: 591.9787359408663
      positionAbsolute:
        x: 618.0908948235066
        y: 591.9787359408663
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: 2870bb25-f9b7-4bde-80a8-bcf2d0724cbc
          role: system
          text: '{{#1727142281355.test2#}}

            {{#1727148810092.text#}}'
        selected: false
        title: B
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727148873972'
      position:
        x: 939.241283086283
        y: 566.4133478867913
      positionAbsolute:
        x: 939.241283086283
        y: 566.4133478867913
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        outputs:
        - value_selector:
          - '1727172656753'
          - text
          variable: text
        selected: false
        title: 结束
        type: end
      height: 90
      id: '1727149196020'
      position:
        x: 1756.4116013408475
        y: 426.6748376865183
      positionAbsolute:
        x: 1756.4116013408475
        y: 426.6748376865183
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o-mini
          provider: openai
        prompt_template:
        - id: cde9e3d4-b80f-427e-ac80-630742578ac4
          role: system
          text: '{{#1727145030743.text#}}


            {{#1727148873972.text#}}'
        selected: false
        title: LLM 8
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727172656753'
      position:
        x: 1392.9711973004144
        y: 411.24959999322414
      positionAbsolute:
        x: 1392.9711973004144
        y: 411.24959999322414
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        selected: false
        template: '{{ arg1 }}'
        title: 模板转换
        type: template-transform
        variables:
        - value_selector:
          - sys
          - user_id
          variable: arg1
      height: 54
      id: '1727186987344'
      position:
        x: 618.0908948235066
        y: 728.9787359408663
      positionAbsolute:
        x: 618.0908948235066
        y: 728.9787359408663
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    viewport:
      x: -74.7201100837608
      y: 23.395580759163863
      zoom: 0.6770495523729501

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

@dosubot dosubot bot added the 🌊 feat:workflow Workflow related stuff. label Sep 24, 2024
Copy link

dosubot bot commented Sep 24, 2024

I found a similar issue and discussion that might be relevant to your problem:

  1. Error in item: Invalid variable (open) - This discussion addresses a similar issue with variables not being found.
  2. This is a major issue with parallel execution in the workflow (open) - This discussion talks about issues with parallel execution in workflows.

The issue you're encountering with the parallel workflow run failing in Dify version 0.8.3 is likely due to the query variable not being properly initialized or passed to the nodes that require it. Specifically, the nodes tt and tt-2 use the query variable in their template, but there is no evidence that this variable is being set or passed correctly during the test execution.

Here is the relevant part of the code where the query variable is expected:

{
    "data": {
        "template": "{{ arg1 }} 123",
        "title": "template transform",
        "type": "template-transform",
        "variables": [{"value_selector": ["sys", "query"], "variable": "arg1"}],
    },
    "id": "tt",
},
{
    "data": {
        "template": "{{ arg1 }} 321",
        "title": "template transform",
        "type": "template-transform",
        "variables": [{"value_selector": ["sys", "query"], "variable": "arg1"}],
    },
    "id": "tt-2",
}

To fix this issue, ensure that the query variable is properly initialized in the VariablePool when the GraphEngine is instantiated. For example:

variable_pool = VariablePool(
    system_variables={
        SystemVariableKey.QUERY: "your query here",
        SystemVariableKey.FILES: [],
        SystemVariableKey.CONVERSATION_ID: "abababa",
        SystemVariableKey.USER_ID: "aaa",
    },
    user_inputs={"query": "your query here"},
)

Make sure to replace "your query here" with the actual query you want to test with. This should ensure that the query variable is available to all nodes that require it, preventing the variable not found error [1][2].

To continue talking to Dosu, mention @dosu.

@iamjoel iamjoel assigned zxhlyh and unassigned iamjoel and zxhlyh Sep 25, 2024
@iamjoel
Copy link
Collaborator

iamjoel commented Sep 25, 2024

I debug the code, and find that the last node's output in parallel is missing. We will resolve it later.

@huangyafei
Copy link
Contributor Author

I debug the code, and find that the last node's output in parallel is missing. We will resolve it later.

I've noticed that the parallel nodes are being processed in the wrong order, or rather, it looks like the system is misinterpreting the order in which the parallel nodes are being processed.

For example, in the first graph, the correct order should be Start -> 1, 2, 3, 4, 5 -> A&B. But looking at the logs on the right side of the graph, the workflow runs in the order Start -> 1, 2, A, 3, 4, 5.

Hope this helps to solve the problem.

@huangyafei
Copy link
Contributor Author

I debug the code, and find that the last node's output in parallel is missing. We will resolve it later.

Node A should run after all nodes 1, 2, 3, 4 have finished running. But currently, node A is running after nodes 1 and 2 have run, so it can't find the output variable for node 3.

@iamjoel
Copy link
Collaborator

iamjoel commented Sep 25, 2024

I debug the code, and find that the last node's output in parallel is missing. We will resolve it later.

I've noticed that the parallel nodes are being processed in the wrong order, or rather, it looks like the system is misinterpreting the order in which the parallel nodes are being processed.

For example, in the first graph, the correct order should be Start -> 1, 2, 3, 4, 5 -> A&B. But looking at the logs on the right side of the graph, the workflow runs in the order Start -> 1, 2, A, 3, 4, 5.

Hope this helps to solve the problem.

@zxhlyh @takatost

@iamjoel
Copy link
Collaborator

iamjoel commented Sep 25, 2024

@huangyafei 1,2,3,4,5 -> A & B is partial convergence in parallel. We don't support that partial convergence now. We support C-> 1,2,3,4 -> A; 5 -> B.
You can temporary fix this issus by adding a node before 1,2,3,4.
img_v3_02f2_3efe6806-d413-445f-b8a1-a16b8f684fag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌊 feat:workflow Workflow related stuff.
Projects
None yet
Development

No branches or pull requests

4 participants