Ben Ayers-Glassey
04/09/2023, 4:41 AMfrom time import sleep
from prefect import task, flow
@task
def t(n):
print(f"Starting: {n}")
sleep(3)
print(f"...done: {n}")
return n * 10
@flow
def f():
# These are run serially:
t(1)
t(2)
# These are run in parallel (including t(6)!):
t.map([3, 4, 5])
t(6)
^ It makes sense to me that t.map([3, 4, 5])
would run in parallel, but why is t(6)
run in parallel with them?..
Does the use of .map
cause the flow to switch from a serial to parallel "execution mode" of some kind?..Choenden Kyirong
04/09/2023, 6:01 PMprefect_sqlalchemy.SqlAlchemyConnector
with execute_many(insert_query, seq_of_parameters)
where seq_of_parameters
has all the rows. This seems to take an extremely long time- a bit of a newbie here and i’m wondering if there are any approaches or advice for doing something like this?
Thanks!Stephen Lloyd
04/10/2023, 10:06 AMjcozar
04/10/2023, 10:07 AMS3
storage. I have a simple flow and a deployment for that flow. I'm using storage=S3(bucket_path="...")
It correctly uploads everything in the folder where I run the python file with my deployment (I can ignore some files using .prefectignore file). However, it uploads everything to the bucket. I can use the path
argument of the deployment to myflow
so files are uploaded inside that prefix in my bucket. The problem is that when I run a flow, the agent does not find the flow and it crashes.
Am I doing something wrong? Thank you!Gabriel Moran
04/10/2023, 1:40 PMDeployment.build_from_flow
in AWS ECS. Do you have any idea of what could be happening? I tried updating the deployment configuration in a lot of ways but it didn't help. The deployment is configured to store the flow in S3 and I think the permissions are correctly configured.
Traceback (most recent call last):
File "/app/flows/register_flows.py", line 88, in <module>
asyncio.run(register_flows())
File "/usr/local/lib/python3.8/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/local/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/app/flows/register_flows.py", line 71, in register_flows
deployment = await Deployment.build_from_flow(
File "/usr/local/lib/python3.8/site-packages/prefect/deployments.py", line 793, in build_from_flow
await deployment.upload_to_storage(ignore_file=ignore_file)
File "/usr/local/lib/python3.8/site-packages/prefect/deployments.py", line 638, in upload_to_storage
file_count = await self.storage.put_directory(
File "/usr/local/lib/python3.8/site-packages/prefect/filesystems.py", line 497, in put_directory
return await self.filesystem.put_directory(
File "/usr/local/lib/python3.8/site-packages/prefect/filesystems.py", line 352, in put_directory
included_files = filter_files(
File "/usr/local/lib/python3.8/site-packages/prefect/utilities/filesystem.py", line 42, in filter_files
ignored_files = {p.path for p in spec.match_tree_entries(root)}
File "/usr/local/lib/python3.8/site-packages/prefect/utilities/filesystem.py", line 42, in <setcomp>
ignored_files = {p.path for p in spec.match_tree_entries(root)}
File "/usr/local/lib/python3.8/site-packages/pathspec/pathspec.py", line 239, in match_tree_entries
yield from self.match_entries(entries)
File "/usr/local/lib/python3.8/site-packages/pathspec/pathspec.py", line 155, in match_entries
for entry in entries:
File "/usr/local/lib/python3.8/site-packages/pathspec/util.py", line 175, in iter_tree_entries
yield from _iter_tree_entries_next(os.path.abspath(root), '', {}, on_error, follow_links)
File "/usr/local/lib/python3.8/site-packages/pathspec/util.py", line 245, in _iter_tree_entries_next
yield from _iter_tree_entries_next(root_full, node_rel, memo, on_error, follow_links)
File "/usr/local/lib/python3.8/site-packages/pathspec/util.py", line 245, in _iter_tree_entries_next
yield from _iter_tree_entries_next(root_full, node_rel, memo, on_error, follow_links)
File "/usr/local/lib/python3.8/site-packages/pathspec/util.py", line 245, in _iter_tree_entries_next
yield from _iter_tree_entries_next(root_full, node_rel, memo, on_error, follow_links)
[Previous line repeated 3 more times]
File "/usr/local/lib/python3.8/site-packages/pathspec/util.py", line 214, in _iter_tree_entries_next
raise RecursionError(real_path=dir_real, first_path=memo[dir_real], second_path=dir_rel)
pathspec.util.RecursionError: ('/', '', 'proc/self/task/12/fd/12')
Santhosh Solomon (Fluffy)
04/10/2023, 2:23 PMAlissa Wang
04/10/2023, 3:29 PMcreate_task_run
error trying to run a task in a for loop, wondering if anyone has run into this before (error in thread):Manoj Babu
04/10/2023, 4:15 PMPatrick Tan
04/10/2023, 6:11 PMalex
04/10/2023, 6:52 PMArnav Gupta
04/10/2023, 7:05 PMAdam
04/10/2023, 7:45 PMprefect project recipe ls
. got an error FileNotFoundError: [Errno 2] No such file or directory: '/Users/adamdorenfeld/.pyenv/versions/3.11.2/lib/python3.11/src/prefect/projects/recipes
version and full error in thread.Matthew Scanlon
04/10/2023, 7:47 PM15:40:34.109 | ERROR | Task run '<name>' - Crash detected! Execution was interrupted by an unexpected exception: PrefectHTTPStatusError: Client error '404 Not Found' for url '<https://api.prefect.cloud/api/accounts/***/workspaces/***/task_runs/***/set_state>'
John O'Farrell
04/10/2023, 9:14 PM{bucket}/jobs/{Id}/prefect
but that doesn't seem to be working in prefect 2Jon
04/10/2023, 9:35 PMflow_run_name
in prefect 1. looks like the flow run name gets updated in the client in RenameFlowRun.run
, but the prefect context doesn't. is there an easy way to update the prefect context's flow_run_name
?Faheem Khan
04/11/2023, 6:12 AMMissingResult: The result was not persisted and is no longer available
Deceivious
04/11/2023, 8:49 AMtask concurrency limit tag
?Rudy García
04/11/2023, 1:59 PMMissi Sogbohossou
04/11/2023, 2:12 PMEd Burroughes
04/11/2023, 4:37 PMget_task_run_result
in prefect two or does that not exist anymore?Chris
04/11/2023, 5:03 PMAdrien Besnard
04/11/2023, 5:19 PMConfigMap
or `Secret`:
• Is it better to have a custom KubernetesJob
block with the proper customization to reference those resources and then access to the values through environment variables
• Or is it better to have a dedicated process to transform ConfigMap
and Secret
into blocks?Otacílio Ribeiro do Amaral Neto
04/11/2023, 5:31 PMGood afternoon.
I'm having problems with my account (<mailto:otacilio.ribeiro@iclinic.com.br|otacilio.ribeiro@iclinic.com.br>) that I can't log in or ask for a password change. How should I proceed to correct this error?
Thanks.
John O'Farrell
04/11/2023, 6:19 PMPatrick Tan
04/11/2023, 6:32 PMprefect work-pool create "my-pool"
Charles Leung
04/11/2023, 7:27 PMdatamongus
04/11/2023, 7:45 PMdatamongus
04/11/2023, 9:21 PMModuleNotFoundError: No module named 'prefect.artifacts'
John Horn
04/11/2023, 9:31 PMOrchestration API rate limit reached
I'm looking through the docs and trying to figure out if this is referring to flows or tasks etc? Because it isn't super specific which rate limit I've hitRohan Chutke
04/11/2023, 10:43 PM