F

Flyte enables you to build & deploy data & ML pipelines, hassle-free. The infinitely scalable and flexible workflow orchestration platform that seamlessly unifies data, ML and analytics stacks. Explore and Join the Flyte Community!

Inquiry on Propeller Framework Configuration

Summary

The user is inquiring about the propeller framework's ability to communicate with multiple agent endpoints while managing a custom agent in a decoupled manner. They provide a configuration example with a defaultAgent and a custom_agent on different ports and seek clarification on configuring multiple custom agents. The user confirms the framework's production suitability and notes that requests for a custom_task will go to the custom_agent. They also ask about configuring a sensor agent, mentioning that packaging the custom_agent on port 8001 should support the custom_sensor type, and they provide a proposed configuration. The user emphasizes the importance of the agent-service recognizing all supported task types for compatibility with supportedTaskTypes from flytekit. They express gratitude for the confirmation, which helps them resolve uncertainties before packaging and deploying their custom agent separately.

Status
resolved
Tags
    Source
    #flyte-agents
      e

      eric901201

      10/10/2024

      it's unrelavant

      e

      eric901201

      10/10/2024

      don't copy the click_types.py

      e

      eric901201

      10/10/2024

      do it

      e

      eric901201

      10/10/2024

      not it doesnt have

      s

      shuliang

      10/10/2024

      <@U05FFAF4FC2> does https://github.com/flyteorg/flytekit/pull/2619 have other dependencies? Can it be upgraded standalone?

      e

      eric901201

      10/10/2024

      Check this one

      e

      eric901201

      10/10/2024

      It’s related to my pr about flyteschema

      e

      eric901201

      10/10/2024

      This is fixed by me and ketan

      e

      eric901201

      10/10/2024

      Yes I know this error

      s

      shuliang

      10/10/2024

      the custom sensor has the error: {"asctime": "2024-10-10 08:05:36,444", "name": "flytekit", "levelname": "ERROR", "message": "failed to create dssensor task with error `np.string_` was removed in the NumPy 2.0 release. Use `np.bytes_` instead.."}

      e

      eric901201

      10/10/2024

      please update both

      e

      eric901201

      10/10/2024

      flyte: 1.13 flytekit: there

      e

      eric901201

      10/10/2024

      agent watcher

      e

      eric901201

      10/10/2024

      and flyte

      s

      shuliang

      10/10/2024

      The change you have fixed is here: https://github.com/flyteorg/flytekit/pull/2012?

      s

      shuliang

      10/10/2024

      cc <@U05HLV2URT5> <@U04FZQ8U3C7> ^^

      e

      eric901201

      10/10/2024

      I'll help him or she make the upgrade of agent success

      e

      eric901201

      10/10/2024

      tell the person or team in charge of upgrade flytekit and flyte contact me

      e

      eric901201

      10/10/2024

      this is the version

      e

      eric901201

      10/10/2024

      flyte 1.13

      e

      eric901201

      10/10/2024

      I've fixed already

      s

      shuliang

      10/10/2024

      btw, <@U05FFAF4FC2> can you please forward the metadata service PR fix to avoid override default agent being overriden? when the flyte team at linkedin upgrade the flyte SDK, they can pay special care to that.

      e

      eric901201

      10/10/2024

      yes, anytime, very excited the incoming journey

      s

      shuliang

      10/10/2024

      Thanks A TON for staying up to help to resolve the outage! :heart: will ping here once the new data sensor works as well :slightly_smiling_face:

      e

      eric901201

      10/10/2024

      please let me know if the new agent work in linkedin

      e

      eric901201

      10/10/2024

      and checked the code by myself

      s

      shuliang

      10/10/2024

      <@U05HLV2URT5> as you are oncall, do you want to try that?

      e

      eric901201

      10/10/2024

      verified by Kevin

      e

      eric901201

      10/10/2024

      sensor: defaultAgent

      e

      eric901201

      10/10/2024

      YES

      e

      eric901201

      10/10/2024

      100% correct answer for youo

      e

      eric901201

      10/10/2024

      let me check the code now

      e

      eric901201

      10/10/2024

      give me 1 min

      e

      eric901201

      10/10/2024

      hi

      e

      eric901201

      10/10/2024

      wati

      e

      eric901201

      10/10/2024
      • sensor: defaultAgent
      s

      shuliang

      10/10/2024

      like sensor: defaultAgent?

      s

      shuliang

      10/10/2024

      how to specify that?

      s

      shuliang

      10/10/2024

      what if the sensor is for defaultAgent?

      e

      eric901201

      10/10/2024

      make sure you are having the right key value (relative position

      e

      eric901201

      10/10/2024
          # supportedTaskTypes:
            # - chatgpt
            # - sensor  
            # - spark
          #   - default_task
          #   - custom_task
          #   - sensor
          #   - airflow
          # By default, all the request will be sent to the default agent.
          defaultAgent:
            endpoint: "localhost:8000"    
            insecure: true
            timeouts:
              CreateTask: 100s
              GetTask: 100s
            defaultTimeout: 100s
          agents:
            custom_agent:
              endpoint: "localhost:8001"
              insecure: true
              # defaultServiceConfig: '{"loadBalancingConfig": [{"round_robin":{}}]}'
              timeouts:
                ExecuteTaskSync: 300s
                GetTask: 100s
              defaultTimeout: 300s
          agentForTaskTypes:
            # It will override the default agent for custom_task, which means propeller will send the request to this agent.
            - chatgpt: custom_agent
            - airflow: custom_agent```
      
      e

      eric901201

      10/10/2024

      THAT ME GIVE YOU AN EXAMPLE NOW

      e

      eric901201

      10/10/2024

      USE THAT

      e

      eric901201

      10/10/2024

      YES

      s

      shuliang

      10/10/2024

      say if we are on the old version can not upgrade. does the agentForTaskTypes work?

      e

      eric901201

      10/10/2024

      we add an agent watcher and fix bug about the routing mechanism

      e

      eric901201

      10/10/2024

      but maybe it will cause some error (just rollout back)

      e

      eric901201

      10/10/2024

      it's ok to upgrade propeller only in my opinion

      e

      eric901201

      10/10/2024

      upgrade to flyte 1.13.0

      s

      shuliang

      10/10/2024

      currently the bug is causing us unable to roll out custom agent.

      s

      shuliang

      10/10/2024

      the upgrade at LinkedIn will be slow and need more testing.

      e

      eric901201

      10/10/2024

      we have some tiny bugs before

      e

      eric901201

      10/10/2024

      use the latest one

      s

      shuliang

      10/10/2024

      I think it probably not the latest propeller. cc <@U05HLV2URT5>

      e

      eric901201

      10/10/2024

      are you using the latest flytepropeller?

      s

      shuliang

      10/10/2024

      <@U05FFAF4FC2> We have observed some overridding problem

          plugins:
            agent-service:
              defaultAgent:
                endpoint: flyteagent:8000
                insecure: true
              agents:
                aip-agent:
                 endpoint: <http://aipflyteagent.dlc-system.svc.kube.grid.linkedin.com:8000|aipflyteagent.dlc-system.svc.kube.grid.linkedin.com:8000>
                 insecure: true
              supportedTaskTypes:
              - sensor
              - dataservicetask```
      it looks like the request will be always sent to the `aip-agent`  end point.
      
      and we can not remove `sensor` because it is needed for the defaultAgent.
      What’s the best way to do this?
      
      e

      eric901201

      9/20/2024

      > Really?! are there recent changes that we are using the old version? I just misunderstand this, supported task type is in agent-service section, this is never changed. the order of the key in yaml can be different, but it's always the same.

      s

      shuliang

      9/20/2024

      will try it out and keep you updated if any other issues. :slightly_smiling_face:

      e

      eric901201

      9/20/2024

      thank you so much

      s

      shuliang

      9/20/2024

      thanks a lot for hte confirmation. this helps me resolve some unknowns before I package and deploy my custom_agent separately!

      e

      eric901201

      9/20/2024

      for example, you have 2 agent deployement, agent-service needs to know all supported task types, so that propeller can check if we support the given supportedTaskTypes from flytekit.

      s

      shuliang

      9/20/2024

      got it!

      e

      eric901201

      9/20/2024

      yes, but supported task types will not be used by defaultAgent , it will be used by agent-service

      s

      shuliang

      9/20/2024

      this is what we configured

      s

      shuliang

      9/20/2024

      > supported task type is in agent-service section Really?! are there recent changes that we are using the old version?

      e

      eric901201

      9/20/2024

      supported task type is in agent-service section

      e

      eric901201

      9/20/2024
          supportedTaskTypes:
            - chatgpt
            - sensor  
            - spark
            - default_task
            - custom_task
            - sensor
            - airflow
          By default, all the request will be sent to the default agent.
          defaultAgent:
            endpoint: "localhost:8000"    
            insecure: true
            timeouts:
              CreateTask: 100s
              GetTask: 100s
            defaultTimeout: 100s
          agents:
            custom_agent:
              endpoint: "localhost:8001"
              insecure: true
              # defaultServiceConfig: '{"loadBalancingConfig": [{"round_robin":{}}]}'
              timeouts:
                ExecuteTaskSync: 300s
                GetTask: 100s
              defaultTimeout: 300s```
      
      e

      eric901201

      9/20/2024

      no

      s

      shuliang

      9/20/2024

      wait, but supportedTaskTypes in defaultAgent section. the defaultAgent would not have custom_sensor

      e

      eric901201

      9/20/2024

      I think supportedTaskTypes will be looked like this, is this what you are asking?

      e

      eric901201

      9/20/2024
          - sensor
          - custom_sensor```
      
      s

      shuliang

      9/20/2024

      I mean if there is other team configures the defaultAgent with the default sensor name…

      e

      eric901201

      9/20/2024

      if you are using the latest version of propeller

      e

      eric901201

      9/20/2024

      propeller will auto-update latest supported task types

      e

      eric901201

      9/20/2024

      right now you don't need supportedTaskTypes

      e

      eric901201

      9/20/2024

      sorry

      e

      eric901201

      9/20/2024

      yes it will

      e

      eric901201

      9/20/2024

      no it will not

      s

      shuliang

      9/20/2024

      one last check point: what about for sensor agent?

      The default name is sensor : https://github.com/flyteorg/flytekit/blob/master/flytekit/sensor/base_sensor.py#L54 If I package the custom_agen with end point 8001 it supports custom_sensor type as well, will the configuration look like following?

      defaultAgent:
        endpoint: "localhost:8000"    
        insecure: true
        timeouts:
          CreateTask: 100s
          GetTask: 100s
        defaultTimeout: 100s
        supportedTaskTypes:
              - sensor &lt;&lt;&lt;&lt;&lt;&lt;&lt;========= 
      agents:
        custom_agent:
          endpoint: "localhost:8001"
          insecure: true
          timeouts:
            ExecuteTaskSync: 300s
            GetTask: 100s
          defaultTimeout: 300s
      agentForTaskTypes:
        - chatgpt: custom_agent
        - airflow: custom_agent
        - custom_sensor: custom_agent &lt;&lt;&lt;&lt;&lt;======== ```
      
      e

      eric901201

      9/20/2024

      > • but for any other types of task, it will still be sent to the default agent yes

      e

      eric901201

      9/20/2024

      > for custom_task, propeller will be sent to the custom_agent, not the default agent. yes

      e

      eric901201

      9/20/2024

      > It can be used in production, not just for canary deployment, correct? yes, there's company use that

      e

      eric901201

      9/20/2024
      defaultAgent:
        endpoint: "localhost:8000"    
        insecure: true
        timeouts:
          CreateTask: 100s
          GetTask: 100s
        defaultTimeout: 100s
      agents:
        custom_agent:
          endpoint: "localhost:8001"
          insecure: true
          timeouts:
            ExecuteTaskSync: 300s
            GetTask: 100s
          defaultTimeout: 300s
      agentForTaskTypes:
        - chatgpt: custom_agent
        - airflow: custom_agent```
      
      s

      shuliang

      9/19/2024

      Hi community, as we are leveraging the agent framework to manage the custom agent in a decoupled way, we’d like to understand if propeller has the capabilities to talk to multiple agent end points? for example, In the propeller config map, people usually define one defaultAgent

          plugins:
            agent-service:
              defaultAgent:
                endpoint: customagent:8000
                insecure: true```
      But if we have the custom agent running serving different port,
      
      ```agent_service.yaml: |
          plugins:
            agent-service:
              defaultAgent:
                endpoint: customagent1:8000
                insecure: true
              customAgent1:
                endpoint: customagent2:8001
                ...
              customAgent2:
                endpoint: customagent2:8002```