Chris Arderne
05/31/2023, 10:25 AM...-kubernetes
Docker images (eg prefect/2.10.11-python3.11-kubernetes
) if you're running on kubernetes but don't plan to use any functionality from the prefect-kuberentes
Python package?imran
05/31/2023, 11:02 AMJuan Luis Cano Rodríguez
05/31/2023, 11:06 AMPrefectHQ/server
install metadata, I see
install_requires = [
"prefect >= 1.0.0, < 2.0.0",
https://github.com/PrefectHQ/server/blob/c6e4627bb6d280fd76924ef245ed870089164bdb/setup.py#L7-L8
is it possible to fully self-host Prefect 2.0 yes or no?Noam Banay
05/31/2023, 11:50 AMSonia Goyal
05/31/2023, 11:55 AMState Message
Flow could not be retrieved from deployment. Traceback (most recent call last): File "<frozen importlib._bootstrap_external>", line 846, in exec_module File "<frozen importlib._bootstrap_external>", line 982, in get_code File "<frozen importlib._bootstrap_external>", line 1039, in get_data FileNotFoundError: [Errno 2] No such file or directory: 'flow_name.py' The above exception was the direct cause of the following exception: ScriptError: Script at 'flow_name.py' encountered an exception: FileNotFoundError(2, 'No such file or directory')
Below is our dir structure in github
└── src
├── dev
│ └── flows
│ ├── flow
│ │ ├── README.md
│ │ ├── flow_name.py
│ │ ├── flow_deployment.py
And the deployment file is like this
from flow import flow
from prefect.blocks.system import JSON
from prefect.deployments import Deployment
from prefect.filesystems import GitHub
storage = GitHub.load("gh-poc")
FLOW_NAME = "flow_name"
deployment = Deployment.build_from_flow(
flow=flow_name,
name=FLOW_NAME,
parameters={},
storage=storage,
path="src/dev/flows/flow_name",
skip_upload=True,
)
if __name__ == "__main__":
deployment.apply()
print("Deployment applied")
Gosia
05/31/2023, 12:24 PMShellOperation
in some of my Prefect task for long running processes. Is there a way to see the output of such process while it’s still running? Currently the output only shows in Prefect logs after the process has finished.Deceivious
05/31/2023, 1:34 PMyair friedman
05/31/2023, 2:59 PMJared Rhodes
05/31/2023, 3:27 PMMitch
05/31/2023, 3:50 PMNathan Low
05/31/2023, 5:48 PMChad Cook
05/31/2023, 6:06 PMTheo Platt
06/01/2023, 12:22 AMinfra_overrides={"env": {"PREFECT_LOGGING_LEVEL": "INFO", "PREFECT_LOGGING_CONFIG": "logging.yml"}},
But I can't see any changes being reflected in the logging output. Any ideas?
ThanksNick Batchelder
06/01/2023, 12:42 AMfrom prefect import task, flow
@task
def initialize_pycuda():
import pycuda.autoinit
print("Initialized...")
@flow(log_prints=True)
def my_flow():
f = initialize_pycuda()
if __name__ == "__main__":
my_flow()
When I run, I get:
00:38:51.036 | INFO | prefect.engine - Created flow run 'smiling-hog' for flow 'my-flow'
00:38:51.039 | INFO | Flow run 'smiling-hog' - View at <https://app.prefect.cloud/account/>...
00:38:51.600 | INFO | Flow run 'smiling-hog' - Created task run 'initialize_pycuda-0' for task 'initialize_pycuda'
00:38:51.601 | INFO | Flow run 'smiling-hog' - Executing 'initialize_pycuda-0' immediately...
00:38:52.864 | INFO | Task run 'initialize_pycuda-0' - Initialized...
-------------------------------------------------------------------
PyCUDA ERROR: The context stack was not empty upon module cleanup.
-------------------------------------------------------------------
A context was still active when the context stack was being
cleaned up. At this point in our execution, CUDA may already
have been deinitialized, so there is no way we can finish
cleanly. The program will be aborted now.
Use Context.pop() to avoid this problem.
-------------------------------------------------------------------
Aborted (core dumped)
When I remove the @task decorator, this flow works perfectly.Roman Zydyk
06/01/2023, 5:19 AMimran
06/01/2023, 6:54 AMimran
06/01/2023, 7:10 AMShane Breeze
06/01/2023, 8:56 AMTon Steijvers
06/01/2023, 11:43 AMLuis Cebrián
06/01/2023, 12:12 PMGregory Hunt
06/01/2023, 2:33 PMpg_trgm
and how is it used? All the starting guides just have you spin up a postgres container in docker which does not have this extension turned on?Nicholas
06/01/2023, 3:48 PMBase Job Template
section. So far, I found the only way is to use the PATCH
REST API, or is there a way to change settings via cli?Robin Doornekamp
06/01/2023, 4:13 PMDavid Michael Carter
06/01/2023, 4:52 PMdef generate_task_run_name_foo(dataset: dict, **kwargs):
return 'Foo: ' + dataset['name']
@task(max_retries=RETRY_COUNT, retry_delay=RETRY_DELAY, log_stdout=True, task_run_name=generate_task_run_name_foo)
def foo(dataset: dict):
...
Ofir
06/01/2023, 8:23 PMOfir
06/01/2023, 8:26 PMmlflow.update_registered_model()
?Timon Steuer
06/01/2023, 10:04 PMPedro Machado
06/01/2023, 10:57 PMexit(0)
but Prefect sees that as a crash. What is the recommended approach?
I am doing something like this:
@flow
def my_flow():
if not condition:
run_task()
exit(0)
do_other_stuff()
Austin Weisgrau
06/02/2023, 1:04 AMRajeev Lahoty
06/02/2023, 4:40 AM