will hitchcock
11/03/2023, 1:46 AMMarvin
11/03/2023, 1:47 AMflow.from_source
method. This method accepts a git repository URL and an entrypoint pointing to the flow to load from the repository. Here is an example:
from prefect import flow
my_flow = flow.from_source(
source="<https://github.com/org/repo.git>",
entrypoint="flows.py:my_flow"
)
my_flow()
In this example, a flow entrypoint is the path to the file the flow is located in and the name of the flow function separated by a colon.
Please note that this information is based on Prefect version 2.14.2 and may vary with different versions. For the most accurate information, please refer to the Prefect documentation.Nate
11/03/2023, 1:51 AMMarvin
11/03/2023, 1:51 AMrun_deployment
. It seems like it might be a method or function specific to your codebase or a third-party library.
However, in Prefect, you typically use the run
method to execute a flow and retrieve its result. If you have set persist_result=True
, you can retrieve the result of the flow run with flow_run.state.result()
.
Here is an example:
flow_run = my_flow.run(parameters=dict(input=dict(x=1, y=2)))
result = flow_run.state.result
In this example, my_flow
is your flow object, and run
is a method that executes the flow and returns a FlowRun
object. FlowRun.state.result
contains the result of the flow run if persist_result
was set to True
.
Please refer to the Prefect documentation for more details: Running Flows and Results and Persisting State.Nate
11/03/2023, 1:52 AMwill hitchcock
11/03/2023, 1:53 AMwill hitchcock
11/03/2023, 1:54 AMNate
11/03/2023, 1:54 AMwill hitchcock
11/03/2023, 1:55 AMNate
11/03/2023, 1:55 AMNate
11/03/2023, 1:56 AMNate
11/03/2023, 1:56 AMMarvin
11/03/2023, 1:57 AMrun_deployment
in the Prefect documentation. The closest match was a command prefect deployment run 'get-repo-info/my-first-deployment'
which is used to run a deployment from the command line.
It's possible that run_deployment
is a method specific to your codebase or a third-party library. I would recommend checking the documentation or source code of the library you're using, or asking for help in the relevant community or support channel.
If you're referring to running a deployment in Prefect, you would typically use the Prefect UI, Prefect CLI, or Prefect API to create and manage flow runs. For example, to run a deployment from the command line, you can use the prefect deployment run
command.
Here is an example from the Prefect documentation:
bash
prefect deployment run 'get-repo-info/my-first-deployment'
In this example, get-repo-info/my-first-deployment
is the name of the deployment to run. This command creates a new flow run, which is then picked up by an agent and executed.
For more information, please refer to the Prefect documentation.will hitchcock
11/03/2023, 3:10 AMMarvin
11/03/2023, 3:11 AM