Charles Marks
03/30/2024, 6:10 PMMarvin
03/30/2024, 6:13 PMdeployment.yaml. This step may include uploading your flow to a configured remote storage location if one is specified. Build Deployment
2. Where to Store Your Flow Code: You need to decide where to store your flow code. The storage options are discussed in the storage guide, which focuses on deployments created with the interactive CLI experience or a prefect.yaml file. Since you're interested in creating deployments using Python code, the guide suggests looking for that specific section in the documentation for respective instructions. Storage Guide
Unfortunately, I could not find a direct link with detailed instructions for the exact process of creating a deployment programmatically for a local worker with local storage. The last excerpt suggests further information could be available but does not provide a direct link.
I suggest looking directly into the Prefect documentation for "creating deployments using Python code" and checking the section related to local storage options and configuring a local worker. Implementing local storage and local worker configuration might require using specific Prefect API or classes in Python code, as it is not explicitly elaborated in the excerpts provided above.Nate
03/30/2024, 6:21 PMpersist_result=True on a task / flow it'll use local storage ~/.prefect/* w.r.t the runtime, so if its a local worker, but you can set either
⢠PREFECT_HOME=/some/path to control where that default storage is relative to
⢠PREFECT_DEFAULT_RESULT_STORAGE_BLOCK=some-block-type/some-block-name to save results elsewhereCharles Marks
03/30/2024, 6:26 PMNate
03/30/2024, 6:30 PMdeployment.yaml and was like š
bc that was the declarative way to to use prefect deployment build which was the old CLI cmd for agents / block based deployments
so yep prefect deploy & prefect.yaml is what you want - bunch of examples here if its helpfulCharles Marks
03/30/2024, 7:37 PMMarvin
03/30/2024, 7:37 PMprefect.yaml file using the Prefect CLI, you can use the following command:
bash
prefect deploy --prefect-file path/to/my_file.yaml
This command allows you to specify the path to your custom prefect.yaml file. By default, the prefect deploy command will look for a prefect.yaml file in the project's root directory. If you want to use a different file or location, you can provide the path as shown above.
For more details, you can refer to the Prefect Documentation on deploying with prefect.yaml.Charles Marks
03/30/2024, 8:11 PMNate
03/30/2024, 8:12 PMprefect deploy -n name path/to/file.py:entrypoint or prefect --no-prompt deploy --allNate
03/30/2024, 8:13 PMprefect.yaml i.e. dont need interactive experienceCharles Marks
03/30/2024, 8:13 PMCharles Marks
03/30/2024, 8:14 PMCharles Marks
03/30/2024, 8:15 PMCharles Marks
03/30/2024, 8:21 PMCharles Marks
03/30/2024, 8:21 PMNate
03/30/2024, 8:25 PM2 the one I made manually in the CLI and try to launch in the ui just hangs saying late.this is usually because a worker is not running for the work pool that you've assigned the deployments to not so sure what your objective is / how you mean "schema" here but
split up all the schemas into deployments which I can run one after the other being fed into the worker queue, I'm assuming the local process would just stay alive until it gets through all of themin general a process worker will live as long as the process that starts when you say
prefect worker start -p some-local-poolCharles Marks
03/30/2024, 8:40 PMCharles Marks
03/30/2024, 8:42 PMNate
03/30/2024, 8:47 PMjob_variables that the local work-pool type has)
⦠this can be overridden on a deployment basis
deployments are assigned to a work pool, then flow runs from that deployment are sent to that work pool, workers pick up runs from that pool according to the above and then submit the run to the execution env according to the template on your work pool + any overridesCharles Marks
03/30/2024, 9:08 PMCharles Marks
03/30/2024, 9:15 PMNate
03/30/2024, 9:48 PMNate
03/30/2024, 9:49 PMjob_variables , env is an example of a job_variable that can be set for the duration of a flow runCharles Marks
03/30/2024, 9:51 PM