Skip to content

create_mlflow_tracking_server async

create_mlflow_tracking_server(
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    tracking_server_name: Optional[TrackingServerName] = None,
    artifact_store_uri: Optional[S3Uri] = None,
    tracking_server_size: Optional[TrackingServerSize] = None,
    mlflow_version: Optional[MlflowVersion] = None,
    role_arn: Optional[RoleArn] = None,
    automatic_model_registration: Optional[Boolean] = None,
    weekly_maintenance_window_start: Optional[WeeklyMaintenanceWindowStart] = None,
    tags: Optional[TagList] = None,
    s3_bucket_owner_account_id: Optional[AccountId] = None,
    s3_bucket_owner_verification: Optional[Boolean] = None,
) -> CreateMlflowTrackingServerResponse

Creates an MLflow Tracking Server using a general purpose Amazon S3 bucket as the artifact store. For more information, see Create an MLflow Tracking Server.

Parameters:

  • tracking_server_name (Optional[TrackingServerName], default: None ) –

    A unique string identifying the tracking server name. This string is part of the tracking server ARN.

  • artifact_store_uri (Optional[S3Uri], default: None ) –

    The S3 URI for a general purpose bucket to use as the MLflow Tracking Server artifact store.

  • tracking_server_size (Optional[TrackingServerSize], default: None ) –

    The size of the tracking server you want to create. You can choose between "Small", "Medium", and "Large". The default MLflow Tracking Server configuration size is "Small". You can choose a size depending on the projected use of the tracking server such as the volume of data logged, number of users, and frequency of use.

    We recommend using a small tracking server for teams of up to 25 users, a medium tracking server for teams of up to 50 users, and a large tracking server for teams of up to 100 users.

  • mlflow_version (Optional[MlflowVersion], default: None ) –

    The version of MLflow that the tracking server uses. To see which MLflow versions are available to use, see How it works.

  • role_arn (Optional[RoleArn], default: None ) –

    The Amazon Resource Name (ARN) for an IAM role in your account that the MLflow Tracking Server uses to access the artifact store in Amazon S3. The role should have AmazonS3FullAccess permissions. For more information on IAM permissions for tracking server creation, see Set up IAM permissions for MLflow.

  • automatic_model_registration (Optional[Boolean], default: None ) –

    Whether to enable or disable automatic registration of new MLflow models to the SageMaker Model Registry. To enable automatic model registration, set this value to True. To disable automatic model registration, set this value to False. If not specified, AutomaticModelRegistration defaults to False.

  • weekly_maintenance_window_start (Optional[WeeklyMaintenanceWindowStart], default: None ) –

    The day and time of the week in Coordinated Universal Time (UTC) 24-hour standard time that weekly maintenance updates are scheduled. For example: TUE:03:30.

  • tags (Optional[TagList], default: None ) –

    Tags consisting of key-value pairs used to manage metadata for the tracking server.

  • s3_bucket_owner_account_id (Optional[AccountId], default: None ) –

    Expected Amazon Web Services account ID that owns the Amazon S3 bucket for artifact storage. Defaults to caller's account ID if not provided.

  • s3_bucket_owner_verification (Optional[Boolean], default: None ) –

    Enable Amazon S3 Ownership checks when interacting with Amazon S3 buckets from a SageMaker Managed MLflow Tracking Server. Defaults to True if not provided.

Raises:

  • ResourceLimitExceeded –

    You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
