snowflake.ml.jobs.remote

snowflake.ml.jobs.remote(compute_pool: str, *, stage_name: str, target_instances: int = 1, pip_requirements: Optional[list[str]] = None, external_access_integrations: Optional[list[str]] = None, session: Optional[Session] = None, **kwargs: Any) Callable[[Callable[[_Args], _ReturnValue]], Callable[[_Args], MLJob[_ReturnValue]]]

Submit a job to the compute pool.

Parameters:
  • compute_pool – The compute pool to use for the job.

  • stage_name – The name of the stage where the job payload will be uploaded.

  • target_instances – The number of nodes in the job. If none specified, create a single node job.

  • pip_requirements – A list of pip requirements for the job.

  • external_access_integrations – A list of external access integrations.

  • session – The Snowpark session to use. If none specified, uses active session.

  • kwargs

    Additional keyword arguments. Supported arguments: database (str): The database to use for the job. schema (str): The schema to use for the job. min_instances (int): The minimum number of nodes required to start the job.

    If none specified, defaults to target_instances. If set, the job will not start until the minimum number of nodes is available.

    env_vars (dict): Environment variables to set in container. enable_metrics (bool): Whether to enable metrics publishing for the job. query_warehouse (str): The query warehouse to use. Defaults to session warehouse. spec_overrides (dict): A dictionary of overrides for the service spec.

Returns:

Decorator that dispatches invocations of the decorated function as remote jobs.