Greg Desmarais
07/21/2020, 2:08 PMprefecthq/prefect:all_extras
is running python 3.8 - this seems to require all clients to move to 3.8, as cloudpickle might be sensitive to the version difference. Am I right on that? Is the position of the prefect team that everything needs to be on py 3.8? I might not have rtfm enough...Jim Crist-Harif
07/21/2020, 2:11 PMGreg Desmarais
07/21/2020, 2:14 PMJim Crist-Harif
07/21/2020, 2:15 PMGreg Desmarais
07/21/2020, 2:15 PMJim Crist-Harif
07/21/2020, 2:15 PMGreg Desmarais
07/21/2020, 2:17 PM(rightsize-venv) MacBook-Pro:scripts gdesmarais$ python --version
Python 3.7.8
that, after the hopps of getting it deployed on fargate, results in the following message on the AWS side:
2020-07-21T09:56:16.831-04:00
[2020-07-21 13:56:16] INFO - prefect.S3 | Downloading datasciences/prefect_flows/dask_cloud_provider_test from celsius-temp-data
2020-07-21T09:56:17.050-04:00
an integer is required (got type bytes)
2020-07-21T09:56:17.052-04:00
Traceback (most recent call last):
2020-07-21T09:56:17.052-04:00
File "/usr/local/bin/prefect", line 8, in <module>
2020-07-21T09:56:17.052-04:00
sys.exit(cli())
2020-07-21T09:56:17.052-04:00
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
2020-07-21T09:56:17.052-04:00
return self.main(*args, **kwargs)
2020-07-21T09:56:17.052-04:00
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 782, in main
2020-07-21T09:56:17.052-04:00
rv = self.invoke(ctx)
2020-07-21T09:56:17.052-04:00
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
2020-07-21T09:56:17.052-04:00
return _process_result(sub_ctx.command.invoke(sub_ctx))
2020-07-21T09:56:17.052-04:00
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
2020-07-21T09:56:17.052-04:00
return _process_result(sub_ctx.command.invoke(sub_ctx))
2020-07-21T09:56:17.052-04:00
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
2020-07-21T09:56:17.052-04:00
return ctx.invoke(self.callback, **ctx.params)
2020-07-21T09:56:17.052-04:00
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
2020-07-21T09:56:17.052-04:00
return callback(*args, **kwargs)
2020-07-21T09:56:17.052-04:00
File "/usr/local/lib/python3.8/site-packages/prefect/cli/execute.py", line 80, in cloud_flow
2020-07-21T09:56:17.052-04:00
raise exc
2020-07-21T09:56:17.052-04:00
File "/usr/local/lib/python3.8/site-packages/prefect/cli/execute.py", line 69, in cloud_flow
2020-07-21T09:56:17.052-04:00
flow = storage.get_flow(storage.flows[flow_data.name])
2020-07-21T09:56:17.052-04:00
File "/usr/local/lib/python3.8/site-packages/prefect/environments/storage/s3.py", line 90, in get_flow
2020-07-21T09:56:17.052-04:00
return cloudpickle.loads(output)
2020-07-21T09:56:17.052-04:00
TypeError: an integer is required (got type bytes)
From what I gather, that error message is indicative of a py version mismatch and cloudpickle.Jim Crist-Harif
07/21/2020, 2:20 PMGreg Desmarais
07/21/2020, 2:20 PMJim Crist-Harif
07/21/2020, 2:24 PMGreg Desmarais
07/21/2020, 2:25 PMJim Crist-Harif
07/21/2020, 2:25 PMGreg Desmarais
07/21/2020, 2:26 PMENTRYPOINT ["tini", "-g", "--", "/usr/bin/prepare.sh"]
Jim Crist-Harif
07/21/2020, 2:29 PMprefect
, ideally the same version as used locally when developing/registering. Things may work if they aren't the same, but no guarantees.
• Any helper code not contained directly in the same file that created the flow.
• Ideally the same major version of python as registered with. If using pickle-based storage this is more a requirement than a suggestion.Greg Desmarais
07/21/2020, 2:30 PMJim Crist-Harif
07/21/2020, 2:30 PMprepare.sh
does, but using tini
is a good option. Sorry, not sure I understand the question here.Greg Desmarais
07/21/2020, 2:30 PMJim Crist-Harif
07/21/2020, 2:33 PMGreg Desmarais
07/21/2020, 2:33 PMJim Crist-Harif
07/21/2020, 2:33 PMGreg Desmarais
07/21/2020, 2:34 PMJim Crist-Harif
07/21/2020, 2:35 PMGreg Desmarais
07/21/2020, 2:35 PMJim Crist-Harif
07/21/2020, 2:37 PMGreg Desmarais
07/21/2020, 2:37 PMJim Crist-Harif
07/21/2020, 2:37 PMGreg Desmarais
07/21/2020, 2:38 PMJim Crist-Harif
07/21/2020, 2:38 PMGreg Desmarais
07/21/2020, 2:38 PMJim Crist-Harif
07/21/2020, 2:51 PMEnvironment
class are you using?Greg Desmarais
07/21/2020, 2:56 PMexecutor = DaskExecutor(cluster_class='dask_cloudprovider.FargateCluster',
cluster_kwargs=cluster_kwargs)
flow.environment = FargateTaskEnvironment(
executor=executor,
region_name=DEFAULT_REGION,
metadata=metadata,
**task_definition_kwargs
)
Jim Crist-Harif
07/21/2020, 2:59 PMFargateTaskEnvironment
kicks off an intermediate fargate task that launches another fargate task where the flow actually runs. Are you seeing both tasks start successfully? Just the first one?Greg Desmarais
07/21/2020, 6:50 PMJim Crist-Harif
07/21/2020, 6:55 PMGreg Desmarais
07/21/2020, 7:01 PMJim Crist-Harif
07/21/2020, 7:02 PMGreg Desmarais
07/21/2020, 7:03 PM