https://prefect.io
Join Slack
Hello friends! I am running into some issues using an ECSCluster with the DaskExecutor. A brief over...
c

Chris Leber

about 4 years ago
Hello friends! I am running into some issues using an ECSCluster with the DaskExecutor. A brief overview of my setup: using Prefect cloud tied in with AWS infrastructure (e.g. running prefect-agent as a service on an ECSCluster) A flow might look something like this:
file_list = ['./file_1.txt', './file_2.txt', './file_3.txt', './file_4.txt', './file_5.txt', './file_6.txt', './file_7.txt', ..., './file_100.txt']

@task
def test_task(input_file):
    result = some_function(input_file)
    return result

def ecs_cluster(n_workers=4):
    """Start a ecs cluster using the same image as the flow run"""
    return ECSCluster(
        n_workers=n_workers, image=prefect.context.image, region_name="us-east-1"
    )


with Flow(
    "test flow",
    storage=S3(bucket="storage"),
    run_config=ECSRun(task_definition=task_definition),
) as flow:
    test_task.map(input_file=file_list)

flow.executor = DaskExecutor(
    cluster_class=ecs_cluster, cluster_kwargs={"n_workers": 10}
)
c
k
a
  • 3
  • 14
  • 328
I do get this warning ```RuntimeWarning: coroutine 'run_task_async' was never awaited return fn(*a...
c

cnsmyth

about 1 year ago
I do get this warning
RuntimeWarning: coroutine 'run_task_async' was never awaited
  return fn(*args, **kwargs)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Probably related?
c
n
d
  • 3
  • 18
  • 327
i keep getting RuntimeError: Failed to reach API at <http://127.0.0.1:4200> when i run my prefect fl...
c

cauchymike

about 1 year ago
i keep getting RuntimeError: Failed to reach API at http://127.0.0.1:4200 when i run my prefect flow. In my profiles.toml, i have set the PREFECT_API_URL. but i still keep getting the same error. I am currently using prefect==3.0.8
c
d
  • 2
  • 2
  • 323
Hi all, when I create a connection to a db using prefect.task.sql_server and I create a global temp ...
d

Dominic Pham

over 3 years ago
Hi all, when I create a connection to a db using prefect.task.sql_server and I create a global temp table, will the temp table persist even when the flow is done? Or will I have to explicitly close the connection as a final task in the flow?
discourse 1
d
k
a
  • 3
  • 7
  • 323
<@ULVA73B9P> how can i trigger a flow when another flow enters completed - both flows will have the ...
t

Thomas van Riet

about 1 year ago
@Marvin how can i trigger a flow when another flow enters completed - both flows will have the same parameters
t
m
b
  • 3
  • 4
  • 321
Can I return a python list from a Task implementation? I'm getting `TypeError: Task is not iterable....
h

haf

about 4 years ago
Can I return a python list from a Task implementation? I'm getting `TypeError: Task is not iterable. If your task returns multiple results, pass
nout
to the task decorator/constructor, or provide a
Tuple
return-type annotation to your task.` but I can't use
nout
because I don't know the result size and it is not a good fit for Tuple (since it's a list of tuple)
h
e
  • 2
  • 25
  • 321
Hi! quick question, what's the recommended approach to define the KubernetesJob resources (cpu and R...
m

Miguel Moncada

over 1 year ago
Hi! quick question, what's the recommended approach to define the KubernetesJob resources (cpu and RAM requests and limits) in a flow deployment to a Kubernetes based Work Pool?
def deploy_hello_flow():
    hello_flow.deploy(
        name="hello_flow_k8s_deployment",
        work_pool_name="default-worker-pool", # k8s work pool
        image="europe-docker.pkg.dev/cambium-earth/prefect-runners-prod/default:latest",
        tags=["prod"],
        schedule=CronSchedule(cron="0 12 1 * *", timezone="UTC"),
    )
šŸ™Œ 0
āœ… 1
m
j
  • 2
  • 20
  • 317
Hi all, I'm having an issue authenticating to Prefect through `prefect cloud login` . If I do browse...
m

Moe

over 1 year ago
Hi all, I'm having an issue authenticating to Prefect through
prefect cloud login
. If I do browser authentication it goes through the process, says successful and then aborts in terminal without asking me to select workspace. I also tried
prefect cloud login -k <key> -w <handle>/<workspace>
which just returns
"Unable to authenticate with Prefect Cloud. Your key is not in our expected format."
This is happening on one of my EC2 servers. Locally it is fine, I can authenticate with web browser authentication and it asks me to select workspace. Version is 2.10.21. What could be the issue? @Marvin
m
m
  • 2
  • 2
  • 317
hello, I struggle with the new projects feature and couldn't find any detailed example for dockerize...
e

Emma Rizzi

over 2 years ago
hello, I struggle with the new projects feature and couldn't find any detailed example for dockerized deployments, nor any list of parameters needed/accepted in prefect.yaml and deployment.yaml. I have deployed a flow with
prefect deployment build
and I am now trying to migrate to projects to create flows as docker images, but
prefect deploy
fails, details in thread
āœ… 1
e
a
  • 2
  • 16
  • 317
I'm curious if there is a way to use the `prefect deploy` CLI command non-interactively? I've define...
l

Luke Orland

over 1 year ago
I'm curious if there is a way to use the
prefect deploy
CLI command non-interactively? I've defined deployments in
./prefect.yaml
and would like the deployments to be created without answering these questions interactively, e.g. in a continuous deployment setting: •
Would you like to build a custom Docker image for this deployment? [y/n] (n):
•
Would you like to save configuration for this deployment for faster deployments in the future? [y/n]:
l
n
  • 2
  • 2
  • 316
Previous131415Next

Prefect Community

Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.

Powered by