Hello All, I'm using prefect for a data cleansing...
# prefect-ui
a
Hello All, I'm using prefect for a data cleansing task, but I use the local executor and local run, I also have restrction on using the cloud service, since I'm working with sensitive data. is there anyway to see the prefect dashboard locally ? Thanks in advance
a
@Ayah Safeen regarding sensitive data, I would encourage you to have a look at Prefect’s hybrid execution model - we never receive your code or data: • https://www.prefect.io/why-prefect/hybrid-model/https://docs.prefect.io/orchestration/faq/dataflow.html#how-is-data-persisted But if this doesn’t convince you, you can self host everything by using Prefect Server. But still keep in mind that Cloud is more secure and performant.
b
idk if it’s the proper way, but to just “debug” is working type on terminal: • pip install prefect • prefect backend server • prefect server start • prefect create project ‘my project’ • go to the UI on your script: • register your flow: ◦ your_flow.register(project_name=your_project_name) • and, instead of
project.run()
(locally) use
LocalAgent().start()
and run in a different terminal (not the one you initiate the local server) (
from prefect.agent.local import LocalAgent
) • if the last option do not work, try
your_flow.run_agent()
upvote 3