creamy-energy-49433
02/07/2024, 10:01 PMfrom flytekit import task, workflow
@task
def say_hello(name: str) -> str:
return f"Hello, {name}!"
@workflow
def hello_world_wf(name: str = 'world') -> str:
res = say_hello(name=name)
return res
if __name__ == "__main__":
print(f"Running wf() {hello_world_wf(name='passengers')}")
Here is the command I'm running it with:
pyflyte --config config.yaml run --remote hello_world.py hello_world_wf --name "test"
The say_hello task fails with: "tar: Removing leading `/' from member names".
I tried updating the flyte-binary chart values as was mentioned in the references thread with:
configuration:
inline:
task_resources:
defaults:
cpu: 1000m
memory: 1000Mi
storage: 1000Mi
limits:
memory: 2000Mi
But I still recieve the OOMKilled issue. Is that the correct place to configure the execution deployment?proud-answer-87162
02/07/2024, 10:09 PMdomain: development
project: flyte
defaults:
cpu: "1"
memory: "1Gi"
limits:
cpu: "1"
memory: "1Gi"
proud-answer-87162
02/07/2024, 10:09 PMflytectl update task-resource-attribute --attrFile config.yaml
creamy-energy-49433
02/07/2024, 10:12 PM{
"json": {},
"level": "error",
"msg": "error unmarshaling JSON: while decoding JSON: json: unknown field \"admin\"",
"ts": "2024-02-07T15:12:01-07:00"
}
when I try to run thatcreamy-energy-49433
02/07/2024, 10:13 PMcreamy-energy-49433
02/07/2024, 10:13 PMadmin:
# For GRPC endpoints you might want to use dns:///flyte.myexample.com
endpoint: dns:///localhost:8089
authType: Pkce
insecure: true
logger:
show-source: true
level: 0
domain: development
project: flyte
defaults:
cpu: "1"
memory: "1Gi"
limits:
cpu: "1"
memory: "1Gi"
proud-answer-87162
02/07/2024, 10:13 PMcreamy-energy-49433
02/07/2024, 10:14 PMcreamy-energy-49433
02/07/2024, 10:15 PMproud-answer-87162
02/07/2024, 10:16 PMkubectl get pods {podname} -n {namespace} -o yaml
, what do you see in the resources
section?creamy-energy-49433
02/07/2024, 10:16 PMf1356549b38a24b40a3c-n0-0 0/1 OOMKilled 0 6h41m
f17851e152bc5403b8b4-n0-0 0/1 OOMKilled 0 73m
f2707872a787246bc806-n0-0 0/1 OOMKilled 0 4h27m
f7ecf98631fcf4a60b88-n0-0 0/1 OOMKilled 0 68m
f964680826e7049dda77-n0-0 0/1 OOMKilled 0 3h10m
fa086beacc2d94fbfb83-n0-0 0/1 OOMKilled 0 107m
faae043eabec347428f4-n0-0 0/1 OOMKilled 0 3m20s
creamy-energy-49433
02/07/2024, 10:16 PMproud-answer-87162
02/07/2024, 10:16 PMkubectl get pods f1356549b38a24b40a3c-n0-0 -o yaml
proud-answer-87162
02/07/2024, 10:17 PMcreamy-energy-49433
02/07/2024, 10:18 PMapiVersion: v1
kind: Pod
metadata:
annotations:
<http://cluster-autoscaler.kubernetes.io/safe-to-evict|cluster-autoscaler.kubernetes.io/safe-to-evict>: "false"
primary_container_name: f1356549b38a24b40a3c-n0-0
creationTimestamp: "2024-02-07T15:32:34Z"
labels:
domain: development
execution-id: f1356549b38a24b40a3c
interruptible: "false"
node-id: n0
project: flytesnacks
shard-key: "15"
task-name: workflows-example-say-hello
workflow-name: workflows-example-wf
name: f1356549b38a24b40a3c-n0-0
namespace: flytesnacks-development
ownerReferences:
- apiVersion: <http://flyte.lyft.com/v1alpha1|flyte.lyft.com/v1alpha1>
blockOwnerDeletion: true
controller: true
kind: flyteworkflow
name: f1356549b38a24b40a3c
uid: ed8b03d3-3548-4904-88a7-ba53357d995b
resourceVersion: "45428602"
uid: a5d43e57-3a6f-437f-bed1-e3a6b3837dc5
spec:
affinity: {}
containers:
- args:
- pyflyte-fast-execute
- --additional-distribution
- <s3://titanflow-flyte-metadata/flytesnacks/development/2TYAHUQ3Q2NXEQIIS6IT2RLYS4======/script_mode.tar.gz>
- --dest-dir
- .
- --
- pyflyte-execute
- --inputs
- <s3://titanflow-flyte-metadata/metadata/propeller/flytesnacks-development-f1356549b38a24b40a3c/n0/data/inputs.pb>
- --output-prefix
- <s3://titanflow-flyte-metadata/metadata/propeller/flytesnacks-development-f1356549b38a24b40a3c/n0/data/0>
- --raw-output-data-prefix
- <s3://titanflow-flyte-userdata/data/zj/f1356549b38a24b40a3c-n0-0>
- --checkpoint-path
- <s3://titanflow-flyte-userdata/data/zj/f1356549b38a24b40a3c-n0-0/_flytecheckpoints>
- --prev-checkpoint
- '""'
- --resolver
- flytekit.core.python_auto_container.default_task_resolver
- --
- task-module
- workflows.example
- task-name
- say_hello
env:
- name: FLYTE_INTERNAL_EXECUTION_WORKFLOW
value: flytesnacks:development:<http://workflows.example.wf|workflows.example.wf>
- name: FLYTE_INTERNAL_EXECUTION_ID
value: f1356549b38a24b40a3c
- name: FLYTE_INTERNAL_EXECUTION_PROJECT
value: flytesnacks
- name: FLYTE_INTERNAL_EXECUTION_DOMAIN
value: development
- name: FLYTE_ATTEMPT_NUMBER
value: "0"
- name: FLYTE_INTERNAL_TASK_PROJECT
value: flytesnacks
- name: FLYTE_INTERNAL_TASK_DOMAIN
value: development
- name: FLYTE_INTERNAL_TASK_NAME
value: workflows.example.say_hello
- name: FLYTE_INTERNAL_TASK_VERSION
value: Zi8CreB-Mt7L3ki48QSLjg
- name: FLYTE_INTERNAL_PROJECT
value: flytesnacks
- name: FLYTE_INTERNAL_DOMAIN
value: development
- name: FLYTE_INTERNAL_NAME
value: workflows.example.say_hello
- name: FLYTE_INTERNAL_VERSION
value: Zi8CreB-Mt7L3ki48QSLjg
- name: AWS_METADATA_SERVICE_TIMEOUT
value: "5"
- name: AWS_METADATA_SERVICE_NUM_ATTEMPTS
value: "20"
- name: AWS_STS_REGIONAL_ENDPOINTS
value: regional
- name: AWS_DEFAULT_REGION
value: us-east-1
- name: AWS_REGION
value: us-east-1
- name: AWS_ROLE_ARN
value: arn:aws:iam::476134988768:role/CustomerManagedBasic-Iceberg-Writer
- name: AWS_WEB_IDENTITY_TOKEN_FILE
value: /var/run/secrets/eks.amazonaws.com/serviceaccount/token
image: <http://cr.flyte.org/flyteorg/flytekit:py3.10-1.10.3|cr.flyte.org/flyteorg/flytekit:py3.10-1.10.3>
imagePullPolicy: IfNotPresent
name: f1356549b38a24b40a3c-n0-0
resources:
limits:
cpu: "2"
memory: 200Mi
requests:
cpu: "2"
memory: 200Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: FallbackToLogsOnError
volumeMounts:
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
name: kube-api-access-xxjf5
readOnly: true
- mountPath: /var/run/secrets/eks.amazonaws.com/serviceaccount
name: aws-iam-token
readOnly: true
dnsPolicy: ClusterFirst
enableServiceLinks: true
nodeName: ip-10-80-48-151.ec2.internal
preemptionPolicy: PreemptLowerPriority
priority: 0
restartPolicy: Never
schedulerName: default-scheduler
securityContext: {}
serviceAccount: default
serviceAccountName: default
terminationGracePeriodSeconds: 30
tolerations:
- effect: NoExecute
key: <http://node.kubernetes.io/not-ready|node.kubernetes.io/not-ready>
operator: Exists
tolerationSeconds: 300
- effect: NoExecute
key: <http://node.kubernetes.io/unreachable|node.kubernetes.io/unreachable>
operator: Exists
tolerationSeconds: 300
volumes:
- name: aws-iam-token
projected:
defaultMode: 420
sources:
- serviceAccountToken:
audience: <http://sts.amazonaws.com|sts.amazonaws.com>
expirationSeconds: 86400
path: token
- name: kube-api-access-xxjf5
projected:
defaultMode: 420
sources:
- serviceAccountToken:
expirationSeconds: 3607
path: token
- configMap:
items:
- key: ca.crt
path: ca.crt
name: kube-root-ca.crt
- downwardAPI:
items:
- fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
path: namespace
status:
conditions:
- lastProbeTime: null
lastTransitionTime: "2024-02-07T15:32:34Z"
status: "True"
type: Initialized
- lastProbeTime: null
lastTransitionTime: "2024-02-07T15:32:40Z"
reason: PodFailed
status: "False"
type: Ready
- lastProbeTime: null
lastTransitionTime: "2024-02-07T15:32:40Z"
reason: PodFailed
status: "False"
type: ContainersReady
- lastProbeTime: null
lastTransitionTime: "2024-02-07T15:32:34Z"
status: "True"
type: PodScheduled
containerStatuses:
- containerID: <containerd://1eecc22aaff2d2a6baeeee33454962f0f12ae8cf804367a7353b93b091da033>5
image: <http://cr.flyte.org/flyteorg/flytekit:py3.10-1.10.3|cr.flyte.org/flyteorg/flytekit:py3.10-1.10.3>
imageID: <http://cr.flyte.org/flyteorg/flytekit@sha256:749fc0ab76071ab5f3d207e1e06071a170233a346cfc7b7fe5d4652655621a33|cr.flyte.org/flyteorg/flytekit@sha256:749fc0ab76071ab5f3d207e1e06071a170233a346cfc7b7fe5d4652655621a33>
lastState: {}
name: f1356549b38a24b40a3c-n0-0
ready: false
restartCount: 0
started: false
state:
terminated:
containerID: <containerd://1eecc22aaff2d2a6baeeee33454962f0f12ae8cf804367a7353b93b091da033>5
exitCode: 137
finishedAt: "2024-02-07T15:32:40Z"
message: |
tar: Removing leading `/' from member names
reason: OOMKilled
startedAt: "2024-02-07T15:32:37Z"
hostIP: 2001:55a:2000:3601:7d80:89ad:6702:27eb
phase: Failed
podIP: 2001:55a:2000:3601:a9f5::c
podIPs:
- ip: 2001:55a:2000:3601:a9f5::c
qosClass: Guaranteed
startTime: "2024-02-07T15:32:34Z"
proud-answer-87162
02/07/2024, 10:19 PMresources:
limits:
cpu: "2"
memory: 200Mi
requests:
cpu: "2"
memory: 200Mi
creamy-energy-49433
02/07/2024, 10:19 PMproud-answer-87162
02/07/2024, 10:19 PMauthType: Pkce
?proud-answer-87162
02/07/2024, 10:19 PMcreamy-energy-49433
02/07/2024, 10:22 PMcreamy-energy-49433
02/07/2024, 10:22 PMproud-answer-87162
02/07/2024, 10:23 PMproud-answer-87162
02/07/2024, 10:23 PM~/.flyte/config.yaml
- that's the default location flytekit looks for the config. then you won't need to pass the location as an argumentcreamy-energy-49433
02/07/2024, 10:24 PMproud-answer-87162
02/07/2024, 10:24 PMcreamy-energy-49433
02/07/2024, 10:25 PMcreamy-energy-49433
02/07/2024, 10:25 PMproud-answer-87162
02/07/2024, 10:26 PMtaskconfig.yaml
file in your task project dirproud-answer-87162
02/07/2024, 10:26 PMflytectl update task-resource-attribute --attrFile taskconfig.yaml
proud-answer-87162
02/07/2024, 10:27 PMdomain: development
project: flyte-az
defaults:
cpu: "1"
memory: "1Gi"
limits:
cpu: "1"
memory: "1Gi"
proud-answer-87162
02/07/2024, 10:27 PMcreamy-energy-49433
02/07/2024, 10:29 PMflytectl update task-resource-attribute --attrFile taskconfig.yaml
I get
Error:
strict mode is on but received keys [map[defaults:{} limits:{}]] to decode with no config assigned to receive them: failed strict mode check
ERRO[0000]
strict mode is on but received keys [map[defaults:{} limits:{}]] to decode with no config assigned to receive them: failed strict mode check src="main.go:13"
creamy-energy-49433
02/07/2024, 10:31 PMUpdating the task resource attribute is only available from a generated file. See the get section for generating this file.
proud-answer-87162
02/07/2024, 10:33 PMproud-answer-87162
02/07/2024, 10:34 PMk8s
section. then add the following block:
k8s:
plugins:
default-cpus: 500m
default-memory: 512Mi
creamy-energy-49433
02/07/2024, 10:39 PMbrew info flytectl
==> flyteorg/tap/flytectl: stable 0.8.10
creamy-energy-49433
02/07/2024, 10:42 PMproud-answer-87162
02/07/2024, 10:42 PMcreamy-energy-49433
02/07/2024, 10:42 PMk8s
proud-answer-87162
02/07/2024, 10:44 PMconfigmap:
proud-answer-87162
02/07/2024, 10:46 PMconfiguration:
inline:
task_resources:
defaults:
cpu: 100m
memory: 100Mi
storage: 100Mi
limits:
memory: 2Gi
creamy-energy-49433
02/07/2024, 10:47 PMcreamy-energy-49433
02/07/2024, 10:50 PMcreamy-energy-49433
02/07/2024, 10:51 PMproud-answer-87162
02/07/2024, 10:52 PMaverage-finland-92144
02/08/2024, 3:18 PM