Sanil Khurana
09/28/2021, 1:08 PMFailed to load and execute Flow's environment: UnpicklingError("invalid load key, '{'.")
I have configured the roles to have complete S3, ECS access. I have checked the file on S3 as well and it gets uploaded fine, {"flow": "gASVPgk....aFtdlHViLg==", "versions": {"cloudpickle": "2.0.0", "prefect": "0.15.6", "python": "3.7.10"}}
. I think the only place it is messing up is that the Fargate instance is not able to pick up the task properly.
Any idea what I may be missing? Really appreciate the help. Thanks in advance.Kevin Kho
Sanil Khurana
09/28/2021, 1:54 PMcloudpickle==2.0.0
prefect==0.15.6
Here is my python script
import prefect
from prefect.storage import S3
from prefect.run_configs import ECSRun
from prefect import task, Flow
import pandas as pd
RUN_CONFIG = ECSRun(
task_role_arn="arn:aws:iam::***:role/ecsTaskExecutionRole",
image="anisienia/prefect-pydata",
memory=512, cpu=256
)
STORAGE = S3(bucket = '***')
@task
def say_hello():
logger = prefect.context.get("logger")
df = pd.DataFrame({'col1': [1, 2], 'col2': [3, 4]})
<http://logger.info|logger.info>(f"Hello form prefect {df}")
with Flow("s3_pandas", storage = STORAGE, run_config = RUN_CONFIG) as flow:
say_hello()
flow.register(project_name = my_proj")
I think you may be correct, the image I am using was built 8 months ago, from the prefect version 0.14.1
.
Thanks for replying! I will take a look at it if that is the caseKevin Kho
Sanil Khurana
09/28/2021, 4:07 PMKevin Kho