Hi community, does anyone recognize what type of t...
# flyte-support
h
Hi community, does anyone recognize what type of task form this pb file? (With k8s_pod in the content where contains the image info). It is not the typical pb format where have container::image.
Copy code
template {
  id {
    resource_type: TASK
    name: "src.python.flyte.fraud_intelligence.utils.railyard.train_dnn_g5"
  }
  type: "python-task"
  metadata {
    discoverable: true
    runtime {
      type: FLYTE_SDK
      version: "1.3.2"
      flavor: "python"
    }
    timeout {
      seconds: 259200
    }
    retries {
    }
    discovery_version: "v0.1"
    cache_serializable: true
  }
  interface {
    inputs {
      variables {
        key: "workflow_name"
        value {
          type {
            simple: STRING
          }
          description: "workflow_name"
        }
      }
      variables {
        key: "train_path"
        value {
          type {
            simple: STRING
          }
          description: "train_path"
        }
      }
      variables {
        key: "submit_train_kwargs"
        value {
          type {
            simple: STRUCT
          }
          description: "submit_train_kwargs"
        }
      }
      variables {
        key: "name"
        value {
          type {
            simple: STRING
          }
          description: "name"
        }
      }
      variables {
        key: "custom_params"
        value {
          type {
            simple: STRUCT
          }
          description: "custom_params"
        }
      }
      variables {
        key: "config"
        value {
          type {
            simple: STRUCT
          }
          description: "config"
        }
      }
    }
    outputs {
      variables {
        key: "o0"
        value {
          type {
            simple: STRING
          }
          description: "o0"
        }
      }
    }
  }
  k8s_pod {
    metadata {
    }
    pod_spec {
      fields {
        key: "tolerations"
        value {
          list_value {
            values {
              struct_value {
                fields {
                  key: "value"
                  value {
                    string_value: "true"
                  }
                }
                fields {
                  key: "operator"
                  value {
                    string_value: "Equal"
                  }
                }
                fields {
                  key: "key"
                  value {
                    string_value: "use-eight-gpu-big"
                  }
                }
                fields {
                  key: "effect"
                  value {
                    string_value: "NoSchedule"
                  }
                }
              }
            }
          }
        }
      }
      fields {
        key: "nodeSelector"
        value {
          struct_value {
            fields {
              key: "stripe.io/host-set"
              value {
                string_value: "eight-gpu-big"
              }
            }
          }
        }
      }
      fields {
        key: "containers"
        value {
          list_value {
            values {
              struct_value {
                fields {
                  key: "resources"
                  value {
                    struct_value {
                      fields {
                        key: "requests"
                        value {
                          struct_value {
                            fields {
                              key: "memory"
                              value {
                                string_value: "5Gi"
                              }
                            }
                            fields {
                              key: "cpu"
                              value {
                                string_value: "10m"
                              }
                            }
                          }
                        }
                      }
                      fields {
                        key: "limits"
                        value {
                          struct_value {
                            fields {
                              key: "memory"
                              value {
                                string_value: "5Gi"
                              }
                            }
                            fields {
                              key: "cpu"
                              value {
                                string_value: "1"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
                fields {
                  key: "name"
                  value {
                    string_value: "primary"
                  }
                }
                fields {
                  key: "image"
                  value {
                    string_value: "placeholder.image/docker:latest"
                  }
                }
                fields {
                  key: "env"
                  value {
                    list_value {
                    }
                  }
                }
                fields {
                  key: "command"
                  value {
                    list_value {
                    }
                  }
                }
                fields {
                  key: "args"
                  value {
                    list_value {
                      values {
                        string_value: "pyflyte-execute"
                      }
                      values {
                        string_value: "--inputs"
                      }
                      values {
                        string_value: "{{.input}}"
                      }
                      values {
                        string_value: "--output-prefix"
                      }
                      values {
                        string_value: "{{.outputPrefix}}"
                      }
                      values {
                        string_value: "--raw-output-data-prefix"
                      }
                      values {
                        string_value: "{{.rawOutputDataPrefix}}"
                      }
                      values {
                        string_value: "--checkpoint-path"
                      }
                      values {
                        string_value: "{{.checkpointOutputPrefix}}"
                      }
                      values {
                        string_value: "--prev-checkpoint"
                      }
                      values {
                        string_value: "{{.prevCheckpointPrefix}}"
                      }
                      values {
                        string_value: "--resolver"
                      }
                      values {
                        string_value: "src.python.flyte.fraud_intelligence.utils.tasks.fi_task_resolver"
                      }
                      values {
                        string_value: "--"
                      }
                      values {
                        string_value: "task-module"
                      }
                      values {
                        string_value: "src.python.flyte.fraud_intelligence.utils.railyard"
                      }
                      values {
                        string_value: "task-name"
                      }
                      values {
                        string_value: "train_dnn_g5"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  config {
    key: "primary_container_name"
    value: "primary"
  }
}
description {
  long_description {
    format: DESCRIPTION_FORMAT_RST
  }
}
cc @thankful-minister-83577 could you help take a look?
t
that plugin became too unwieldy… forcing people to use a plugin task to do simple k8s constructs.
h
All of our tasks are showing up as the pb files with "container", except this one.
t
oh
yeah someone wanted to specify a pod i guess
h
I am very confusing why this will show up, since I haven't found anywhere will specify a pod in our code..
that field isn’t used anywhere?
h
I see
This task is using g5 instance, it has a special pod_template
Do that the reason?
t
yup
h
Gotcha!
Why the
container
field will disappear if we have the pod_template?
t
because a pod already has a Container, it would be confusing to specify both (i.e. because the
target
field is a oneof in the TaskTemplate message)
👍🏼 1
g
hey, quick follow-up here, is this behavior the same if we use
task_config
with flytekitplugins-pod? I didn't see
python_auto_container
referring to it so I assume it's passed directly to configure the plugin but I'm not sure if it causes a pb change some other way
that plugin became too unwieldy… forcing people to use a plugin task to do simple k8s constructs.
hmm are you recommending against using the plugin? iiuc the
pod_template
is not supported in
with_overrides
but
task_config
(which I assume you need the plugin for) is supported here
I see there's an RFC and an issue for this - I guess general support for overrides including pod spec is not implemented yet?
t
you shouldn’t need to use the pod plugin anymore. that is effectively deprecated.
😮 1
you can achieve the same thing with stock flytekit now.
it’s left around just for backwards compatibility, but we should mark it as deprecated. let me push a pr
g
hmm I don't see an override option for
pod_template
but I do see one for
task_config
here and I saw a previous thread where a user used the plugin for the same reason
you can achieve the same thing with stock flytekit now.
I may have misunderstood that thread though - does this mean there's a way to override
pod_template
now or was that feature never possible?
t
what do you mean override pod template?
you can specify a pod template…
not sure if that counts as overriding
g
oh I meant in
with_overrides
here
t
oh
that is orthogonal to whether or not the plugin is needed right?
it is not… we can add it.
can you submit a ticket? or would you be up for putting in the change?
g
is the change just adding a case to the function? I wasn't sure if there was another reason it wasn't here
I can definitely start a ticket though
t
yeah, at some point we need to clean that up also.
1
make a ticket
i’ll try to get to it this week.
g
thank you!!
hmm could you link the ticket? I'd love to follow it
t
can you make the ticket?
it helps us keep track of where requests come from
g
ah I read
make a ticket
as
made a ticket
🤦 I'll make one rn