Marwan Sarieddine
04/02/2021, 4:13 PMMarwan Sarieddine
04/02/2021, 4:14 PMclient.create_flow_run(flow_id=flow_id_to_use, context={"min_workers": 3, max_workers: "3"})
Will result in running our flow with the context properly updated (see the attached screenshot)Marwan Sarieddine
04/02/2021, 4:14 PMFailed to load and execute Flow's environment: StorageError("An error occurred while unpickling the flow:\n TypeError('code() takes at most 15 arguments (16 given)')\nThis may be due to one of the following version mismatches between the flow build and execution environments:\n - python: (flow built with '3.8.6', currently running with '3.7.10')")
What seems to be happening is that the UI has no way of loading our custom Kubernetes template that we used when we registered the flow, and so it falls back on the default prefect image (which uses python 3.7 and fails the flow).Marwan Sarieddine
04/02/2021, 4:16 PMnicholas
nicholas
Marvin
04/02/2021, 4:34 PMMarwan Sarieddine
04/02/2021, 4:39 PMnicholas
Marwan Sarieddine
04/02/2021, 4:42 PMnicholas
Marwan Sarieddine
04/02/2021, 5:02 PM{'apiVersion': 'batch/v1',
'kind': 'Job',
'metadata': {'labels': {'app': 'prefect-dask-job'},
'name': 'prefect-dask-job'},
'spec': {'template': {'metadata': {'annotations': {'<http://cluster-autoscaler.kubernetes.io/safe-to-evict|cluster-autoscaler.kubernetes.io/safe-to-evict>': 'false'},
'labels': {'app': 'prefect-dask-job'}},
'spec': {'affinity': {'nodeAffinity': {'requiredDuringSchedulingIgnoredDuringExecution': {'nodeSelectorTerms': [{'matchExpressions': [{'key': '<http://alpha.eksctl.io/nodegroup-name|alpha.eksctl.io/nodegroup-name>',
'operator': 'In',
'values': ['prefect-m5-xlarge']}]}]}}},
'containers': [{'env': [{'name': 'PREFECT__CONTEXT__ng_name',
'value': 'prefect-m5-xlarge'},
{'name': 'PREFECT__CONTEXT__add_not_safe_to_evict', 'value': 'True'},
{'name': 'PREFECT__CONTEXT__dask_memory_management', 'value': 'True'},
{'name': 'PREFECT__CONTEXT__worker_memory_gb', 'value': '3.6'},
{'name': 'PREFECT__CONTEXT__worker_cpu', 'value': '0.75'},
{'name': 'PREFECT__CONTEXT__scheduler_memory_gb', 'value': '12.0'},
{'name': 'PREFECT__CONTEXT__scheduler_cpu', 'value': '3.0'},
{'name': 'PREFECT__CONTEXT__min_workers', 'value': '1'},
{'name': 'PREFECT__CONTEXT__max_workers', 'value': '1'},
{'name': 'PREFECT__CONTEXT__death_timeout', 'value': '600'},
{'name': 'PREFECT__CONTEXT__use_nanny', 'value': 'False'},
{'name': 'PREFECT__CONTEXT__use_dashboard', 'value': 'False'},
{'name': 'PREFECT__CONTEXT__num_proc_per_worker', 'value': '1'},
{'name': 'PREFECT__CONTEXT__n_threads_per_process', 'value': '1'},
{'name': 'PREFECT__CONTEXT__dask_memory_limit', 'value': 'None'},
{'name': 'PREFECT__CONTEXT__scheduler_name', 'value': 'None'},
{'name': 'PREFECT__CONTEXT__scheduler_port', 'value': 'None'}],
'image': 'xxxxxxx:0.20.1',
'imagePullPolicy': 'IfNotPresent',
'name': 'flow',
'resources': {'limits': {'cpu': '1000m', 'memory': '3000M'},
'requests': {'cpu': '1000m', 'memory': '3000M'}}}],
'restartPolicy': 'Never'}}}}
Marwan Sarieddine
04/02/2021, 5:02 PMnicholas
Marwan Sarieddine
04/07/2021, 1:46 PMnicholas
Marwan Sarieddine
04/07/2021, 3:53 PM