示例#1
0
            public override async Task <Context> Execute(Context context)
            {
                var result = await sageMaker.CreateEndpointConfigAsync(new CreateEndpointConfigRequest
                {
                    EndpointConfigName = context.TrainingJobName,
                    ProductionVariants = new List <ProductionVariant>
                    {
                        new ProductionVariant
                        {
                            InstanceType         = ProductionVariantInstanceType.MlM4Xlarge,
                            InitialVariantWeight = 1,
                            InitialInstanceCount = 1,
                            ModelName            = context.TrainingJobName,
                            VariantName          = "AllTraffic"
                        }
                    }
                });

                context.EndpointConfigArn = result.EndpointConfigArn;
                return(context);
            }
示例#2
0
 private Amazon.SageMaker.Model.CreateEndpointConfigResponse CallAWSServiceOperation(IAmazonSageMaker client, Amazon.SageMaker.Model.CreateEndpointConfigRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon SageMaker Service", "CreateEndpointConfig");
     try
     {
         #if DESKTOP
         return(client.CreateEndpointConfig(request));
         #elif CORECLR
         return(client.CreateEndpointConfigAsync(request).GetAwaiter().GetResult());
         #else
                 #error "Unknown build edition"
         #endif
     }
     catch (AmazonServiceException exc)
     {
         var webException = exc.InnerException as System.Net.WebException;
         if (webException != null)
         {
             throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException);
         }
         throw;
     }
 }