Ansaf
09/11/2024, 4:28 AMOSError: source code not available
Its for a simple hello world flow. * The flow is being run from a local jupyter notebook * The notebook connects to a prefect server running in AWS EC2 * The dask cluster is running inside AWS ECS * The dask scheduler is running on a seperate EC2 instanceNate
09/11/2024, 4:45 AMprefect version
for you?Ansaf
09/11/2024, 4:56 AMAnsaf
09/11/2024, 4:57 AM@task
def hello_task():
return "Hello, World!"
@flow(task_runner=DaskTaskRunner(address="<tcp://xx.xx.xx.xx:8786>"))
def hello_flow():
result = hello_task.submit().result()
print(result)
Ansaf
09/11/2024, 4:58 AMAnsaf
09/11/2024, 4:59 AMAnsaf
09/11/2024, 5:12 AMfrom dask.distributed import Client
import time
client = Client("<tcp://xx.xx.xx.xx:8786>")
def test_func():
for x in range(4):
print("Hello, World!")
time.sleep(1)
return "Done"
# Submit the function to Dask workers
future = client.submit(test_func)
result = future.result()
print(result)
Ansaf
09/12/2024, 12:45 AM