submit_service_job
¶
submit_service_job(
*,
config_overrides: Optional[BatchClientConfig] = None,
job_name: Optional[String] = None,
job_queue: Optional[String] = None,
retry_strategy: Optional[ServiceJobRetryStrategy] = None,
scheduling_priority: Optional[Integer] = None,
service_request_payload: Optional[String] = None,
service_job_type: Optional[ServiceJobType] = None,
share_identifier: Optional[String] = None,
quota_share_name: Optional[String] = None,
preemption_configuration: Optional[ServiceJobPreemptionConfiguration] = None,
timeout_config: Optional[ServiceJobTimeout] = None,
tags: Optional[TagrisTagsMap] = None,
client_token: Optional[ClientRequestToken] = None,
) -> SubmitServiceJobResponse
Submits a service job to a specified job queue to run on SageMaker AI. A service job is a unit of work that you submit to Batch for execution on SageMaker AI.
Parameters:
-
job_name(Optional[String], default:None) –The name of the service job. It can be up to 128 characters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).
-
job_queue(Optional[String], default:None) –The job queue into which the service job is submitted. You can specify either the name or the ARN of the queue. The job queue must have the type
SAGEMAKER_TRAINING. -
retry_strategy(Optional[ServiceJobRetryStrategy], default:None) –The retry strategy to use for failed service jobs that are submitted with this service job request.
-
scheduling_priority(Optional[Integer], default:None) –The scheduling priority of the service job. Valid values are integers between 0 and 9999.
-
service_request_payload(Optional[String], default:None) –The request, in JSON, for the service that the SubmitServiceJob operation is queueing.
-
service_job_type(Optional[ServiceJobType], default:None) –The type of service job. For SageMaker Training jobs, specify
SAGEMAKER_TRAINING. -
share_identifier(Optional[String], default:None) –The share identifier for the service job. Don't specify this parameter if the job queue doesn't have a fair-share scheduling policy. If the job queue has a fair-share scheduling policy, then this parameter must be specified.
-
quota_share_name(Optional[String], default:None) –The quota share for the service job. Don't specify this parameter if the job queue doesn't have a quota share scheduling policy. If the job queue has a quota share scheduling policy, then this parameter must be specified.
-
preemption_configuration(Optional[ServiceJobPreemptionConfiguration], default:None) –Specifies the service job behavior when preempted.
-
timeout_config(Optional[ServiceJobTimeout], default:None) –The timeout configuration for the service job. If none is specified, Batch defers to the default timeout of the underlying service handling the job.
-
tags(Optional[TagrisTagsMap], default:None) –The tags that you apply to the service job request. Each tag consists of a key and an optional value. For more information, see Tagging your Batch resources.
-
client_token(Optional[ClientRequestToken], default:None) –A unique identifier for the request. This token is used to ensure idempotency of requests. If this parameter is specified and two submit requests with identical payloads and
clientTokens are received, these requests are considered the same request and the second request is rejected.
Raises:
-
ClientException–These errors are usually caused by a client action. One example cause is using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Another cause is specifying an identifier that's not valid.
-
ServerException–These errors are usually caused by a server issue.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_batch/_services/batch.py
2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 | |