# Vertex Agent


# VertexAgent

class

prefect.agent.vertex.agent.VertexAgent

(project=None, region_name=None, service_account=None, agent_config_id=None, name=None, labels=None, env_vars=None, max_polls=None, agent_address=None, no_cloud_logs=None)[source]

Agent which deploys flow runs as Vertex Training tasks.

Args:

  • project (str): The project in which to submit the Vertex Jobs This does not necessarily need to be the same project as the where this agent is running, but the service account running the agent needs permissions to start Vertex Job in this project.
  • region_name (str, optional): Region the job is running in for the endpoint
  • service_account (str, optional): Service account to submit jobs as on Vertex
  • agent_config_id (str, optional): An optional agent configuration ID that can be used to set configuration based on an agent from a backend API. If set all configuration values will be pulled from the backend agent configuration.
  • name (str, optional): An optional name to give this agent. Can also be set through the environment variable PREFECT__CLOUD__AGENT__NAME. Defaults to "agent".
  • labels (List[str], optional): A list of labels, which are arbitrary string identifiers used by Prefect Agents when polling for work.
  • env_vars (dict, optional): A dictionary of environment variables and values that will be set on each flow run that this agent submits for execution.
  • max_polls (int, optional): Maximum number of times the agent will poll Prefect Cloud for flow runs; defaults to infinite.
  • agent_address (str, optional): Address to serve internal api at. Currently this is just health checks for use by an orchestration layer. Leave blank for no api server (default).
  • no_cloud_logs (bool, optional): Disable logging to a Prefect backend for this agent and all deployed flow runs. Defaults to False.

methods:                                                                                                                                                       

prefect.agent.agent.Agent.start

()[source]

The main entrypoint to the agent process. Sets up the agent then continuously polls for work to submit.

This is the only method that should need to be called externally.



This documentation was auto-generated from commit ffa9a6c
on February 1, 2023 at 18:44 UTC