async def create_mlflow_tracking_server(
    self,
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    tracking_server_name: Optional[
        "capo_sagemaker.types.tracking_server_name.TrackingServerName"
    ] = None,
    artifact_store_uri: Optional["capo_sagemaker.types.s3_uri.S3Uri"] = None,
    tracking_server_size: Optional[
        "capo_sagemaker.types.tracking_server_size.TrackingServerSize"
    ] = None,
    mlflow_version: Optional[
        "capo_sagemaker.types.mlflow_version.MlflowVersion"
    ] = None,
    role_arn: Optional["capo_sagemaker.types.role_arn.RoleArn"] = None,
    automatic_model_registration: Optional[
        "capo_sagemaker.types.boolean.Boolean"
    ] = None,
    weekly_maintenance_window_start: Optional[
        "capo_sagemaker.types.weekly_maintenance_window_start.WeeklyMaintenanceWindowStart"
    ] = None,
    tags: Optional["capo_sagemaker.types.tag_list.TagList"] = None,
    s3_bucket_owner_account_id: Optional[
        "capo_sagemaker.types.account_id.AccountId"
    ] = None,
    s3_bucket_owner_verification: Optional[
        "capo_sagemaker.types.boolean.Boolean"
    ] = None,
) -> "capo_sagemaker.types.create_mlflow_tracking_server_response.CreateMlflowTrackingServerResponse":
    """<p>Creates an MLflow Tracking Server using a general purpose Amazon S3 bucket as the artifact store. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/mlflow-create-tracking-server.html">Create an MLflow Tracking Server</a>.</p>

    Args:
        tracking_server_name: <p>A unique string identifying the tracking server name. This string is part of the tracking server ARN.</p>
        artifact_store_uri: <p>The S3 URI for a general purpose bucket to use as the MLflow Tracking Server artifact store.</p>
        tracking_server_size: <p>The size of the tracking server you want to create. You can choose between <code>"Small"</code>, <code>"Medium"</code>, and <code>"Large"</code>. The default MLflow Tracking Server configuration size is <code>"Small"</code>. You can choose a size depending on the projected use of the tracking server such as the volume of data logged, number of users, and frequency of use. </p> <p>We recommend using a small tracking server for teams of up to 25 users, a medium tracking server for teams of up to 50 users, and a large tracking server for teams of up to 100 users. </p>
        mlflow_version: <p>The version of MLflow that the tracking server uses. To see which MLflow versions are available to use, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/mlflow.html#mlflow-create-tracking-server-how-it-works">How it works</a>.</p>
        role_arn: <p>The Amazon Resource Name (ARN) for an IAM role in your account that the MLflow Tracking Server uses to access the artifact store in Amazon S3. The role should have <code>AmazonS3FullAccess</code> permissions. For more information on IAM permissions for tracking server creation, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/mlflow-create-tracking-server-iam.html">Set up IAM permissions for MLflow</a>.</p>
        automatic_model_registration: <p>Whether to enable or disable automatic registration of new MLflow models to the SageMaker Model Registry. To enable automatic model registration, set this value to <code>True</code>. To disable automatic model registration, set this value to <code>False</code>. If not specified, <code>AutomaticModelRegistration</code> defaults to <code>False</code>.</p>
        weekly_maintenance_window_start: <p>The day and time of the week in Coordinated Universal Time (UTC) 24-hour standard time that weekly maintenance updates are scheduled. For example: TUE:03:30.</p>
        tags: <p>Tags consisting of key-value pairs used to manage metadata for the tracking server.</p>
        s3_bucket_owner_account_id: <p>Expected Amazon Web Services account ID that owns the Amazon S3 bucket for artifact storage. Defaults to caller's account ID if not provided.</p>
        s3_bucket_owner_verification: <p>Enable Amazon S3 Ownership checks when interacting with Amazon S3 buckets from a SageMaker Managed MLflow Tracking Server. Defaults to <code>True</code> if not provided. </p>

    Raises:
        capo_sagemaker.errors.resource_limit_exceeded.ResourceLimitExceeded: <p> You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. </p>
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sagemaker.types.create_mlflow_tracking_server_request.CreateMlflowTrackingServerRequest]",
    ) -> AsyncOperationResponse[
        "capo_sagemaker.types.create_mlflow_tracking_server_response.CreateMlflowTrackingServerResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.create_mlflow_tracking_server

        (
            output,
            http_response,
        ) = await capo_sagemaker._operations.sage_maker.create_mlflow_tracking_server.async_create_mlflow_tracking_server(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateMlflowTrackingServer")
    )
    input_: capo_sagemaker.types.create_mlflow_tracking_server_request.CreateMlflowTrackingServerRequest = {}
    if tracking_server_name is not None:
        input_["tracking_server_name"] = tracking_server_name
    if artifact_store_uri is not None:
        input_["artifact_store_uri"] = artifact_store_uri
    if tracking_server_size is not None:
        input_["tracking_server_size"] = tracking_server_size
    if mlflow_version is not None:
        input_["mlflow_version"] = mlflow_version
    if role_arn is not None:
        input_["role_arn"] = role_arn
    if automatic_model_registration is not None:
        input_["automatic_model_registration"] = automatic_model_registration
    if weekly_maintenance_window_start is not None:
        input_["weekly_maintenance_window_start"] = weekly_maintenance_window_start
    if tags is not None:
        input_["tags"] = tags
    if s3_bucket_owner_account_id is not None:
        input_["s3_bucket_owner_account_id"] = s3_bucket_owner_account_id
    if s3_bucket_owner_verification is not None:
        input_["s3_bucket_owner_verification"] = s3_bucket_owner_verification

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output